public
Description: WoW Addon - Automatically restock items from vendors and your bank
Homepage: http://www.tekkub.net
Clone URL: git://github.com/tekkub/stealyourcarbon.git
Search Repo:
Click here to lend your support to: stealyourcarbon and make a donation at www.pledgie.com !
Upgrade tekKonfig
tekkub (author)
Sun Mar 16 17:38:27 -0700 2008
commit  79aa164a6cb5370be51ec7ed843236994c800ac7
tree    a78e3bc67613e521d7337cf5a89fdef1c9127354
parent  758455e05b0db6b4faefeb867eee6338bd793dd0
...
5
6
7
 
 
8
...
5
6
7
8
9
10
0
@@ -5,4 +5,6 @@
0
   <Script file="tekKonfigFadeIn.lua"/>
0
   <Script file="tekKonfigHeading.lua"/>
0
   <Script file="tekKonfigSlider.lua"/>
0
+ <Script file="tekKonfigDropdown.lua"/>
0
+ <Script file="tekKonfigAboutPanel.lua"/>
0
 </Ui>
...
1
2
 
3
 
4
5
6
7
8
9
10
11
 
 
 
 
 
 
 
 
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
46
47
48
49
50
51
52
 
 
 
 
 
 
 
53
...
1
 
2
3
4
5
6
 
 
 
 
 
 
7
8
9
10
11
12
13
14
15
 
16
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
 
 
 
 
50
51
52
53
54
55
56
57
0
@@ -1,53 +1,57 @@
0
 
0
-local lib, oldminor = LibStub:NewLibrary("tekKonfig-Button", 2)
0
+local lib, oldminor = LibStub:NewLibrary("tekKonfig-Button", 3)
0
 if not lib then return end
0
+oldminor = oldminor or 0
0
 
0
 
0
-local GameTooltip = GameTooltip
0
-local function HideTooltip() GameTooltip:Hide() end
0
-local function ShowTooltip(self)
0
- if self.tiptext then
0
- GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
0
- GameTooltip:SetText(self.tiptext, nil, nil, nil, nil, true)
0
+if oldminor < 3 then
0
+ local GameTooltip = GameTooltip
0
+ local function HideTooltip() GameTooltip:Hide() end
0
+ local function ShowTooltip(self)
0
+ if self.tiptext then
0
+ GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
0
+ GameTooltip:SetText(self.tiptext, nil, nil, nil, nil, true)
0
+ end
0
   end
0
-end
0
 
0
 
0
--- Create a button.
0
--- All args optional, parent recommended
0
-function lib.new(parent, ...)
0
- local butt = CreateFrame("Button", nil, parent)
0
- if select("#", ...) > 0 then butt:SetPoint(...) end
0
- butt:SetWidth(80) butt:SetHeight(22)
0
-
0
- -- Fonts --
0
- butt:SetFont(GameFontNormal)
0
- butt:SetDisabledFontObject(GameFontDisable)
0
- butt:SetHighlightFontObject(GameFontHighlight)
0
- butt:SetTextFontObject(GameFontNormal)
0
-
0
- -- Textures --
0
- butt:SetNormalTexture("Interface\\Buttons\\UI-Panel-Button-Up")
0
- butt:SetPushedTexture("Interface\\Buttons\\UI-Panel-Button-Down")
0
- butt:SetHighlightTexture("Interface\\Buttons\\UI-Panel-Button-Highlight")
0
- butt:SetDisabledTexture("Interface\\Buttons\\UI-Panel-Button-Disabled")
0
- butt:GetNormalTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
- butt:GetPushedTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
- butt:GetHighlightTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
- butt:GetDisabledTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
- butt:GetHighlightTexture():SetBlendMode("ADD")
0
-
0
- -- Tooltip bits
0
- butt:SetScript("OnEnter", ShowTooltip)
0
- butt:SetScript("OnLeave", HideTooltip)
0
-
0
- return butt
0
+ -- Create a button.
0
+ -- All args optional, parent recommended
0
+ function lib.new(parent, ...)
0
+ local butt = CreateFrame("Button", nil, parent)
0
+ if select("#", ...) > 0 then butt:SetPoint(...) end
0
+ butt:SetWidth(80) butt:SetHeight(22)
0
+
0
+ -- Fonts --
0
+ butt:SetDisabledFontObject(GameFontDisable)
0
+ butt:SetHighlightFontObject(GameFontHighlight)
0
+ butt:SetTextFontObject(GameFontNormal)
0
+
0
+ -- Textures --
0
+ butt:SetNormalTexture("Interface\\Buttons\\UI-Panel-Button-Up")
0
+ butt:SetPushedTexture("Interface\\Buttons\\UI-Panel-Button-Down")
0
+ butt:SetHighlightTexture("Interface\\Buttons\\UI-Panel-Button-Highlight")
0
+ butt:SetDisabledTexture("Interface\\Buttons\\UI-Panel-Button-Disabled")
0
+ butt:GetNormalTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ butt:GetPushedTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ butt:GetHighlightTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ butt:GetDisabledTexture():SetTexCoord(0, 0.625, 0, 0.6875)
0
+ butt:GetHighlightTexture():SetBlendMode("ADD")
0
+
0
+ -- Tooltip bits
0
+ butt:SetScript("OnEnter", ShowTooltip)
0
+ butt:SetScript("OnLeave", HideTooltip)
0
+
0
+ return butt
0
+ end
0
 end
0
 
0
 
0
-function lib.new_small(parent, ...)
0
- local butt = lib.new(parent, ...)
0
- butt:SetHighlightFontObject(GameFontHighlightSmall)
0
- butt:SetTextFontObject(GameFontNormalSmall)
0
- return butt
0
+if oldminor < 2 then
0
+ function lib.new_small(parent, ...)
0
+ local butt = lib.new(parent, ...)
0
+ butt:SetHighlightFontObject(GameFontHighlightSmall)
0
+ butt:SetTextFontObject(GameFontNormalSmall)
0
+ return butt
0
+ end
0
 end
...
1
2
 
3
4
5
...
40
41
42
43
 
44
45
46
47
 
48
49
50
51
 
52
53
54
...
1
 
2
3
4
5
...
40
41
42
 
43
44
45
46
 
47
48
49
50
 
51
52
53
54
0
@@ -1,5 +1,5 @@
0
 
0
-local lib, oldminor = LibStub:NewLibrary("tekKonfig-Slider", 1)
0
+local lib, oldminor = LibStub:NewLibrary("tekKonfig-Slider", 2)
0
 if not lib then return end
0
 
0
 
0
@@ -40,15 +40,15 @@ function lib.new(parent, label, lowvalue, highvalue, ...)
0
   slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Horizontal") -- Dim: 32x32... can't find API to set this?
0
   slider:SetBackdrop(HorizontalSliderBG)
0
 
0
- local text = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
0
+ local text = slider:CreateFontString(nil, "ARTWORK", "GameFontNormal")
0
   text:SetPoint("BOTTOM", slider, "TOP")
0
   text:SetText(label)
0
 
0
- local low = slider:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
+ local low = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
0
   low:SetPoint("TOPLEFT", slider, "BOTTOMLEFT", -4, 3)
0
   low:SetText(lowvalue)
0
 
0
- local high = slider:CreateFontString(nil, "ARTWORK", "GameFontNormalSmall")
0
+ local high = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
0
   high:SetPoint("TOPRIGHT", slider, "BOTTOMRIGHT", 4, 3)
0
   high:SetText(highvalue)
0
 

Comments

    No one has commented yet.