PageRenderTime 263ms CodeModel.GetById 202ms app.highlight 0ms RepoModel.GetById 60ms app.codeStats 0ms

/Tukui/docs/API.txt

http://github.com/Asphyxia/Tukui
Plain Text | 64 lines | 50 code | 14 blank | 0 comment | 0 complexity | 7677dd74dc604fdb930b6b22f3f3b0b2 MD5 | raw file
 1Tukui API
 2
 3This is how another addon imports the Tukui engine:
 4(it must be at the top of every lua file if your addon or edited version is built around Tukui)
 5	local T, C, L = unpack(Tukui)
 6
 7Now the functions:
 8
 9	frame:SetTemplate("Template", texture)
10		Set a backdrop that cover the exact size of the frame according
11		to which template is choosen. If "texture" is set to true, it will
12		use media.normTex instead of the default blank texture. If "" is empty,
13		it will use "Default" template by default.
14
15	frame:CreatePanel("Template", width, height, point, anchor, relativepoint, xposition, yposition)
16		SetTemplate's brother, sets a backdrop with more options like custom
17		size, position, point, etc. If "" is empty, it will use "Default"
18		template by default.
19
20	frame:Size(width, height)
21		Sets the width and height of object to an absolute (pixel perfect) value
22		in pixels. If height is ommitted then height = width is assumed.
23
24	frame:Point(...)
25		Exactly the same as its little brother SetPoint, but every offset
26		is scaled to absolute (pixel perfect) pixel amounts.
27
28	frame:Width(...)
29		Exactly the same as its little brother SetWidth, but every offset
30		is scaled to absolute (pixel perfect) pixel amounts.
31
32	frame:Height(...)
33		Exactly the same as its little brother SetHeight, but every offset
34		is scaled to absolute (pixel perfect) pixel amounts.
35
36	frame:CreateShadow("Template")
37		Create shadow effect on the edge of the frame according to which template
38		we choose. If "" is empty, it will use "Default" template by default.
39
40	frame:Kill()
41		Unregister all events from this frame and kill its process for ever.
42
43	frame:StyleButton(hasChecked)
44		Set a hover / pushed / and... Checked texture (if set on true)
45	
46	frame:FontString(name, fontName, fontHeight, fontStyle)
47		Create a FontString with the frame as a parent. If you leave name as nil the font name will become
48		"<framename>.text". If a name is provided however it will be called "<framename>.<yourname>".
49
50Templates:
51	- "Default"
52		-- use default color according to what we have set via /media/medias.lua
53	- "Transparent"
54		-- Same as "Default" but with Transparent background
55	- "Tukui"
56	- "ClassColor"
57	- "Elv"
58	- "Eclipse"
59	- "Dajova"
60	- "Hydra"
61	- "Duffed"
62	- "Eclipse"
63
64		( ... will probably add more in the future from most popular edits ... )