My favorites | Sign in
Project Logo
          
Changes to /trunk/rBottomBarStyler/core.lua
r371 vs. r374   Edit
  Compare: vs.   Format:
Revision r374
Go to: 
/trunk/rBottomBarStyler/core.lua   r371 /trunk/rBottomBarStyler/core.lua   r374
1 1
2 --[[---------------------------------------------------------------------------- 2 --[[----------------------------------------------------------------------------
3 Copyright (c) 2009, Erik Raetz 3 Copyright (c) 2009, Erik Raetz
4 All rights reserved. 4 All rights reserved.
5 5
6 Redistribution and use in source and binary forms, with or without 6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met: 7 modification, are permitted provided that the following conditions are met:
8 8
9 * Redistributions of source code must retain the above copyright notice, 9 * Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer. 10 this list of conditions and the following disclaimer.
11 * Redistributions in binary form must reproduce the above copyright notice, 11 * Redistributions in binary form must reproduce the above copyright notice,
12 this list of conditions and the following disclaimer in the documentation 12 this list of conditions and the following disclaimer in the documentation
13 and/or other materials provided with the distribution. 13 and/or other materials provided with the distribution.
14 * Neither the name of rBottomBarStyler nor the names of its contributors may be used 14 * Neither the name of rBottomBarStyler nor the names of its contributors may be used
15 to endorse or promote products derived from this software without specific 15 to endorse or promote products derived from this software without specific
16 prior written permission. 16 prior written permission.
17 17
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 POSSIBILITY OF SUCH DAMAGE. 28 POSSIBILITY OF SUCH DAMAGE.
29 ------------------------------------------------------------------------------]] 29 ------------------------------------------------------------------------------]]
30 30
31 ------------------------------------------------------ 31 ------------------------------------------------------
32 -- / VARIABLES / -- 32 -- / VARIABLES / --
33 ------------------------------------------------------ 33 ------------------------------------------------------
34 34
35 local default_scale = 0.6 35 local default_scale = 0.6
36 local default_art = "d3" 36 local default_art = "d3"
37 local default_bar = "bar2" 37 local default_bar = "bar2"
38 local default_movable = 1 38 local default_movable = 1
39 local default_locked = 1 39 local default_locked = 1
40 local default_healthorb = 2 40 local default_healthorb = 2
41 local default_manaorb = 3 41 local default_manaorb = 3
42 local default_automana = 1 42 local default_automana = 1
43 43
44 local default_font = NAMEPLATE_FONT 44 local default_font = NAMEPLATE_FONT
45 rBottomBarStyler = rBottomBarStyler or {} 45 rBottomBarStyler = rBottomBarStyler or {}
46 local frame_to_scale 46 local frame_to_scale
47 local bar_to_show 47 local bar_to_show
48 local hglow1, hglow2, mglow1, mglow2, hfill, mfill 48 local hglow1, hglow2, mglow1, mglow2, hfill, mfill
49 local frame_to_drag 49 local frame_to_drag
50 local fog_smoother = 1.3 50 local fog_smoother = 1.3
51 local text_display = 1 51 local text_display = 1
52 local save_dudustance 52 local save_dudustance
53 53
54 local orbtab = { 54 local orbtab = {
55 [1] = {r = 0.3, g = 0, b = 0, scale = 0.8, z = -12, x = 0.8, y = -1.7, anim = "SPELLS\\RedRadiationFog.m2"}, -- red 55 [1] = {r = 0.3, g = 0, b = 0, scale = 0.8, z = -12, x = 0.8, y = -1.7, anim = "SPELLS\\RedRadiationFog.m2"}, -- red
56 [2] = {r = 0, g = 0.3, b = 0.1, scale = 0.75, z = -12, x = 0, y = -1.1, anim = "SPELLS\\GreenRadiationFog.m2"}, -- green 56 [2] = {r = 0, g = 0.3, b = 0.1, scale = 0.75, z = -12, x = 0, y = -1.1, anim = "SPELLS\\GreenRadiationFog.m2"}, -- green
57 [3] = {r = 0, g = 0.2, b = 0.3, scale = 0.75, z = -12, x = 1.2, y = -1, anim = "SPELLS\\BlueRadiationFog.m2"}, -- blue 57 [3] = {r = 0, g = 0.2, b = 0.3, scale = 0.75, z = -12, x = 1.2, y = -1, anim = "SPELLS\\BlueRadiationFog.m2"}, -- blue
58 [4] = {r = 0.4, g = 0.3, b = 0, scale = 0.75, z = -12, x = -0.3, y = -1.2, anim = "SPELLS\\OrangeRadiationFog.m2"}, -- yellow 58 [4] = {r = 0.4, g = 0.3, b = 0, scale = 0.75, z = -12, x = -0.3, y = -1.2, anim = "SPELLS\\OrangeRadiationFog.m2"}, -- yellow
59 [5] = {r = 0, g = 0.7, b = 0.7, scale = 0.9, z = -12, x = -0.5, y = -0.8, anim = "SPELLS\\WhiteRadiationFog.m2"}, -- runic 59 [5] = {r = 0, g = 0.7, b = 0.7, scale = 0.9, z = -12, x = -0.5, y = -0.8, anim = "SPELLS\\WhiteRadiationFog.m2"}, -- runic
60 } 60 }
61 61
62 UnitPopupMenus["SELF"] = { "PVP_FLAG", "LOOT_METHOD", "LOOT_THRESHOLD", "OPT_OUT_LOOT_TITLE", "LOOT_PROMOTE", "DUNGEON_DIFFICULTY", "RESET_INSTANCES", "RAID_TARGET_ICON", "LEAVE", "CANCEL" } 62 UnitPopupMenus["SELF"] = { "PVP_FLAG", "LOOT_METHOD", "LOOT_THRESHOLD", "OPT_OUT_LOOT_TITLE", "LOOT_PROMOTE", "DUNGEON_DIFFICULTY", "RESET_INSTANCES", "RAID_TARGET_ICON", "LEAVE", "CANCEL" }
63 63
64 ------------------------------------------------------ 64 ------------------------------------------------------
65 -- / CHAT OUTPUT FUNC / -- 65 -- / CHAT OUTPUT FUNC / --
66 ------------------------------------------------------ 66 ------------------------------------------------------
67 67
68 local function am(text) 68 local function am(text)
69 DEFAULT_CHAT_FRAME:AddMessage(text) 69 DEFAULT_CHAT_FRAME:AddMessage(text)
70 end 70 end
71 71
72 ------------------------------------------------------ 72 ------------------------------------------------------
73 -- / SET AUTO MANA / -- 73 -- / SET AUTO MANA / --
74 ------------------------------------------------------ 74 ------------------------------------------------------
75 75
76 local function set_automana() 76 local function set_automana()
77 if rBottomBarStyler.automana == 1 then 77 if rBottomBarStyler.automana == 1 then
78 local st = GetShapeshiftForm() 78 local st = GetShapeshiftForm()
79 local _, pt = UnitClass("player") 79 local _, pt = UnitClass("player")
80 if pt == "WARRIOR" then 80 if pt == "WARRIOR" then
81 rBottomBarStyler.manaorb = 1 81 rBottomBarStyler.manaorb = 1
82 elseif pt == "DEATHKNIGHT" then 82 elseif pt == "DEATHKNIGHT" then
83 rBottomBarStyler.manaorb = 5 83 rBottomBarStyler.manaorb = 5
84 elseif pt == "ROGUE" then 84 elseif pt == "ROGUE" then
85 rBottomBarStyler.manaorb = 4 85 rBottomBarStyler.manaorb = 4
86 elseif pt == "DRUID" and st == 3 then 86 elseif pt == "DRUID" and st == 3 then
87 rBottomBarStyler.manaorb = 4 87 rBottomBarStyler.manaorb = 4
88 elseif pt == "DRUID" and st == 1 then 88 elseif pt == "DRUID" and st == 1 then
89 rBottomBarStyler.manaorb = 1 89 rBottomBarStyler.manaorb = 1
90 else 90 else
91 rBottomBarStyler.manaorb = 3 91 rBottomBarStyler.manaorb = 3
92 end 92 end
93 end 93 end
94 end 94 end
95 95
96 ------------------------------------------------------ 96 ------------------------------------------------------
97 -- / SET UP DEFAULT VALUES / -- 97 -- / SET UP DEFAULT VALUES / --
98 ------------------------------------------------------ 98 ------------------------------------------------------
99 99
100 local function load_default() 100 local function load_default()
101 if(not rBottomBarStyler.scalevalue) then 101 if(not rBottomBarStyler.scalevalue) then
102 rBottomBarStyler.scalevalue = default_scale 102 rBottomBarStyler.scalevalue = default_scale
103 end 103 end
104 if(not rBottomBarStyler.artvalue) then 104 if(not rBottomBarStyler.artvalue) then
105 rBottomBarStyler.artvalue = default_art 105 rBottomBarStyler.artvalue = default_art
106 end 106 end
107 if(not rBottomBarStyler.barvalue) then 107 if(not rBottomBarStyler.barvalue) then
108 rBottomBarStyler.barvalue = default_bar 108 rBottomBarStyler.barvalue = default_bar
109 end 109 end
110 if(not rBottomBarStyler.movable) then 110 if(not rBottomBarStyler.movable) then
111 rBottomBarStyler.movable = default_movable 111 rBottomBarStyler.movable = default_movable
112 end 112 end
113 if(not rBottomBarStyler.locked) then 113 if(not rBottomBarStyler.locked) then
114 rBottomBarStyler.locked = default_locked 114 rBottomBarStyler.locked = default_locked
115 end 115 end
116 if(not rBottomBarStyler.healthorb) then 116 if(not rBottomBarStyler.healthorb) then
117 rBottomBarStyler.healthorb = default_healthorb 117 rBottomBarStyler.healthorb = default_healthorb
118 end 118 end
119 if(not rBottomBarStyler.manaorb) then 119 if(not rBottomBarStyler.manaorb) then
120 rBottomBarStyler.manaorb = default_manaorb 120 rBottomBarStyler.manaorb = default_manaorb
121 end 121 end
122 if(not rBottomBarStyler.automana) then 122 if(not rBottomBarStyler.automana) then
123 rBottomBarStyler.automana = default_automana 123 rBottomBarStyler.automana = default_automana
124 end 124 end
125 125
126 set_automana() 126 set_automana()
127 127
128 save_dudustance = GetShapeshiftForm()
129
130 end 128 end
131 129
132 ------------------------------------------------------ 130 ------------------------------------------------------
133 -- / SAVE POSXY FUNC / -- 131 -- / SAVE POSXY FUNC / --
134 ------------------------------------------------------ 132 ------------------------------------------------------
135 133
136 local function save_posxy() 134 local function save_posxy()
137 local point, relativeTo, relativePoint, x, y = frame_to_scale:GetPoint() 135 local point, relativeTo, relativePoint, x, y = frame_to_scale:GetPoint()
138 rBottomBarStyler.point = point 136 rBottomBarStyler.point = point
139 rBottomBarStyler.posx = x 137 rBottomBarStyler.posx = x
140 rBottomBarStyler.posy = y 138 rBottomBarStyler.posy = y
141 end 139 end
142 140
143 ------------------------------------------------------ 141 ------------------------------------------------------
144 -- / MOVE ME FUNC / -- 142 -- / MOVE ME FUNC / --
145 ------------------------------------------------------ 143 ------------------------------------------------------
146 144
147 local function move_my_frame() 145 local function move_my_frame()
148 if frame_to_drag then 146 if frame_to_drag then
149 frame_to_drag:Hide() 147 frame_to_drag:Hide()
150 end 148 end
151 if rBottomBarStyler.movable == 1 then 149 if rBottomBarStyler.movable == 1 then
152 frame_to_scale:SetMovable(true) 150 frame_to_scale:SetMovable(true)
153 if rBottomBarStyler.locked == 0 then 151 if rBottomBarStyler.locked == 0 then
154 if frame_to_drag then 152 if frame_to_drag then
155 frame_to_drag:Show() 153 frame_to_drag:Show()
156 end 154 end
157 frame_to_scale:EnableMouse(true) 155 frame_to_scale:EnableMouse(true)
158 frame_to_scale:RegisterForDrag("LeftButton","RightButton") 156 frame_to_scale:RegisterForDrag("LeftButton","RightButton")
159 frame_to_scale:SetScript("OnDragStart", function(self) 157 frame_to_scale:SetScript("OnDragStart", function(self)
160 if IsShiftKeyDown() and IsAltKeyDown() then 158 if IsShiftKeyDown() and IsAltKeyDown() then
161 self:StartMoving() 159 self:StartMoving()
162 end 160 end
163 end) 161 end)
164 frame_to_scale:SetScript("OnDragStop", function(self) 162 frame_to_scale:SetScript("OnDragStop", function(self)
165 if IsShiftKeyDown() and IsAltKeyDown() then 163 if IsShiftKeyDown() and IsAltKeyDown() then
166 self:StopMovingOrSizing() 164 self:StopMovingOrSizing()
167 save_posxy() 165 save_posxy()
168 end 166 end
169 end) 167 end)
170 end 168 end
171 else 169 else
172 rBottomBarStyler.point = nil 170 rBottomBarStyler.point = nil
173 rBottomBarStyler.posx = nil 171 rBottomBarStyler.posx = nil
174 rBottomBarStyler.posy = nil 172 rBottomBarStyler.posy = nil
175 frame_to_scale:ClearAllPoints() 173 frame_to_scale:ClearAllPoints()
176 frame_to_scale:SetPoint("BOTTOM",0,0) 174 frame_to_scale:SetPoint("BOTTOM",0,0)
177 end 175 end
178 end 176 end
179 177
180 ------------------------------------------------------ 178 ------------------------------------------------------
181 -- / SET ME GLOWS / -- 179 -- / SET ME GLOWS / --
182 ------------------------------------------------------ 180 ------------------------------------------------------
183 181
184 local function set_the_hglows() 182 local function set_the_hglows()
185 hfill:SetVertexColor(orbtab[rBottomBarStyler.healthorb].r,orbtab[rBottomBarStyler.healthorb].g,orbtab[rBottomBarStyler.healthorb].b) 183 hfill:SetVertexColor(orbtab[rBottomBarStyler.healthorb].r,orbtab[rBottomBarStyler.healthorb].g,orbtab[rBottomBarStyler.healthorb].b)
186 hglow1:SetModel(orbtab[rBottomBarStyler.healthorb].anim) 184 hglow1:SetModel(orbtab[rBottomBarStyler.healthorb].anim)
187 hglow1:SetModelScale(orbtab[rBottomBarStyler.healthorb].scale) 185 hglow1:SetModelScale(orbtab[rBottomBarStyler.healthorb].scale)
188 hglow1:SetPosition(orbtab[rBottomBarStyler.healthorb].z, orbtab[rBottomBarStyler.healthorb].x, orbtab[rBottomBarStyler.healthorb].y) 186 hglow1:SetPosition(orbtab[rBottomBarStyler.healthorb].z, orbtab[rBottomBarStyler.healthorb].x, orbtab[rBottomBarStyler.healthorb].y)
189 hglow2:SetModel(orbtab[rBottomBarStyler.healthorb].anim) 187 hglow2:SetModel(orbtab[rBottomBarStyler.healthorb].anim)
190 hglow2:SetModelScale(orbtab[rBottomBarStyler.healthorb].scale) 188 hglow2:SetModelScale(orbtab[rBottomBarStyler.healthorb].scale)
191 hglow2:SetPosition(orbtab[rBottomBarStyler.healthorb].z, orbtab[rBottomBarStyler.healthorb].x, orbtab[rBottomBarStyler.healthorb].y+1) 189 hglow2:SetPosition(orbtab[rBottomBarStyler.healthorb].z, orbtab[rBottomBarStyler.healthorb].x, orbtab[rBottomBarStyler.healthorb].y+1)
192 end 190 end
193 191
194 local function set_the_mglows() 192 local function set_the_mglows()
195 mfill:SetVertexColor(orbtab[rBottomBarStyler.manaorb].r,orbtab[rBottomBarStyler.manaorb].g,orbtab[rBottomBarStyler.manaorb].b) 193 mfill:SetVertexColor(orbtab[rBottomBarStyler.manaorb].r,orbtab[rBottomBarStyler.manaorb].g,orbtab[rBottomBarStyler.manaorb].b)
196 mglow1:SetModel(orbtab[rBottomBarStyler.manaorb].anim) 194 mglow1:SetModel(orbtab[rBottomBarStyler.manaorb].anim)
197 mglow1:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale) 195 mglow1:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale)
198 mglow1:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y) 196 mglow1:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y)
199 mglow2:SetModel(orbtab[rBottomBarStyler.manaorb].anim) 197 mglow2:SetModel(orbtab[rBottomBarStyler.manaorb].anim)
200 mglow2:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale) 198 mglow2:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale)
201 mglow2:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y+1) 199 mglow2:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y+1)
202 end 200 end
203 201
204 local function set_the_shapeshift_mglows() 202 local function set_the_shapeshift_mglows()
205 local st = GetShapeshiftForm() 203 local st = GetShapeshiftForm()
206 if st ~= save_dudustance then 204 if st ~= save_dudustance then
207 mfill:SetVertexColor(orbtab[rBottomBarStyler.manaorb].r,orbtab[rBottomBarStyler.manaorb].g,orbtab[rBottomBarStyler.manaorb].b) 205 mfill:SetVertexColor(orbtab[rBottomBarStyler.manaorb].r,orbtab[rBottomBarStyler.manaorb].g,orbtab[rBottomBarStyler.manaorb].b)
208 mglow1:SetModel(orbtab[rBottomBarStyler.manaorb].anim) 206 mglow1:SetModel(orbtab[rBottomBarStyler.manaorb].anim)
209 mglow1:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale) 207 mglow1:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale)
210 mglow1:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y) 208 mglow1:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y)
211 mglow2:SetModel(orbtab[rBottomBarStyler.manaorb].anim) 209 mglow2:SetModel(orbtab[rBottomBarStyler.manaorb].anim)
212 mglow2:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale) 210 mglow2:SetModelScale(orbtab[rBottomBarStyler.manaorb].scale)
213 mglow2:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y+1) 211 mglow2:SetPosition(orbtab[rBottomBarStyler.manaorb].z, orbtab[rBottomBarStyler.manaorb].x, orbtab[rBottomBarStyler.manaorb].y+1)
214 save_dudustance = st 212 save_dudustance = st
215 end 213 end
216 end 214 end
217 215
218 ------------------------------------------------------ 216 ------------------------------------------------------
219 -- / CREATE ME A ORB GLOW FUNC / -- 217 -- / CREATE ME A ORB GLOW FUNC / --
220 ------------------------------------------------------ 218 ------------------------------------------------------
221 219
222 local function create_me_a_orb_glow(f,useorb,pos) 220 local function create_me_a_orb_glow(f,useorb,pos)
223 local glow = CreateFrame("PlayerModel", nil, f) 221 local glow = CreateFrame("PlayerModel", nil, f)
224 glow:SetFrameStrata("BACKGROUND") 222 glow:SetFrameStrata("BACKGROUND")
223 glow:SetFrameLevel(5)
225 glow:SetAllPoints(f) 224 glow:SetAllPoints(f)
226 glow:SetModel(orbtab[useorb].anim) 225 glow:SetModel(orbtab[useorb].anim)
227 glow:SetModelScale(orbtab[useorb].scale) 226 glow:SetModelScale(orbtab[useorb].scale)
228 glow:SetPosition(orbtab[useorb].z, orbtab[useorb].x, orbtab[useorb].y+pos) 227 glow:SetPosition(orbtab[useorb].z, orbtab[useorb].x, orbtab[useorb].y+pos)
229 glow:SetAlpha(1/fog_smoother) 228 glow:SetAlpha(1/fog_smoother)
230 glow:SetScript("OnShow",function() 229 glow:SetScript("OnShow",function()
231 glow:SetModel(orbtab[useorb].anim) 230 glow:SetModel(orbtab[useorb].anim)
232 glow:SetModelScale(orbtab[useorb].scale) 231 glow:SetModelScale(orbtab[useorb].scale)
233 glow:SetPosition(orbtab[useorb].z, orbtab[useorb].x, orbtab[useorb].y+pos) 232 glow:SetPosition(orbtab[useorb].z, orbtab[useorb].x, orbtab[useorb].y+pos)
234 end) 233 end)
235 return glow 234 return glow
236 end 235 end
237 236
238 ------------------------------------------------------ 237 ------------------------------------------------------
239 -- / CREATE ME A FRAME FUNC / -- 238 -- / CREATE ME A FRAME FUNC / --
240 ------------------------------------------------------ 239 ------------------------------------------------------
241 240
242 local function create_me_a_frame(fart,fname,fparent,fstrata,fwidth,fheight,fanchor,fxpos,fypos,fscale,fdrag,finherit) 241 local function create_me_a_frame(fart,fname,fparent,fstrata,flevel,fwidth,fheight,fanchor,fxpos,fypos,fscale,fdrag,finherit)
243 -- PARENT, BACKGROUND, LOW, MEDIUM, HIGH, DIALOG, FULLSCREEN, FULLSCREEN_DIALOG, TOOLTIP 242 -- PARENT, BACKGROUND, LOW, MEDIUM, HIGH, DIALOG, FULLSCREEN, FULLSCREEN_DIALOG, TOOLTIP
244 local f = CreateFrame(fart,fname,fparent,finherit) 243 local f = CreateFrame(fart,fname,fparent,finherit)
245 f:SetFrameStrata(fstrata) 244 f:SetFrameStrata(fstrata)
245 f:SetFrameLevel(flevel)
246 f:SetWidth(fwidth) 246 f:SetWidth(fwidth)
247 f:SetHeight(fheight) 247 f:SetHeight(fheight)
248 if fname == "rBBS_Holder" then 248 if fname == "rBBS_Holder" then
249 if rBottomBarStyler.point and rBottomBarStyler.posx and rBottomBarStyler.posy then 249 if rBottomBarStyler.point and rBottomBarStyler.posx and rBottomBarStyler.posy then
250 f:SetPoint(rBottomBarStyler.point,rBottomBarStyler.posx,rBottomBarStyler.posy) 250 f:SetPoint(rBottomBarStyler.point,rBottomBarStyler.posx,rBottomBarStyler.posy)
251 else 251 else
252 f:SetPoint(fanchor,fxpos,fypos) 252 f:SetPoint(fanchor,fxpos,fypos)
253 end 253 end
254 else 254 else
255 f:SetPoint(fanchor,fxpos,fypos) 255 f:SetPoint(fanchor,fxpos,fypos)
256 end 256 end
257 f:SetScale(fscale) 257 f:SetScale(fscale)
258 if fdrag == true then 258 if fdrag == true then
259 f:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 259 f:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
260 end 260 end
261 return f 261 return f
262 end 262 end
263 263
264 ------------------------------------------------------ 264 ------------------------------------------------------
265 -- / CREATE ME A TEXTURE FUNC / -- 265 -- / CREATE ME A TEXTURE FUNC / --
266 ------------------------------------------------------ 266 ------------------------------------------------------
267 267
268 local function create_me_a_texture(fhooked,tstrata,tfile,tspecial) 268 local function create_me_a_texture(fhooked,tstrata,tfile,tspecial)
269 -- BACKGROUND, BORDER, ARTWORK, OVERLAY, HIGHLIGHT 269 -- BACKGROUND, BORDER, ARTWORK, OVERLAY, HIGHLIGHT
270 local t = fhooked:CreateTexture(nil,tstrata) 270 local t = fhooked:CreateTexture(nil,tstrata)
271 t:SetTexture(tfile) 271 t:SetTexture(tfile)
272 if tspecial == "fill" then 272 if tspecial == "fill" then
273 t:SetPoint("BOTTOM",fhooked,"BOTTOM",0,0) 273 t:SetPoint("BOTTOM",fhooked,"BOTTOM",0,0)
274 t:SetWidth(fhooked:GetWidth()) 274 t:SetWidth(fhooked:GetWidth())
275 t:SetHeight(fhooked:GetHeight()) 275 t:SetHeight(fhooked:GetHeight())
276 else 276 else
277 t:SetAllPoints(fhooked) 277 t:SetAllPoints(fhooked)
278 end 278 end
279 return t 279 return t
280 end 280 end
281 281
282 ------------------------------------------------------ 282 ------------------------------------------------------
283 -- / DO FORMAT / -- 283 -- / DO FORMAT / --
284 ------------------------------------------------------ 284 ------------------------------------------------------
285 285
286 local function do_format(v) 286 local function do_format(v)
287 local string = "" 287 local string = ""
288 if v > 1000000 then 288 if v > 1000000 then
289 string = (floor((v/1000000)*10)/10).."m" 289 string = (floor((v/1000000)*10)/10).."m"
290 elseif v > 1000 then 290 elseif v > 1000 then
291 string = (floor((v/1000)*10)/10).."k" 291 string = (floor((v/1000)*10)/10).."k"
292 else 292 else
293 string = v 293 string = v
294 end 294 end
295 return string 295 return string
296 end 296 end
297 297
298 ------------------------------------------------------ 298 ------------------------------------------------------
299 -- / ORB HEALTH FUNC / -- 299 -- / ORB HEALTH FUNC / --
300 ------------------------------------------------------ 300 ------------------------------------------------------
301 301
302 local function orbhealth(orb1,orb1_fill,glow1,glow2,orbtext1,orbtext2) 302 local function orbhealth(orb1,orb1_fill,glow1,glow2,orbtext1,orbtext2)
303 orb1:SetScript("OnEvent", function(self, event, arg1, ...) 303 orb1:SetScript("OnEvent", function(self, event, arg1, ...)
304 if arg1 == "player" or event == "PLAYER_ENTERING_WORLD" then 304 if arg1 == "player" or event == "PLAYER_ENTERING_WORLD" then
305 local uh, uhm = UnitHealth("player"), UnitHealthMax("player") 305 local uh, uhm = UnitHealth("player"), UnitHealthMax("player")
306 local perc = floor(uh/uhm*100) 306 local perc = floor(uh/uhm*100)
307 local nuh = do_format(uh) 307 local nuh = do_format(uh)
308 local nuhm = do_format(uhm) 308 local nuhm = do_format(uhm)
309 orbtext1:SetText(perc) 309 orbtext1:SetText(perc)
310 if text_display == 1 then 310 if text_display == 1 then
311 orbtext2:SetText(nuh) 311 orbtext2:SetText(nuh)
312 else 312 else
313 orbtext2:SetText(nuh.."/"..nuhm) 313 orbtext2:SetText(nuh.."/"..nuhm)
314 end 314 end
315 orb1_fill:SetHeight((uh/uhm) * orb1_fill:GetWidth()) 315 orb1_fill:SetHeight((uh/uhm) * orb1_fill:GetWidth())
316 orb1_fill:SetTexCoord(0,1, math.abs(uh/uhm - 1),1) 316 orb1_fill:SetTexCoord(0,1, math.abs(uh/uhm - 1),1)
317 glow1:SetAlpha((uh / uhm)/fog_smoother) 317 glow1:SetAlpha((uh / uhm)/fog_smoother)
318 glow2:SetAlpha((uh / uhm)/fog_smoother) 318 glow2:SetAlpha((uh / uhm)/fog_smoother)
319 end 319 end
320 end) 320 end)
321 orb1:RegisterEvent("UNIT_HEALTH") 321 orb1:RegisterEvent("UNIT_HEALTH")
322 orb1:RegisterEvent("PLAYER_ENTERING_WORLD") 322 orb1:RegisterEvent("PLAYER_ENTERING_WORLD")
323 end 323 end
324 324
325 ------------------------------------------------------ 325 ------------------------------------------------------
326 -- / ORB MANA FUNC / -- 326 -- / ORB MANA FUNC / --
327 ------------------------------------------------------ 327 ------------------------------------------------------
328 328
329 local function orbmana(orb2,orb2_fill,glow1,glow2,orbtext1,orbtext2) 329 local function orbmana(orb2,orb2_fill,glow1,glow2,orbtext1,orbtext2)
330 orb2:SetScript("OnEvent", function(self, event, arg1, ...) 330 orb2:SetScript("OnEvent", function(self, event, arg1, ...)
331 if arg1 == "player" or event == "PLAYER_ENTERING_WORLD" then 331 if arg1 == "player" or event == "PLAYER_ENTERING_WORLD" then
332 local um, umm = UnitMana("player"), UnitManaMax("player") 332 local um, umm = UnitMana("player"), UnitManaMax("player")
333 local perc = floor(um/umm*100) 333 local perc = floor(um/umm*100)
334 local nuh = do_format(um) 334 local nuh = do_format(um)
335 local nuhm = do_format(umm) 335 local nuhm = do_format(umm)
336 local _, class = UnitClass("player") 336 local _, class = UnitClass("player")
337 local shape = GetShapeshiftForm() 337 local shape = GetShapeshiftForm()
338 if text_display == 1 then 338 if text_display == 1 then
339 if class == "WARRIOR" or (class == "DRUID" and shape == 3) or (class == "DRUID" and shape == 1) or class == "DEATHKNIGHT" or class == "ROGUE" then 339 if class == "WARRIOR" or (class == "DRUID" and shape == 3) or (class == "DRUID" and shape == 1) or class == "DEATHKNIGHT" or class == "ROGUE" then
340 orbtext1:SetText(nuh) 340 orbtext1:SetText(nuh)
341 orbtext2:SetText(perc) 341 orbtext2:SetText(perc)
342 else 342 else
343 orbtext1:SetText(perc) 343 orbtext1:SetText(perc)
344 orbtext2:SetText(nuh) 344 orbtext2:SetText(nuh)
345 end 345 end
346 else 346 else
347 orbtext1:SetText(perc) 347 orbtext1:SetText(perc)
348 orbtext2:SetText(nuh.."/"..nuhm) 348 orbtext2:SetText(nuh.."/"..nuhm)
349 end 349 end
350 orb2_fill:SetHeight((um/umm) * orb2_fill:GetWidth()) 350 orb2_fill:SetHeight((um/umm) * orb2_fill:GetWidth())
351 orb2_fill:SetTexCoord(0,1, math.abs(um/umm - 1),1) 351 orb2_fill:SetTexCoord(0,1, math.abs(um/umm - 1),1)
352 glow1:SetAlpha((um / umm)/fog_smoother) 352 glow1:SetAlpha((um / umm)/fog_smoother)
353 glow2:SetAlpha((um / umm)/fog_smoother) 353 glow2:SetAlpha((um / umm)/fog_smoother)
354 end 354 end
355 end) 355 end)
356 orb2:RegisterEvent("UNIT_MANA") 356 orb2:RegisterEvent("UNIT_MANA")
357 orb2:RegisterEvent("UNIT_RAGE") 357 orb2:RegisterEvent("UNIT_RAGE")
358 orb2:RegisterEvent("UNIT_ENERGY") 358 orb2:RegisterEvent("UNIT_ENERGY")
359 orb2:RegisterEvent("UNIT_FOCUS") 359 orb2:RegisterEvent("UNIT_FOCUS")
360 orb2:RegisterEvent("UNIT_RUNIC_POWER") 360 orb2:RegisterEvent("UNIT_RUNIC_POWER")
361 orb2:RegisterEvent("PLAYER_ENTERING_WORLD") 361 orb2:RegisterEvent("PLAYER_ENTERING_WORLD")
362 end 362 end
363 363
364 ------------------------------------------------------ 364 ------------------------------------------------------
365 -- / SET ME A FONT / -- 365 -- / SET ME A FONT / --
366 ------------------------------------------------------ 366 ------------------------------------------------------
367 367
368 local function set_me_a_font(f, font, size, style) 368 local function set_me_a_font(f, font, size, style)
369 local fs = f:CreateFontString(nil, "OVERLAY") 369 local fs = f:CreateFontString(nil, "OVERLAY")
370 fs:SetFont(font, size, style) 370 fs:SetFont(font, size, style)
371 fs:SetShadowColor(0,0,0,1) 371 fs:SetShadowColor(0,0,0,1)
372 return fs 372 return fs
373 end 373 end
374 374
375 ------------------------------------------------------ 375 ------------------------------------------------------
376 -- / CREATE ORB FUNC / -- 376 -- / CREATE ORB FUNC / --
377 ------------------------------------------------------ 377 ------------------------------------------------------
378 378
379 local function create_orb(orbtype,orbsize,orbanchorframe,orbpoint,orbposx,orbposy,orbscale,orbfilltex,useorb) 379 local function create_orb(orbtype,orbsize,orbanchorframe,orbpoint,orbposx,orbposy,orbscale,orbfilltex,useorb)
380 --create the player frame 380 --create the player frame
381 local orb1 = create_me_a_frame("Button",nil,orbanchorframe,"BACKGROUND",orbsize,orbsize,orbpoint,orbposx,orbposy,orbscale,nil,"SecureUnitButtonTemplate") 381 local orb1 = create_me_a_frame("Button",nil,orbanchorframe,"BACKGROUND",4,orbsize,orbsize,orbpoint,orbposx,orbposy,orbscale,nil,"SecureUnitButtonTemplate")
382 orb1:RegisterForClicks("AnyUp") 382 orb1:RegisterForClicks("AnyUp")
383 orb1:SetAttribute("unit", "player") 383 orb1:SetAttribute("unit", "player")
384 orb1:SetAttribute("*type1", "target") 384 orb1:SetAttribute("*type1", "target")
385 local showmenu = function() 385 local showmenu = function()
386 ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "cursor", 0, 0) 386 ToggleDropDownMenu(1, nil, PlayerFrameDropDown, "cursor", 0, 0)
387 end 387 end
388 orb1.showmenu = showmenu 388 orb1.showmenu = showmenu
389 orb1.unit = "player" 389 orb1.unit = "player"
390 orb1:SetAttribute("*type2", "showmenu") 390 orb1:SetAttribute("*type2", "showmenu")
391 orb1:SetScript("OnEnter", UnitFrame_OnEnter) 391 orb1:SetScript("OnEnter", UnitFrame_OnEnter)
392 orb1:SetScript("OnLeave", UnitFrame_OnLeave) 392 orb1:SetScript("OnLeave", UnitFrame_OnLeave)
393 393
394 local orb1_back = create_me_a_texture(orb1,"BORDER","Interface\\AddOns\\rBottomBarStyler\\orbtex\\orb_back2") 394 local orb1_back = create_me_a_texture(orb1,"BORDER","Interface\\AddOns\\rBottomBarStyler\\orbtex\\orb_back2")
395 local orb1_fill = create_me_a_texture(orb1,"ARTWORK","Interface\\AddOns\\rBottomBarStyler\\orbtex\\"..orbfilltex,"fill") 395 local orb1_fill = create_me_a_texture(orb1,"ARTWORK","Interface\\AddOns\\rBottomBarStyler\\orbtex\\"..orbfilltex,"fill")
396 --glows 396 --glows
397 local glow1, glow2 397 local glow1, glow2
398 if orbtype == "life" then 398 if orbtype == "life" then
399 orb1_fill:SetVertexColor(orbtab[useorb].r,orbtab[useorb].g,orbtab[useorb].b) 399 orb1_fill:SetVertexColor(orbtab[useorb].r,orbtab[useorb].g,orbtab[useorb].b)
400 hfill = orb1_fill 400 hfill = orb1_fill
401 glow1 = create_me_a_orb_glow(orb1,useorb,0) 401 glow1 = create_me_a_orb_glow(orb1,useorb,0)
402 glow2 = create_me_a_orb_glow(orb1,useorb,1) 402 glow2 = create_me_a_orb_glow(orb1,useorb,1)
403 hglow1 = glow1 403 hglow1 = glow1
404 hglow2 = glow2 404 hglow2 = glow2
405 else 405 else
406 orb1_fill:SetVertexColor(orbtab[useorb].r,orbtab[useorb].g,orbtab[useorb].b) 406 orb1_fill:SetVertexColor(orbtab[useorb].r,orbtab[useorb].g,orbtab[useorb].b)
407 mfill = orb1_fill 407 mfill = orb1_fill
408 glow1 = create_me_a_orb_glow(orb1,useorb,0) 408 glow1 = create_me_a_orb_glow(orb1,useorb,0)
409 glow2 = create_me_a_orb_glow(orb1,useorb,1) 409 glow2 = create_me_a_orb_glow(orb1,useorb,1)
410 mglow1 = glow1 410 mglow1 = glow1
411 mglow2 = glow2 411 mglow2 = glow2
412 end 412 end
413 local orb1_glossholder = create_me_a_frame("Frame",nil,orb1,"LOW",orbsize,orbsize,"BOTTOM",0,0,1) 413 local orb1_glossholder = create_me_a_frame("Frame",nil,orb1,"BACKGROUND",7,orbsize,orbsize,"BOTTOM",0,0,1)
414 local orb1_gloss = create_me_a_texture(orb1_glossholder,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\orbtex\\orb_gloss") 414 local orb1_gloss = create_me_a_texture(orb1_glossholder,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\orbtex\\orb_gloss")
415 local orbtext1 = set_me_a_font(orb1_glossholder, default_font, orbsize/5, "THINOUTLINE") 415 local orbtext1 = set_me_a_font(orb1_glossholder, default_font, orbsize/5, "THINOUTLINE")
416 orbtext1:SetPoint("CENTER", 0, (orbsize/12)) 416 orbtext1:SetPoint("CENTER", 0, (orbsize/12))
417 orbtext1:SetTextColor(1,1,1) 417 orbtext1:SetTextColor(1,1,1)
418 local orbtext2 = set_me_a_font(orb1_glossholder, default_font, orbsize/8.5, "THINOUTLINE") 418 local orbtext2 = set_me_a_font(orb1_glossholder, default_font, orbsize/8.5, "THINOUTLINE")
419 orbtext2:SetPoint("CENTER", 0, -(orbsize/12)) 419 orbtext2:SetPoint("CENTER", 0, -(orbsize/12))
420 orbtext2:SetTextColor(0.6,0.6,0.6) 420 orbtext2:SetTextColor(0.6,0.6,0.6)
421 if orbtype == "life" then 421 if orbtype == "life" then
422 orbhealth(orb1,orb1_fill,glow1,glow2,orbtext1,orbtext2) 422 orbhealth(orb1,orb1_fill,glow1,glow2,orbtext1,orbtext2)
423 else 423 else
424 orbmana(orb1,orb1_fill,glow1,glow2,orbtext1,orbtext2) 424 orbmana(orb1,orb1_fill,glow1,glow2,orbtext1,orbtext2)
425 --druid mana color on stance 425 --druid mana color on stance
426 local _, pt = UnitClass("player") 426 local _, pt = UnitClass("player")
427 if pt == "DRUID" then 427 if pt == "DRUID" then
428 orb1_glossholder:RegisterEvent("UPDATE_SHAPESHIFT_FORM") 428 orb1_glossholder:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
429 orb1_glossholder:RegisterEvent("PLAYER_LOGIN")
429 orb1_glossholder:SetScript("OnEvent", function(self,event) 430 orb1_glossholder:SetScript("OnEvent", function(self,event)
430 if event == "UPDATE_SHAPESHIFT_FORM" then 431 if event == "UPDATE_SHAPESHIFT_FORM" then
431 set_automana() 432 set_automana()
432 set_the_shapeshift_mglows() 433 set_the_shapeshift_mglows()
433 end 434 end
434 end) 435 end)
435 end 436 end
436 end 437 end
437 end 438 end
438 439
439 ------------------------------------------------------ 440 ------------------------------------------------------
440 -- / SET ME A SCALE / -- 441 -- / SET ME A SCALE / --
441 ------------------------------------------------------ 442 ------------------------------------------------------
442 443
443 local function set_me_a_scale() 444 local function set_me_a_scale()
444 frame_to_scale:SetScale(rBottomBarStyler.scalevalue) 445 frame_to_scale:SetScale(rBottomBarStyler.scalevalue)
445 end 446 end
446 447
447 ------------------------------------------------------ 448 ------------------------------------------------------
448 -- / SET ME A BAR / -- 449 -- / SET ME A BAR / --
449 ------------------------------------------------------ 450 ------------------------------------------------------
450 451
451 local function set_me_a_bar() 452 local function set_me_a_bar()
452 if rBottomBarStyler.artvalue == "roth" then 453 if rBottomBarStyler.artvalue == "roth" then
453 bar_to_show:SetTexture("Interface\\AddOns\\rBottomBarStyler\\rothtex\\"..rBottomBarStyler.barvalue) 454 bar_to_show:SetTexture("Interface\\AddOns\\rBottomBarStyler\\rothtex\\"..rBottomBarStyler.barvalue)
454 else 455 else
455 am("Does only work for roth layout") 456 am("Does only work for roth layout")
456 end 457 end
457 end 458 end
458 459
459 ------------------------------------------------------ 460 ------------------------------------------------------
460 -- / CREATE D1 STYLE / -- 461 -- / CREATE D1 STYLE / --
461 ------------------------------------------------------ 462 ------------------------------------------------------
462 local function create_d1_style(scale) 463 local function create_d1_style(scale)
463 --holder 464 --holder
464 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",100,100,"BOTTOM",0,0,scale) 465 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",1,100,100,"BOTTOM",0,0,scale)
465 frame_to_scale = holder 466 frame_to_scale = holder
466 --bar texture 467 --bar texture
467 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",1024,256,"BOTTOM",0,0,1) 468 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",2,1024,256,"BOTTOM",0,0,1)
468 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d1tex\\bar") 469 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d1tex\\bar")
469 --orbs 470 --orbs
470 create_orb("life",160,holder,"BOTTOM",-290,120,1,"orb_filling4",rBottomBarStyler.healthorb) 471 create_orb("life",160,holder,"BOTTOM",-290,120,1,"orb_filling4",rBottomBarStyler.healthorb)
471 create_orb("mana",160,holder,"BOTTOM",285,120,1,"orb_filling4",rBottomBarStyler.manaorb) 472 create_orb("mana",160,holder,"BOTTOM",285,120,1,"orb_filling4",rBottomBarStyler.manaorb)
472 --left figure 473 --left figure
473 local lefty = create_me_a_frame("Frame",nil,holder,"MEDIUM",256,256,"BOTTOM",-320,35,0.9) 474 local lefty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",-320,35,0.9)
474 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d1tex\\figure_left") 475 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d1tex\\figure_left")
475 --right figure 476 --right figure
476 local righty = create_me_a_frame("Frame",nil,holder,"MEDIUM",256,256,"BOTTOM",320,35,0.9) 477 local righty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",320,35,0.9)
477 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d1tex\\figure_right") 478 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d1tex\\figure_right")
478 --dragframe 479 --dragframe
479 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",100,100,"BOTTOM",0,0,scale,true) 480 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",1,100,100,"BOTTOM",0,0,scale,true)
480 frame_to_drag = dragframe 481 frame_to_drag = dragframe
481 end 482 end
482 483
483 ------------------------------------------------------ 484 ------------------------------------------------------
484 -- / CREATE D2 STYLE / -- 485 -- / CREATE D2 STYLE / --
485 ------------------------------------------------------ 486 ------------------------------------------------------
486 local function create_d2_style(scale) 487 local function create_d2_style(scale)
487 --holder 488 --holder
488 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",100,100,"BOTTOM",0,0,scale) 489 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",1,100,100,"BOTTOM",0,0,scale)
489 frame_to_scale = holder 490 frame_to_scale = holder
490 --bar texture 491 --bar texture
491 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",1024,128,"BOTTOM",0,44,1) 492 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",8,1024,128,"BOTTOM",0,44,1)
492 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d2tex\\bar") 493 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d2tex\\bar")
493 --border 494 --border
494 local border_left = create_me_a_frame("Frame",nil,holder,"BACKGROUND",1024,512,"BOTTOMRIGHT",0,0,1) 495 local border_left = create_me_a_frame("Frame",nil,holder,"BACKGROUND",3,1024,512,"BOTTOMRIGHT",-40,0,1)
495 local border_left_tex = create_me_a_texture(border_left,"BORDER","Interface\\AddOns\\rBottomBarStyler\\d2tex\\border_left") 496 local border_left_tex = create_me_a_texture(border_left,"BORDER","Interface\\AddOns\\rBottomBarStyler\\d2tex\\border_left")
496 local border_right = create_me_a_frame("Frame",nil,holder,"BACKGROUND",1024,512,"BOTTOMLEFT",0,0,1) 497 local border_right = create_me_a_frame("Frame",nil,holder,"BACKGROUND",3,1024,512,"BOTTOMLEFT",40,0,1)
497 local border_right_tex = create_me_a_texture(border_right,"BORDER","Interface\\AddOns\\rBottomBarStyler\\d2tex\\border_right") 498 local border_right_tex = create_me_a_texture(border_right,"BORDER","Interface\\AddOns\\rBottomBarStyler\\d2tex\\border_right")
498 --orbs 499 --orbs
499 create_orb("life",160,holder,"BOTTOM",-472,55,1,"orb_filling4",rBottomBarStyler.healthorb) 500 create_orb("life",160,holder,"BOTTOM",-472,55,1,"orb_filling4",rBottomBarStyler.healthorb)
500 create_orb("mana",160,holder,"BOTTOM",465,55,1,"orb_filling4",rBottomBarStyler.manaorb) 501 create_orb("mana",160,holder,"BOTTOM",465,55,1,"orb_filling4",rBottomBarStyler.manaorb)
501 --left figure 502 --left figure
502 local lefty = create_me_a_frame("Frame",nil,holder,"MEDIUM",256,256,"BOTTOM",-453,44,1) 503 local lefty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",-453,44,1)
503 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d2tex\\figure_left") 504 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d2tex\\figure_left")
504 --right figure 505 --right figure
505 local righty = create_me_a_frame("Frame",nil,holder,"MEDIUM",256,256,"BOTTOM",453,44,1) 506 local righty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",453,44,1)
506 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d2tex\\figure_right") 507 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d2tex\\figure_right")
507 --dragframe 508 --dragframe
508 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",100,100,"BOTTOM",0,0,scale,true) 509 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",1,100,100,"BOTTOM",0,0,scale,true)
509 frame_to_drag = dragframe 510 frame_to_drag = dragframe
510 end 511 end
511 512
512 ------------------------------------------------------ 513 ------------------------------------------------------
513 -- / CREATE D3 STYLE / -- 514 -- / CREATE D3 STYLE / --
514 ------------------------------------------------------ 515 ------------------------------------------------------
515 local function create_d3_style(scale) 516 local function create_d3_style(scale)
516 --holder 517 --holder
517 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",100,100,"BOTTOM",0,0,scale) 518 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",1,100,100,"BOTTOM",0,0,scale)
518 frame_to_scale = holder 519 frame_to_scale = holder
519 --bar texture 520 --bar texture
520 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",1024,128,"BOTTOM",0,0,1) 521 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",2,1024,256,"BOTTOM",0,0,1)
521 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d3tex\\bar") 522 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d3tex\\bar")
522 --orbs 523 --orbs
523 create_orb("life",200,holder,"BOTTOM",-471,-3,1,"orb_filling4",rBottomBarStyler.healthorb) 524 create_orb("life",200,holder,"BOTTOM",-471,-3,1,"orb_filling4",rBottomBarStyler.healthorb)
524 create_orb("mana",200,holder,"BOTTOM",471,-3,1,"orb_filling4",rBottomBarStyler.manaorb) 525 create_orb("mana",200,holder,"BOTTOM",471,-3,1,"orb_filling4",rBottomBarStyler.manaorb)
526 --xp
527 local xpholder = create_me_a_frame("Frame",nil,holder,"BACKGROUND",7,1024,32,"BOTTOM",0,104,1)
528 local xpholder_tex = create_me_a_texture(xpholder,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d3tex\\xpbar")
525 --left figure 529 --left figure
526 local lefty = create_me_a_frame("Frame",nil,holder,"MEDIUM",512,256,"BOTTOM",-470,0,1) 530 local lefty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,512,256,"BOTTOM",-461,0,1)
527 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d3tex\\figure_left") 531 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d3tex\\figure_left")
528 --right figure 532 --right figure
529 local righty = create_me_a_frame("Frame",nil,holder,"MEDIUM",512,256,"BOTTOM",470,0,1) 533 local righty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,512,256,"BOTTOM",464,0,1)
530 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d3tex\\figure_right") 534 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\d3tex\\figure_right")
531 --dragframe 535 --dragframe
532 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",100,100,"BOTTOM",0,0,scale,true) 536 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",1,100,100,"BOTTOM",0,0,scale,true)
533 frame_to_drag = dragframe 537 frame_to_drag = dragframe
534 end 538 end
535 539
536 ------------------------------------------------------ 540 ------------------------------------------------------
537 -- / CREATE ROTH STYLE / -- 541 -- / CREATE ROTH STYLE / --
538 ------------------------------------------------------ 542 ------------------------------------------------------
539 local function create_roth_style(scale) 543 local function create_roth_style(scale)
540 --holder 544 --holder
541 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",100,100,"BOTTOM",0,0,scale) 545 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",1,100,100,"BOTTOM",0,0,scale)
542 frame_to_scale = holder 546 frame_to_scale = holder
543 --bar texture 547 --bar texture
544 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",512,256,"BOTTOM",0,0,1) 548 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",2,512,256,"BOTTOM",0,0,1)
545 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\"..rBottomBarStyler.barvalue) 549 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\"..rBottomBarStyler.barvalue)
546 bar_to_show = bar_tex 550 bar_to_show = bar_tex
547 --orbs 551 --orbs
548 create_orb("life",140,holder,"BOTTOM",-255,-8,1,"orb_filling4",rBottomBarStyler.healthorb) 552 create_orb("life",140,holder,"BOTTOM",-255,-8,1,"orb_filling4",rBottomBarStyler.healthorb)
549 create_orb("mana",140,holder,"BOTTOM",250,-8,1,"orb_filling4",rBottomBarStyler.manaorb) 553 create_orb("mana",140,holder,"BOTTOM",250,-8,1,"orb_filling4",rBottomBarStyler.manaorb)
550 --bottom 554 --bottom
551 local bottom = create_me_a_frame("Frame",nil,holder,"MEDIUM",510,110,"BOTTOM",0,-10,1) 555 local bottom = create_me_a_frame("Frame",nil,holder,"BACKGROUND",9,510,110,"BOTTOM",0,-10,1)
552 local bottom_tex = create_me_a_texture(bottom,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\bottom") 556 local bottom_tex = create_me_a_texture(bottom,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\bottom")
553 --left figure 557 --left figure
554 local lefty = create_me_a_frame("Frame",nil,holder,"MEDIUM",256,256,"BOTTOM",-530,0,0.6) 558 local lefty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",-530,0,0.6)
555 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\figure_left") 559 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\figure_left")
556 --right figure 560 --right figure
557 local righty = create_me_a_frame("Frame",nil,holder,"MEDIUM",256,256,"BOTTOM",520,0,0.6) 561 local righty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",520,0,0.6)
558 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\figure_right") 562 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\rothtex\\figure_right")
559 --dragframe 563 --dragframe
560 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",100,100,"BOTTOM",0,0,scale,true) 564 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",1,100,100,"BOTTOM",0,0,scale,true)
561 frame_to_drag = dragframe 565 frame_to_drag = dragframe
562 end 566 end
563 567
568 ------------------------------------------------------
569 -- / CREATE AION STYLE / --
570 ------------------------------------------------------
571 local function create_aion_style(scale)
572 --holder
573 local holder = create_me_a_frame("Frame","rBBS_Holder",UIParent,"BACKGROUND",1,100,100,"BOTTOM",0,0,scale)
574 frame_to_scale = holder
575 --bar texture
576 local bar = create_me_a_frame("Frame",nil,holder,"BACKGROUND",2,512,128,"BOTTOM",0,10,1)
577 local bar_tex = create_me_a_texture(bar,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\aiontex\\bar")
578 --orbs
579 create_orb("life",125,holder,"BOTTOM",-245,20,1,"orb_filling4",rBottomBarStyler.healthorb)
580 create_orb("mana",125,holder,"BOTTOM",245,20,1,"orb_filling4",rBottomBarStyler.manaorb)
581 --left figure
582 local lefty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",-250,-40,1)
583 local lefty_tex = create_me_a_texture(lefty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\aiontex\\figure_left")
584 --right figure
585 local righty = create_me_a_frame("Frame",nil,holder,"BACKGROUND",10,256,256,"BOTTOM",250,-40,1)
586 local righty_tex = create_me_a_texture(righty,"BACKGROUND","Interface\\AddOns\\rBottomBarStyler\\aiontex\\figure_right")
587 --dragframe
588 local dragframe = create_me_a_frame("Frame",nil,holder,"TOOLTIP",1,100,100,"BOTTOM",0,0,scale,true)
589 frame_to_drag = dragframe
590 end
591
564 ------------------------------------------------------ 592 ------------------------------------------------------
565 -- / LOAD STYLE FUNC / -- 593 -- / LOAD STYLE FUNC / --
566 ------------------------------------------------------ 594 ------------------------------------------------------
567 595
568 local function load_style(style,scale) 596 local function load_style(style,scale)
569 if style == "roth" then 597 if style == "roth" then
570 create_roth_style(scale) 598 create_roth_style(scale)
571 elseif style == "d1" then 599 elseif style == "d1" then
572 create_d1_style(scale) 600 create_d1_style(scale)
573 elseif style == "d2" then 601 elseif style == "d2" then
574 create_d2_style(scale) 602 create_d2_style(scale)
603 elseif style == "aion" then
604 create_aion_style(scale)
575 else 605 else
576 create_d3_style(scale) 606 create_d3_style(scale)
577 end 607 end
578 end 608 end
579 609
580 ------------------------------------------------------ 610 ------------------------------------------------------
581 -- / SLASH FUNC / -- 611 -- / SLASH FUNC / --
582 ------------------------------------------------------ 612 ------------------------------------------------------
583 613
584 local function SlashCmd(cmd) 614 local function SlashCmd(cmd)
585 --setscale 615 --setscale
586 if (cmd:match"setscale") then 616 if (cmd:match"setscale") then
587 local a,b = strfind(cmd, " "); 617 local a,b = strfind(cmd, " ");
588 if b then 618 if b then
589 local c = strsub(cmd, b+1) 619 local c = strsub(cmd, b+1)
590 if tonumber(c) then 620 if tonumber(c) then
591 am("Current scaling is set to: "..c) 621 am("Current scaling is set to: "..c)
592 rBottomBarStyler.scalevalue = tonumber(c) 622 rBottomBarStyler.scalevalue = tonumber(c)
593 set_me_a_scale() 623 set_me_a_scale()
594 else 624 else
595 am("No number value.") 625 am("No number value.")
596 end 626 end
597 else 627 else
598 am("No value found.") 628 am("No value found.")
599 end 629 end
600 --getscale 630 --getscale
601 elseif (cmd:match"getscale") then 631 elseif (cmd:match"getscale") then
602 am("Current scaling is set to: "..rBottomBarStyler.scalevalue) 632 am("Current scaling is set to: "..rBottomBarStyler.scalevalue)
603 --setart 633 --setart
604 elseif (cmd:match"setart") then 634 elseif (cmd:match"setart") then
605 local a,b = strfind(cmd, " "); 635 local a,b = strfind(cmd, " ");
606 if b then 636 if b then
607 local c = strsub(cmd, b+1) 637 local c = strsub(cmd, b+1)
608 if c == "d1" or c == "d2" or c == "d3" or c == "roth" then 638 if c == "d1" or c == "d2" or c == "d3" or c == "roth" or c == "aion" then
609 am("You set the art to: "..c) 639 am("You set the art to: "..c)
610 rBottomBarStyler.artvalue = c 640 rBottomBarStyler.artvalue = c
611 am("You need to reoad the interface to see the changes.") 641 am("You need to reoad the interface to see the changes.")
612 am("Type in: \"/console reloadui\".") 642 am("Type in: \"/console reloadui\".")
613 else 643 else
614 am("Wrong value. (possible values: d1, d2, d3, roth)") 644 am("Wrong value. (possible values: d1, d2, d3, roth, aion)")
615 end 645 end
616 else 646 else
617 am("No value found.") 647 am("No value found.")
618 end 648 end
619 --setbar 649 --setbar
620 elseif (cmd:match"setbar") then 650 elseif (cmd:match"setbar") then
621 local a,b = strfind(cmd, " "); 651 local a,b = strfind(cmd, " ");
622 if b then 652 if b then
623 local c = strsub(cmd, b+1) 653 local c = strsub(cmd, b+1)
624 if c == "bar1" or c == "bar2" or c == "bar3" then 654 if c == "bar1" or c == "bar2" or c == "bar3" then
625 am("You set the bar to: "..c) 655 am("You set the bar to: "..c)
626 rBottomBarStyler.barvalue = c 656 rBottomBarStyler.barvalue = c
627 set_me_a_bar() 657 set_me_a_bar()
628 else 658 else
629 am("Wrong value. (possible values: bar1, bar2, bar3)") 659 am("Wrong value. (possible values: bar1, bar2, bar3)")
630 end 660 end
631 else 661 else
632 am("No value found.") 662 am("No value found.")
633 end 663 end
634 --getart 664 --getart
635 elseif (cmd:match"getart") then 665 elseif (cmd:match"getart") then
636 am("Current art is set to: "..rBottomBarStyler.artvalue) 666 am("Current art is set to: "..rBottomBarStyler.artvalue)
637 --getmovable 667 --getmovable
638 elseif (cmd:match"getmovable") then 668 elseif (cmd:match"getmovable") then
639 am("Movable is set to: "..rBottomBarStyler.movable) 669 am("Movable is set to: "..rBottomBarStyler.movable)
640 --getlocked 670 --getlocked
641 elseif (cmd:match"getlocked") then 671 elseif (cmd:match"getlocked") then
642 am("Locked is set to: "..rBottomBarStyler.locked) 672 am("Locked is set to: "..rBottomBarStyler.locked)
643 --locked 673 --locked
644 elseif (cmd:match"locked") then 674 elseif (cmd:match"locked") then
645 local a,b = strfind(cmd, " "); 675 local a,b = strfind(cmd, " ");
646 if b then 676 if b then
647 local c = strsub(cmd, b+1) 677 local c = strsub(cmd, b+1)
648 if tonumber(c) then 678 if tonumber(c) then
649 am("Locked is set to: "..c) 679 am("Locked is set to: "..c)
650 rBottomBarStyler.locked = tonumber(c) 680 rBottomBarStyler.locked = tonumber(c)
651 move_my_frame() 681 move_my_frame()
652 else 682 else
653 am("No number value.") 683 am("No number value.")
654 end 684 end
655 else 685 else
656 am("No value found.") 686 am("No value found.")
657 end 687 end
658 --movable 688 --movable
659 elseif (cmd:match"movable") then 689 elseif (cmd:match"movable") then
660 local a,b = strfind(cmd, " "); 690 local a,b = strfind(cmd, " ");
661 if b then 691 if b then
662 local c = strsub(cmd, b+1) 692 local c = strsub(cmd, b+1)
663 if tonumber(c) then 693 if tonumber(c) then
664 am("Movable is set to: "..c) 694 am("Movable is set to: "..c)
665 rBottomBarStyler.movable = tonumber(c) 695 rBottomBarStyler.movable = tonumber(c)
666 move_my_frame() 696 move_my_frame()
667 else 697 else
668 am("No number value.") 698 am("No number value.")
669 end 699 end
670 else 700 else
671 am("No value found.") 701 am("No value found.")
672 end 702 end
673 --healthorb 703 --healthorb
674 elseif (cmd:match"sethealthorb") then 704 elseif (cmd:match"sethealthorb") then
675 local a,b = strfind(cmd, " "); 705 local a,b = strfind(cmd, " ");
676 if b then 706 if b then
677 local c = strsub(cmd, b+1) 707 local c = strsub(cmd, b+1)
678 if tonumber(c) and tonumber(c) > 0 and tonumber(c) < 6 then 708 if tonumber(c) and tonumber(c) > 0 and tonumber(c) < 6 then
679 am("Healthorb is set to: "..c) 709 am("Healthorb is set to: "..c)
680 rBottomBarStyler.healthorb = tonumber(c) 710 rBottomBarStyler.healthorb = tonumber(c)
681 set_the_hglows() 711 set_the_hglows()
682 else 712 else
683 am("No number value.") 713 am("No number value.")
684 end 714 end
685 else 715 else
686 am("No value found.") 716 am("No value found.")
687 end 717 end
688 --manaorb 718 --manaorb
689 elseif (cmd:match"setmanaorb") then 719 elseif (cmd:match"setmanaorb") then
690 local a,b = strfind(cmd, " "); 720 local a,b = strfind(cmd, " ");
691 if b then 721 if b then
692 local c = strsub(cmd, b+1) 722 local c = strsub(cmd, b+1)
693 if tonumber(c) and tonumber(c) > 0 and tonumber(c) < 6 then 723 if tonumber(c) and tonumber(c) > 0 and tonumber(c) < 6 then
694 am("Manaorb is set to: "..c) 724 am("Manaorb is set to: "..c)
695 if rBottomBarStyler.automana == 1 then 725 if rBottomBarStyler.automana == 1 then
696 am("Automana is active. Not possible, deactivate automana first.") 726 am("Automana is active. Not possible, deactivate automana first.")
697 else 727 else
698 rBottomBarStyler.manaorb = tonumber(c) 728 rBottomBarStyler.manaorb = tonumber(c)
699 set_the_mglows() 729 set_the_mglows()
700 end 730 end
701 else 731 else
702 am("No number value.") 732 am("No number value.")
703 end 733 end
704 else 734 else
705 am("No value found.") 735 am("No value found.")
706 end 736 end
707 --automana 737 --automana
708 elseif (cmd:match"setautomana") then 738 elseif (cmd:match"setautomana") then
709 local a,b = strfind(cmd, " "); 739 local a,b = strfind(cmd, " ");
710 if b then 740 if b then
711 local c = strsub(cmd, b+1) 741 local c = strsub(cmd, b+1)
712 if tonumber(c) then 742 if tonumber(c) then
713 am("Automana is set to: "..c) 743 am("Automana is set to: "..c)
714 rBottomBarStyler.automana = tonumber(c) 744 rBottomBarStyler.automana = tonumber(c)
715 set_automana() 745 set_automana()
716 set_the_mglows() 746 set_the_mglows()
717 else 747 else
718 am("No number value.") 748 am("No number value.")
719 end 749 end
720 else 750 else
721 am("No value found.") 751 am("No value found.")
722 end 752 end
723 else 753 else
724 am("rbbs commands...") 754 am("rbbs commands...")
725 am("\/rbbs getscale") 755 am("\/rbbs getscale")
726 am("\/rbbs getart") 756 am("\/rbbs getart")
727 am("\/rbbs getlocked") 757 am("\/rbbs getlocked")
728 am("\/rbbs getmovable") 758 am("\/rbbs getmovable")
729 am("\/rbbs setscale NUMBER") 759 am("\/rbbs setscale NUMBER")
730 am("\/rbbs setart STRING (possible values: d1, d2, d3, roth)") 760 am("\/rbbs setart STRING (possible values: d1, d2, d3, roth, aion)")
731 am("\/rbbs setbar STRING (possible values: bar1, bar2, bar3 - only affects the roth layout)") 761 am("\/rbbs setbar STRING (possible values: bar1, bar2, bar3 - only affects the roth layout)")
732 am("\/rbbs locked NUMBER (value of 1 locks bars, 0 unlocks)") 762 am("\/rbbs locked NUMBER (value of 1 locks bars, 0 unlocks)")
733 am("\/rbbs movable NUMBER (value of 1 makes bars movable if unlocked, value of 0 will reset position)") 763 am("\/rbbs movable NUMBER (value of 1 makes bars movable if unlocked, value of 0 will reset position)")
734 764
735 am("\/rbbs sethealthorb NUMBER (values 1 (red), 2 (green), 3 (blue), 4 (yellow), 5(runic) to set your healthcolor)") 765 am("\/rbbs sethealthorb NUMBER (values 1 (red), 2 (green), 3 (blue), 4 (yellow), 5(runic) to set your healthcolor)")
736 am("\/rbbs setmanaorb NUMBER (values 1 (red), 2 (green), 3 (blue), 4 (yellow), 5(runic) to set your manacolor)") 766 am("\/rbbs setmanaorb NUMBER (values 1 (red), 2 (green), 3 (blue), 4 (yellow), 5(runic) to set your manacolor)")
737 am("\/rbbs setautomana NUMBER (values 0 or 1, this will override the manaorb setting and automatically detect your manacolor on class/stance)") 767 am("\/rbbs setautomana NUMBER (values 0 or 1, this will override the manaorb setting and automatically detect your manacolor on class/stance)")
738 768
739 end 769 end
740 end 770 end
741 771
742 ------------------------------------------------------ 772 ------------------------------------------------------
743 -- / LOAD THE SHIT / -- 773 -- / LOAD THE SHIT / --
744 ------------------------------------------------------ 774 ------------------------------------------------------
745 775
746 local a = CreateFrame"Frame" 776 local a = CreateFrame"Frame"
747 a:RegisterEvent("VARIABLES_LOADED") 777 a:RegisterEvent("VARIABLES_LOADED")
748 a:SetScript("OnEvent", function(self) 778 a:SetScript("OnEvent", function(self)
749 self:UnregisterEvent("VARIABLES_LOADED") 779 self:UnregisterEvent("VARIABLES_LOADED")
750 self:SetScript("OnEvent", nil) 780 self:SetScript("OnEvent", nil)
751 --default values 781 --default values
752 load_default() 782 load_default()
753 --load the styles 783 --load the styles
754 load_style(rBottomBarStyler.artvalue,rBottomBarStyler.scalevalue) 784 load_style(rBottomBarStyler.artvalue,rBottomBarStyler.scalevalue)
755 move_my_frame() 785 move_my_frame()
756 --slash commands 786 --slash commands
757 SlashCmdList["whatever"] = SlashCmd; 787 SlashCmdList["whatever"] = SlashCmd;
758 SLASH_whatever1 = "/rbbs"; 788 SLASH_whatever1 = "/rbbs";
759 --am("rbbs loaded...") 789 --am("rbbs loaded...")
760 end) 790 end)
Hosted by Google Code