vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --------------- |
2 | -- Variables -- |
||
3 | --------------- |
||
4 | Perl_Config_Config = {}; |
||
5 | |||
6 | Perl_Config_Global_ArcaneBar_Config = {}; |
||
7 | Perl_Config_Global_CombatDisplay_Config = {}; |
||
8 | Perl_Config_Global_Config_Config = {}; |
||
9 | Perl_Config_Global_Party_Config = {}; |
||
10 | Perl_Config_Global_Party_Pet_Config = {}; |
||
11 | Perl_Config_Global_Player_Config = {}; |
||
12 | Perl_Config_Global_Player_Buff_Config = {}; |
||
13 | Perl_Config_Global_Player_Pet_Config = {}; |
||
14 | Perl_Config_Global_Raid_Config = {}; |
||
15 | Perl_Config_Global_Target_Config = {}; |
||
16 | Perl_Config_Global_Target_Target_Config = {}; |
||
17 | |||
18 | -- Default Saved Variables (also set in Perl_Config_GetVars) |
||
19 | local texture = 0; -- no texture is set by default |
||
20 | local showminimapbutton = 1; -- minimap button is on by default |
||
21 | local minimapbuttonpos = 270; -- default minimap button position |
||
22 | local transparentbackground = 0; -- use solid black background as default |
||
23 | PCUF_CASTPARTYSUPPORT = 1; -- CastParty support is enabled by default (global variable so i don't go insane) |
||
24 | PCUF_COLORHEALTH = 0; -- progressively colored health bars are off by default |
||
25 | |||
26 | -- Empty variables used for localization |
||
27 | PERL_LOCALIZED_DRUID = nil; |
||
28 | PERL_LOCALIZED_HUNTER = nil; |
||
29 | PERL_LOCALIZED_MAGE = nil; |
||
30 | PERL_LOCALIZED_PALADIN = nil; |
||
31 | PERL_LOCALIZED_PRIEST = nil; |
||
32 | PERL_LOCALIZED_ROGUE = nil; |
||
33 | PERL_LOCALIZED_SHAMAN = nil; |
||
34 | PERL_LOCALIZED_WARLOCK = nil; |
||
35 | PERL_LOCALIZED_WARRIOR = nil; |
||
36 | PERL_LOCALIZED_CIVILIAN = nil; |
||
37 | PERL_LOCALIZED_CREATURE = nil; |
||
38 | PERL_LOCALIZED_NOTSPECIFIED = nil; |
||
39 | |||
40 | |||
41 | ---------------------- |
||
42 | -- Loading Function -- |
||
43 | ---------------------- |
||
44 | function Perl_Config_OnLoad() |
||
45 | -- Events |
||
46 | this:RegisterEvent("ADDON_LOADED"); |
||
47 | this:RegisterEvent("PLAYER_ENTERING_WORLD"); |
||
48 | this:RegisterEvent("VARIABLES_LOADED"); |
||
49 | |||
50 | Perl_Config_Set_Localization(); |
||
51 | |||
52 | -- Slash Commands |
||
53 | SlashCmdList["PERL_CONFIG"] = Perl_Config_SlashHandler; |
||
54 | SLASH_PERL_CONFIG1 = "/perl"; |
||
55 | |||
56 | if (DEFAULT_CHAT_FRAME) then |
||
57 | DEFAULT_CHAT_FRAME:AddMessage("|cffffff00Perl Classic: Config loaded successfully."); |
||
58 | end |
||
59 | end |
||
60 | |||
61 | |||
62 | ------------------- |
||
63 | -- Event Handler -- |
||
64 | ------------------- |
||
65 | function Perl_Config_OnEvent(event) |
||
66 | if (event == "ADDON_LOADED") then |
||
67 | if (arg1 == "Perl_Config") then |
||
68 | Perl_Config_myAddOns_Support(); |
||
69 | end |
||
70 | return; |
||
71 | elseif (event=="PLAYER_ENTERING_WORLD") then |
||
72 | Perl_Config_Set_Texture(); |
||
73 | Perl_Config_Button_UpdatePosition(); |
||
74 | Perl_Config_ShowHide_MiniMap_Button(); |
||
75 | Perl_Config_Set_Background(); |
||
76 | elseif (event == "VARIABLES_LOADED") then |
||
77 | Perl_Config_Initialize(); |
||
78 | return; |
||
79 | else |
||
80 | return; |
||
81 | end |
||
82 | end |
||
83 | |||
84 | |||
85 | ------------------- |
||
86 | -- Slash Handler -- |
||
87 | ------------------- |
||
88 | function Perl_Config_SlashHandler(msg) |
||
89 | Perl_Config_Toggle(); |
||
90 | end |
||
91 | |||
92 | |||
93 | ------------------------------- |
||
94 | -- Loading Settings Function -- |
||
95 | ------------------------------- |
||
96 | function Perl_Config_Initialize() |
||
97 | -- Check if a previous exists, if not, enable by default. |
||
98 | if (type(Perl_Config_Config[UnitName("player")]) == "table") then |
||
99 | Perl_Config_GetVars(); |
||
100 | else |
||
101 | Perl_Config_UpdateVars(); |
||
102 | end |
||
103 | end |
||
104 | |||
105 | |||
106 | --------------------------- |
||
107 | -- Localization Function -- |
||
108 | --------------------------- |
||
109 | function Perl_Config_Set_Localization() |
||
110 | -- English is set no matter what in order to not break the mod for untranslated clients like in version 0.25 |
||
111 | --if (GetLocale() == "enUS") then |
||
112 | PERL_LOCALIZED_DRUID = "Druid"; |
||
113 | PERL_LOCALIZED_HUNTER = "Hunter"; |
||
114 | PERL_LOCALIZED_MAGE = "Mage"; |
||
115 | PERL_LOCALIZED_PALADIN = "Paladin"; |
||
116 | PERL_LOCALIZED_PRIEST = "Priest"; |
||
117 | PERL_LOCALIZED_ROGUE = "Rogue"; |
||
118 | PERL_LOCALIZED_SHAMAN = "Shaman"; |
||
119 | PERL_LOCALIZED_WARLOCK = "Warlock"; |
||
120 | PERL_LOCALIZED_WARRIOR = "Warrior"; |
||
121 | |||
122 | PERL_LOCALIZED_CIVILIAN = "Civilian"; |
||
123 | PERL_LOCALIZED_CREATURE = "Creature"; |
||
124 | PERL_LOCALIZED_NOTSPECIFIED = "Not specified"; |
||
125 | --end |
||
126 | |||
127 | if (GetLocale() == "deDE") then |
||
128 | PERL_LOCALIZED_DRUID = "Druide"; |
||
129 | PERL_LOCALIZED_HUNTER = "J\195\164ger"; |
||
130 | PERL_LOCALIZED_MAGE = "Magier"; |
||
131 | PERL_LOCALIZED_PALADIN = "Paladin"; |
||
132 | PERL_LOCALIZED_PRIEST = "Priester"; |
||
133 | PERL_LOCALIZED_ROGUE = "Schurke"; |
||
134 | PERL_LOCALIZED_SHAMAN = "Schamane"; |
||
135 | PERL_LOCALIZED_WARLOCK = "Hexenmeister"; |
||
136 | PERL_LOCALIZED_WARRIOR = "Krieger"; |
||
137 | |||
138 | PERL_LOCALIZED_CIVILIAN = "Zivilist"; |
||
139 | PERL_LOCALIZED_CREATURE = "Kreatur"; |
||
140 | PERL_LOCALIZED_NOTSPECIFIED = "Nicht spezifiziert"; |
||
141 | end |
||
142 | |||
143 | if (GetLocale() == "frFR") then |
||
144 | PERL_LOCALIZED_DRUID = "Druide"; |
||
145 | PERL_LOCALIZED_HUNTER = "Chasseur"; |
||
146 | PERL_LOCALIZED_MAGE = "Mage"; |
||
147 | PERL_LOCALIZED_PALADIN = "Paladin"; |
||
148 | PERL_LOCALIZED_PRIEST = "Pr\195\170tre"; |
||
149 | PERL_LOCALIZED_ROGUE = "Voleur"; |
||
150 | PERL_LOCALIZED_SHAMAN = "Chaman"; |
||
151 | PERL_LOCALIZED_WARLOCK = "D\195\169moniste"; |
||
152 | PERL_LOCALIZED_WARRIOR = "Guerrier"; |
||
153 | |||
154 | PERL_LOCALIZED_CIVILIAN = "Civil"; |
||
155 | PERL_LOCALIZED_CREATURE = "Cr\195\169ature"; |
||
156 | PERL_LOCALIZED_NOTSPECIFIED = "Non indiqu\195\169"; |
||
157 | end |
||
158 | |||
159 | if (GetLocale() == "koKR") then |
||
160 | PERL_LOCALIZED_DRUID = "드루이드"; |
||
161 | PERL_LOCALIZED_HUNTER = "사냥꾼"; |
||
162 | PERL_LOCALIZED_MAGE = "마법사"; |
||
163 | PERL_LOCALIZED_PALADIN = "성기사"; |
||
164 | PERL_LOCALIZED_PRIEST = "사제"; |
||
165 | PERL_LOCALIZED_ROGUE = "도적"; |
||
166 | PERL_LOCALIZED_SHAMAN = "주술사"; |
||
167 | PERL_LOCALIZED_WARLOCK = "흑마법사"; |
||
168 | PERL_LOCALIZED_WARRIOR = "전사"; |
||
169 | |||
170 | PERL_LOCALIZED_CIVILIAN = "민간인"; |
||
171 | PERL_LOCALIZED_CREATURE = "동물"; |
||
172 | PERL_LOCALIZED_NOTSPECIFIED = "무엇인가"; |
||
173 | end |
||
174 | |||
175 | if (GetLocale() == "zhCN") then |
||
176 | PERL_LOCALIZED_DRUID = "德鲁伊"; |
||
177 | PERL_LOCALIZED_HUNTER = "猎人"; |
||
178 | PERL_LOCALIZED_MAGE = "法师"; |
||
179 | PERL_LOCALIZED_PALADIN = "圣骑士"; |
||
180 | PERL_LOCALIZED_PRIEST = "牧师"; |
||
181 | PERL_LOCALIZED_ROGUE = "盗贼"; |
||
182 | PERL_LOCALIZED_SHAMAN = "萨满祭司"; |
||
183 | PERL_LOCALIZED_WARLOCK = "术士"; |
||
184 | PERL_LOCALIZED_WARRIOR = "战士"; |
||
185 | |||
186 | PERL_LOCALIZED_CIVILIAN = "平民"; |
||
187 | PERL_LOCALIZED_CREATURE = "生物"; |
||
188 | PERL_LOCALIZED_NOTSPECIFIED = "非特定的"; |
||
189 | end |
||
190 | |||
191 | if (GetLocale() == "zhTW") then |
||
192 | PERL_LOCALIZED_DRUID = "德魯伊"; |
||
193 | PERL_LOCALIZED_HUNTER = "獵人"; |
||
194 | PERL_LOCALIZED_MAGE = "法師"; |
||
195 | PERL_LOCALIZED_PALADIN = "聖騎士"; |
||
196 | PERL_LOCALIZED_PRIEST = "牧師"; |
||
197 | PERL_LOCALIZED_ROGUE = "盜賊"; |
||
198 | PERL_LOCALIZED_SHAMAN = "薩滿"; |
||
199 | PERL_LOCALIZED_WARLOCK = "術士"; |
||
200 | PERL_LOCALIZED_WARRIOR = "戰士"; |
||
201 | |||
202 | PERL_LOCALIZED_CIVILIAN = "平民"; |
||
203 | PERL_LOCALIZED_CREATURE = "生物"; |
||
204 | PERL_LOCALIZED_NOTSPECIFIED = "非特定的"; |
||
205 | end |
||
206 | end |
||
207 | |||
208 | |||
209 | -------------------------- |
||
210 | -- Update/GUI Functions -- |
||
211 | -------------------------- |
||
212 | function Perl_Config_Set_Texture(newvalue) |
||
213 | if (newvalue ~= nil) then |
||
214 | texture = newvalue; |
||
215 | Perl_Config_UpdateVars(); |
||
216 | end |
||
217 | |||
218 | local texturename; |
||
219 | if (texture ~= 0) then |
||
220 | texturename = "Interface\\AddOns\\Perl_Config\\Perl_StatusBar"..texture..".tga"; |
||
221 | else |
||
222 | texturename = "Interface\\TargetingFrame\\UI-StatusBar"; |
||
223 | end |
||
224 | |||
225 | if (Perl_ArcaneBar_Frame_Loaded_Frame) then |
||
226 | Perl_ArcaneBarTex:SetTexture(texturename); |
||
227 | end |
||
228 | |||
229 | if (Perl_CombatDisplay_Frame) then |
||
230 | Perl_CombatDisplay_HealthBarTex:SetTexture(texturename); |
||
231 | Perl_CombatDisplay_ManaBarTex:SetTexture(texturename); |
||
232 | Perl_CombatDisplay_DruidBarTex:SetTexture(texturename); |
||
233 | Perl_CombatDisplay_CPBarTex:SetTexture(texturename); |
||
234 | Perl_CombatDisplay_PetHealthBarTex:SetTexture(texturename); |
||
235 | Perl_CombatDisplay_PetManaBarTex:SetTexture(texturename); |
||
236 | Perl_CombatDisplay_Target_HealthBarTex:SetTexture(texturename); |
||
237 | Perl_CombatDisplay_Target_ManaBarTex:SetTexture(texturename); |
||
238 | end |
||
239 | |||
240 | if (Perl_Party_Frame) then |
||
241 | Perl_Party_MemberFrame1_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
242 | Perl_Party_MemberFrame1_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
243 | Perl_Party_MemberFrame1_StatsFrame_PetHealthBar_PetHealthBarTex:SetTexture(texturename); |
||
244 | Perl_Party_MemberFrame2_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
245 | Perl_Party_MemberFrame2_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
246 | Perl_Party_MemberFrame2_StatsFrame_PetHealthBar_PetHealthBarTex:SetTexture(texturename); |
||
247 | Perl_Party_MemberFrame3_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
248 | Perl_Party_MemberFrame3_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
249 | Perl_Party_MemberFrame3_StatsFrame_PetHealthBar_PetHealthBarTex:SetTexture(texturename); |
||
250 | Perl_Party_MemberFrame4_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
251 | Perl_Party_MemberFrame4_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
252 | Perl_Party_MemberFrame4_StatsFrame_PetHealthBar_PetHealthBarTex:SetTexture(texturename); |
||
253 | end |
||
254 | |||
255 | if (Perl_Party_Pet_Script_Frame) then |
||
256 | Perl_Party_Pet1_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
257 | Perl_Party_Pet1_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
258 | Perl_Party_Pet2_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
259 | Perl_Party_Pet2_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
260 | Perl_Party_Pet3_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
261 | Perl_Party_Pet3_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
262 | Perl_Party_Pet4_StatsFrame_HealthBar_HealthBarTex:SetTexture(texturename); |
||
263 | Perl_Party_Pet4_StatsFrame_ManaBar_ManaBarTex:SetTexture(texturename); |
||
264 | end |
||
265 | |||
266 | if (Perl_Player_Frame) then |
||
267 | Perl_Player_HealthBarTex:SetTexture(texturename); |
||
268 | Perl_Player_ManaBarTex:SetTexture(texturename); |
||
269 | Perl_Player_DruidBarTex:SetTexture(texturename); |
||
270 | Perl_Player_XPBarTex:SetTexture(texturename); |
||
271 | end |
||
272 | |||
273 | if (Perl_Player_Pet_Frame) then |
||
274 | Perl_Player_Pet_HealthBarTex:SetTexture(texturename); |
||
275 | Perl_Player_Pet_ManaBarTex:SetTexture(texturename); |
||
276 | Perl_Player_Pet_XPBarTex:SetTexture(texturename); |
||
277 | end |
||
278 | |||
279 | if (Perl_Raid_Frame) then |
||
280 | for num=1,40 do |
||
281 | getglobal("Perl_Raid"..num.."_StatsFrame_HealthBar_HealthBarTex"):SetTexture(texturename); |
||
282 | getglobal("Perl_Raid"..num.."_StatsFrame_ManaBar_ManaBarTex"):SetTexture(texturename); |
||
283 | end |
||
284 | end |
||
285 | |||
286 | if (Perl_Target_Frame) then |
||
287 | Perl_Target_HealthBarTex:SetTexture(texturename); |
||
288 | Perl_Target_ManaBarTex:SetTexture(texturename); |
||
289 | Perl_Target_NameFrame_CPMeterTex:SetTexture(texturename); |
||
290 | end |
||
291 | |||
292 | if (Perl_Target_Target_Script_Frame) then |
||
293 | Perl_Target_Target_HealthBarTex:SetTexture(texturename); |
||
294 | Perl_Target_Target_ManaBarTex:SetTexture(texturename); |
||
295 | Perl_Target_Target_Target_HealthBarTex:SetTexture(texturename); |
||
296 | Perl_Target_Target_Target_ManaBarTex:SetTexture(texturename); |
||
297 | end |
||
298 | end |
||
299 | |||
300 | function Perl_Config_Set_Background(newvalue) |
||
301 | if (newvalue ~= nil) then |
||
302 | transparentbackground = newvalue; |
||
303 | Perl_Config_UpdateVars(); |
||
304 | end |
||
305 | |||
306 | if (transparentbackground == 1) then |
||
307 | if (Perl_CombatDisplay_Frame) then |
||
308 | Perl_CombatDisplay_ManaFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
309 | Perl_CombatDisplay_Target_ManaFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
310 | Perl_CombatDisplay_Initialize_Frame_Color(); |
||
311 | end |
||
312 | |||
313 | if (Perl_Party_Frame) then |
||
314 | for partynum=1,4 do |
||
315 | getglobal("Perl_Party_MemberFrame"..partynum.."_NameFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
316 | getglobal("Perl_Party_MemberFrame"..partynum.."_LevelFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
317 | getglobal("Perl_Party_MemberFrame"..partynum.."_PortraitFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
318 | getglobal("Perl_Party_MemberFrame"..partynum.."_StatsFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
319 | end |
||
320 | Perl_Party_Initialize_Frame_Color(1); |
||
321 | end |
||
322 | |||
323 | if (Perl_Party_Pet_Script_Frame) then |
||
324 | for partynum=1,4 do |
||
325 | getglobal("Perl_Party_Pet"..partynum.."_NameFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
326 | getglobal("Perl_Party_Pet"..partynum.."_PortraitFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
327 | getglobal("Perl_Party_Pet"..partynum.."_StatsFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
328 | end |
||
329 | Perl_Party_Pet_Initialize_Frame_Color(1); |
||
330 | end |
||
331 | |||
332 | if (Perl_Player_Frame) then |
||
333 | Perl_Player_NameFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
334 | Perl_Player_LevelFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
335 | Perl_Player_PortraitFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
336 | Perl_Player_RaidGroupNumberFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
337 | Perl_Player_StatsFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
338 | Perl_Player_Initialize_Frame_Color(); |
||
339 | end |
||
340 | |||
341 | if (Perl_Player_Pet_Frame) then |
||
342 | Perl_Player_Pet_LevelFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
343 | Perl_Player_Pet_NameFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
344 | Perl_Player_Pet_PortraitFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
345 | Perl_Player_Pet_StatsFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
346 | Perl_Player_Pet_Initialize_Frame_Color(); |
||
347 | end |
||
348 | |||
349 | if (Perl_Raid_Frame) then |
||
350 | for num=1,40 do |
||
351 | getglobal("Perl_Raid"..num.."_NameFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
352 | getglobal("Perl_Raid"..num.."_StatsFrame"):SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
353 | end |
||
354 | Perl_Raid_Initialize_Frame_Color(); |
||
355 | end |
||
356 | |||
357 | if (Perl_Target_Frame) then |
||
358 | Perl_Target_CivilianFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
359 | Perl_Target_ClassNameFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
360 | Perl_Target_CPFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
361 | Perl_Target_LevelFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
362 | Perl_Target_NameFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
363 | Perl_Target_PortraitFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
364 | Perl_Target_RareEliteFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
365 | Perl_Target_StatsFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
366 | Perl_Target_Initialize_Frame_Color(); |
||
367 | end |
||
368 | |||
369 | if (Perl_Target_Target_Script_Frame) then |
||
370 | Perl_Target_Target_NameFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
371 | Perl_Target_Target_StatsFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
372 | Perl_Target_Target_Target_NameFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
373 | Perl_Target_Target_Target_StatsFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
374 | Perl_Target_Target_Initialize_Frame_Color(); |
||
375 | end |
||
376 | else |
||
377 | if (Perl_CombatDisplay_Frame) then |
||
378 | Perl_CombatDisplay_ManaFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
379 | Perl_CombatDisplay_Target_ManaFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
380 | Perl_CombatDisplay_Initialize_Frame_Color(); |
||
381 | end |
||
382 | |||
383 | if (Perl_Party_Frame) then |
||
384 | for partynum=1,4 do |
||
385 | getglobal("Perl_Party_MemberFrame"..partynum.."_NameFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
386 | getglobal("Perl_Party_MemberFrame"..partynum.."_LevelFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
387 | getglobal("Perl_Party_MemberFrame"..partynum.."_PortraitFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
388 | getglobal("Perl_Party_MemberFrame"..partynum.."_StatsFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
389 | end |
||
390 | Perl_Party_Initialize_Frame_Color(1); |
||
391 | end |
||
392 | |||
393 | if (Perl_Party_Pet_Script_Frame) then |
||
394 | for partynum=1,4 do |
||
395 | getglobal("Perl_Party_Pet"..partynum.."_NameFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
396 | getglobal("Perl_Party_Pet"..partynum.."_PortraitFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
397 | getglobal("Perl_Party_Pet"..partynum.."_StatsFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
398 | end |
||
399 | Perl_Party_Pet_Initialize_Frame_Color(1); |
||
400 | end |
||
401 | |||
402 | if (Perl_Player_Frame) then |
||
403 | Perl_Player_NameFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
404 | Perl_Player_LevelFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
405 | Perl_Player_PortraitFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
406 | Perl_Player_RaidGroupNumberFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
407 | Perl_Player_StatsFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
408 | Perl_Player_Initialize_Frame_Color(); |
||
409 | end |
||
410 | |||
411 | if (Perl_Player_Pet_Frame) then |
||
412 | Perl_Player_Pet_LevelFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
413 | Perl_Player_Pet_NameFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
414 | Perl_Player_Pet_PortraitFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
415 | Perl_Player_Pet_StatsFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
416 | Perl_Player_Pet_Initialize_Frame_Color(); |
||
417 | end |
||
418 | |||
419 | if (Perl_Raid_Frame) then |
||
420 | for num=1,40 do |
||
421 | getglobal("Perl_Raid"..num.."_NameFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
422 | getglobal("Perl_Raid"..num.."_StatsFrame"):SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
423 | end |
||
424 | Perl_Raid_Initialize_Frame_Color(); |
||
425 | end |
||
426 | |||
427 | if (Perl_Target_Frame) then |
||
428 | Perl_Target_CivilianFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_White", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
429 | Perl_Target_ClassNameFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
430 | Perl_Target_CPFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
431 | Perl_Target_LevelFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
432 | Perl_Target_NameFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
433 | Perl_Target_PortraitFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
434 | Perl_Target_RareEliteFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
435 | Perl_Target_StatsFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
436 | Perl_Target_Initialize_Frame_Color(); |
||
437 | end |
||
438 | |||
439 | if (Perl_Target_Target_Script_Frame) then |
||
440 | Perl_Target_Target_NameFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
441 | Perl_Target_Target_StatsFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
442 | Perl_Target_Target_Target_NameFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
443 | Perl_Target_Target_Target_StatsFrame:SetBackdrop({bgFile = "Interface\\AddOns\\Perl_Config\\Perl_Black", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = { left = 5, right = 5, top = 5, bottom = 5 }}); |
||
444 | Perl_Target_Target_Initialize_Frame_Color(); |
||
445 | end |
||
446 | end |
||
447 | end |
||
448 | |||
449 | function Perl_Config_Set_Transparency(newvalue) |
||
450 | if (Perl_ArcaneBar_Frame_Loaded_Frame) then |
||
451 | Perl_ArcaneBar_Set_Transparency(newvalue); |
||
452 | end |
||
453 | |||
454 | if (Perl_CombatDisplay_Frame) then |
||
455 | Perl_CombatDisplay_Set_Transparency(newvalue); |
||
456 | end |
||
457 | |||
458 | if (Perl_Party_Frame) then |
||
459 | Perl_Party_Set_Transparency(newvalue); |
||
460 | end |
||
461 | |||
462 | if (Perl_Party_Pet_Script_Frame) then |
||
463 | Perl_Party_Pet_Set_Transparency(newvalue); |
||
464 | end |
||
465 | |||
466 | if (Perl_Player_Frame) then |
||
467 | Perl_Player_Set_Transparency(newvalue); |
||
468 | end |
||
469 | |||
470 | if (Perl_Player_Pet_Frame) then |
||
471 | Perl_Player_Pet_Set_Transparency(newvalue); |
||
472 | end |
||
473 | |||
474 | if (Perl_Raid_Frame) then |
||
475 | Perl_Raid_Set_Transparency(newvalue); |
||
476 | end |
||
477 | |||
478 | if (Perl_Target_Frame) then |
||
479 | Perl_Target_Set_Transparency(newvalue); |
||
480 | end |
||
481 | |||
482 | if (Perl_Target_Target_Script_Frame) then |
||
483 | Perl_Target_Target_Set_Transparency(newvalue); |
||
484 | end |
||
485 | end |
||
486 | |||
487 | function Perl_Config_Set_MiniMap_Button(newvalue) |
||
488 | showminimapbutton = newvalue; |
||
489 | Perl_Config_UpdateVars(); |
||
490 | Perl_Config_ShowHide_MiniMap_Button(); |
||
491 | end |
||
492 | |||
493 | function Perl_Config_Set_MiniMap_Position(newvalue) |
||
494 | minimapbuttonpos = newvalue; |
||
495 | Perl_Config_UpdateVars(); |
||
496 | Perl_Config_Button_UpdatePosition(); |
||
497 | end |
||
498 | |||
499 | function Perl_Config_Set_CastParty_Support(newvalue) |
||
500 | PCUF_CASTPARTYSUPPORT = newvalue; |
||
501 | Perl_Config_UpdateVars(); |
||
502 | end |
||
503 | |||
504 | function Perl_Config_Set_Color_Health(newvalue) |
||
505 | PCUF_COLORHEALTH = newvalue; |
||
506 | Perl_Config_UpdateVars(); |
||
507 | end |
||
508 | |||
509 | |||
510 | ----------------------------------- |
||
511 | -- Reset Frame Position Function -- |
||
512 | ----------------------------------- |
||
513 | function Perl_Config_Frame_Reset_Positions() |
||
514 | -- Due to a terrible API, CombatDisplay resetting will not be a feature unless someone can unravel the mystery of screen resolution and scaling coordinates |
||
515 | -- if (Perl_CombatDisplay_Frame) then |
||
516 | -- Perl_CombatDisplay_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 626, -574); |
||
517 | -- Perl_CombatDisplay_Target_Frame:SetPoint("BOTTOMLEFT", Perl_CombatDisplay_Frame, "TOPLEFT", 0, 5); |
||
518 | -- end |
||
519 | |||
520 | if (Perl_Party_Frame) then |
||
521 | Perl_Party_Frame:SetUserPlaced(1); -- All the SetUserPlaced allows us to save the new location set by these functions even if the user has not moved the frames on their own yet. |
||
522 | Perl_Party_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -8, -187); |
||
523 | end |
||
524 | |||
525 | if (Perl_Party_Pet_Script_Frame) then |
||
526 | Perl_Party_Pet_Allign(); |
||
527 | end |
||
528 | |||
529 | if (Perl_Player_Frame) then |
||
530 | Perl_Player_Frame:SetUserPlaced(1); |
||
531 | Perl_Player_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -3, -43); |
||
532 | end |
||
533 | |||
534 | if (Perl_Player_Pet_Frame) then |
||
535 | Perl_Player_Pet_Frame:SetUserPlaced(1); |
||
536 | Perl_Player_Pet_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 27, -112); |
||
537 | end |
||
538 | |||
539 | if (Perl_Raid_Frame) then |
||
540 | for num=1,8 do |
||
541 | getglobal("Perl_Raid_Grp"..num):SetUserPlaced(1); |
||
542 | getglobal("Perl_Raid_Grp"..num):SetPoint("TOPLEFT", UIParent, "TOPLEFT", 500, -200); |
||
543 | end |
||
544 | end |
||
545 | |||
546 | if (Perl_Target_Frame) then |
||
547 | Perl_Target_Frame:SetUserPlaced(1); |
||
548 | Perl_Target_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 263, -43); |
||
549 | end |
||
550 | |||
551 | if (Perl_Target_Target_Script_Frame) then |
||
552 | Perl_Target_Target_Frame:SetUserPlaced(1); |
||
553 | Perl_Target_Target_Target_Frame:SetUserPlaced(1); |
||
554 | Perl_Target_Target_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 501, -43); |
||
555 | Perl_Target_Target_Target_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 607, -43); |
||
556 | end |
||
557 | end |
||
558 | |||
559 | |||
560 | ------------------------------------- |
||
561 | -- Global Saved Variable Functions -- |
||
562 | ------------------------------------- |
||
563 | function Perl_Config_Global_Save_Settings() |
||
564 | if (Perl_ArcaneBar_Frame_Loaded_Frame) then |
||
565 | local vartable = Perl_ArcaneBar_GetVars(); |
||
566 | Perl_Config_Global_ArcaneBar_Config["Global Settings"] = { |
||
567 | ["Enabled"] = vartable["enabled"], |
||
568 | ["HideOriginal"] = vartable["hideoriginal"], |
||
569 | ["ShowTimer"] = vartable["showtimer"], |
||
570 | ["Transparency"] = vartable["transparency"], |
||
571 | }; |
||
572 | end |
||
573 | |||
574 | if (Perl_CombatDisplay_Frame) then |
||
575 | local vartable = Perl_CombatDisplay_GetVars(); |
||
576 | Perl_Config_Global_CombatDisplay_Config["Global Settings"] = { |
||
577 | ["State"] = vartable["state"], |
||
578 | ["Locked"] = vartable["locked"], |
||
579 | ["HealthPersist"] = vartable["healthpersist"], |
||
580 | ["ManaPersist"] = vartable["manapersist"], |
||
581 | ["Scale"] = vartable["scale"], |
||
582 | ["Transparency"] = vartable["transparency"], |
||
583 | ["ShowTarget"] = vartable["showtarget"], |
||
584 | ["MobHealthSupport"] = vartable["mobhealthsupport"], |
||
585 | ["XPositionCD"] = floor(Perl_CombatDisplay_Frame:GetLeft() + 0.5), |
||
586 | ["YPositionCD"] = floor(Perl_CombatDisplay_Frame:GetTop() - (UIParent:GetTop() / Perl_CombatDisplay_Frame:GetScale()) + 0.5), |
||
587 | ["XPositionCDT"] = floor(Perl_CombatDisplay_Target_Frame:GetLeft() + 0.5), |
||
588 | ["YPositionCDT"] = floor(Perl_CombatDisplay_Target_Frame:GetTop() - (UIParent:GetTop() / Perl_CombatDisplay_Target_Frame:GetScale()) + 0.5), |
||
589 | ["ShowDruidBar"] = vartable["showdruidbar"], |
||
590 | ["ShowPetBars"] = vartable["showpetbars"], |
||
591 | }; |
||
592 | end |
||
593 | |||
594 | if (Perl_Config_Frame) then |
||
595 | local vartable = Perl_Config_GetVars(); |
||
596 | Perl_Config_Global_Config_Config["Global Settings"] = { |
||
597 | ["Texture"] = vartable["texture"], |
||
598 | ["ShowMiniMapButton"] = vartable["showminimapbutton"], |
||
599 | ["MiniMapButtonPos"] = vartable["minimapbuttonpos"], |
||
600 | ["TransparentBackground"] = vartable["transparentbackground"], |
||
601 | ["PCUF_CastPartySupport"] = vartable["PCUF_CastPartySupport"], |
||
602 | ["PCUF_ColorHealth"] = vartable["PCUF_ColorHealth"], |
||
603 | }; |
||
604 | end |
||
605 | |||
606 | if (Perl_Party_Frame) then |
||
607 | local vartable = Perl_Party_GetVars(); |
||
608 | Perl_Config_Global_Party_Config["Global Settings"] = { |
||
609 | ["Locked"] = vartable["locked"], |
||
610 | ["CompactMode"] = vartable["compactmode"], |
||
611 | ["PartyHidden"] = vartable["partyhidden"], |
||
612 | ["PartySpacing"] = vartable["partyspacing"], |
||
613 | ["Scale"] = vartable["scale"], |
||
614 | ["ShowPets"] = vartable["showpets"], |
||
615 | ["HealerMode"] = vartable["healermode"], |
||
616 | ["Transparency"] = vartable["transparency"], |
||
617 | ["BuffLocation"] = vartable["bufflocation"], |
||
618 | ["DebuffLocation"] = vartable["debufflocation"], |
||
619 | ["VerticalAlign"] = vartable["verticalalign"], |
||
620 | ["XPosition"] = floor(Perl_Party_Frame:GetLeft() + 0.5), |
||
621 | ["YPosition"] = floor(Perl_Party_Frame:GetTop() - (UIParent:GetTop() / Perl_Party_Frame:GetScale()) + 0.5), |
||
622 | ["CompactPercent"] = vartable["compactpercent"], |
||
623 | ["ShowPortrait"] = vartable["showportrait"], |
||
624 | ["ShowFKeys"] = vartable["showfkeys"], |
||
625 | ["DisplayCastableBuffs"] = vartable["displaycastablebuffs"], |
||
626 | ["ThreeDPortrait"] = vartable["threedportrait"], |
||
627 | ["BuffSize"] = vartable["buffsize"], |
||
628 | ["DebuffSize"] = vartable["debuffsize"], |
||
629 | }; |
||
630 | end |
||
631 | |||
632 | if (Perl_Party_Pet_Script_Frame) then |
||
633 | local vartable = Perl_Party_Pet_GetVars(); |
||
634 | Perl_Config_Global_Party_Pet_Config["Global Settings"] = { |
||
635 | ["Locked"] = vartable["locked"], |
||
636 | ["ShowPortrait"] = vartable["showportrait"], |
||
637 | ["ThreeDPortrait"] = vartable["threedportrait"], |
||
638 | ["Scale"] = vartable["scale"], |
||
639 | ["Transparency"] = vartable["transparency"], |
||
640 | ["Buffs"] = vartable["numpetbuffsshown"], |
||
641 | ["Debuffs"] = vartable["numpetdebuffsshown"], |
||
642 | ["BuffSize"] = vartable["buffsize"], |
||
643 | ["DebuffSize"] = vartable["debuffsize"], |
||
644 | ["BuffLocation"] = vartable["bufflocation"], |
||
645 | ["DebuffLocation"] = vartable["debufflocation"], |
||
646 | ["HiddenInRaids"] = vartable["hiddeninraids"], |
||
647 | ["XPosition1"] = floor(Perl_Party_Pet1:GetLeft() + 0.5), |
||
648 | ["YPosition1"] = floor(Perl_Party_Pet1:GetTop() - (UIParent:GetTop() / Perl_Party_Pet1:GetScale()) + 0.5), |
||
649 | ["XPosition2"] = floor(Perl_Party_Pet2:GetLeft() + 0.5), |
||
650 | ["YPosition2"] = floor(Perl_Party_Pet2:GetTop() - (UIParent:GetTop() / Perl_Party_Pet2:GetScale()) + 0.5), |
||
651 | ["XPosition3"] = floor(Perl_Party_Pet3:GetLeft() + 0.5), |
||
652 | ["YPosition3"] = floor(Perl_Party_Pet3:GetTop() - (UIParent:GetTop() / Perl_Party_Pet3:GetScale()) + 0.5), |
||
653 | ["XPosition4"] = floor(Perl_Party_Pet4:GetLeft() + 0.5), |
||
654 | ["YPosition4"] = floor(Perl_Party_Pet4:GetTop() - (UIParent:GetTop() / Perl_Party_Pet4:GetScale()) + 0.5), |
||
655 | }; |
||
656 | end |
||
657 | |||
658 | if (Perl_Player_Frame) then |
||
659 | local vartable = Perl_Player_GetVars(); |
||
660 | Perl_Config_Global_Player_Config["Global Settings"] = { |
||
661 | ["Locked"] = vartable["locked"], |
||
662 | ["XPBarState"] = vartable["xpbarstate"], |
||
663 | ["CompactMode"] = vartable["compactmode"], |
||
664 | ["ShowRaidGroup"] = vartable["showraidgroup"], |
||
665 | ["Scale"] = vartable["scale"], |
||
666 | ["HealerMode"] = vartable["healermode"], |
||
667 | ["Transparency"] = vartable["transparency"], |
||
668 | ["XPosition"] = floor(Perl_Player_Frame:GetLeft() + 0.5), |
||
669 | ["YPosition"] = floor(Perl_Player_Frame:GetTop() - (UIParent:GetTop() / Perl_Player_Frame:GetScale()) + 0.5), |
||
670 | ["ShowPortrait"] = vartable["showportrait"], |
||
671 | ["CompactPercent"] = vartable["compactpercent"], |
||
672 | ["ThreeDPortrait"] = vartable["threedportrait"], |
||
673 | ["PortraitCombatText"] = vartable["portraitcombattext"], |
||
674 | ["ShowDruidBar"] = vartable["showdruidbar"], |
||
675 | }; |
||
676 | end |
||
677 | |||
678 | if (Perl_Player_Buff_Script_Frame) then |
||
679 | local vartable = Perl_Player_Buff_GetVars(); |
||
680 | Perl_Config_Global_Player_Buff_Config["Global Settings"] = { |
||
681 | ["BuffAlerts"] = vartable["buffalerts"], |
||
682 | ["ShowBuffs"] = vartable["showbuffs"], |
||
683 | ["Scale"] = vartable["scale"], |
||
684 | }; |
||
685 | end |
||
686 | |||
687 | if (Perl_Player_Pet_Frame) then |
||
688 | local vartable = Perl_Player_Pet_GetVars(); |
||
689 | Perl_Config_Global_Player_Pet_Config["Global Settings"] = { |
||
690 | ["Locked"] = vartable["locked"], |
||
691 | ["ShowXP"] = vartable["showxp"], |
||
692 | ["Scale"] = vartable["scale"], |
||
693 | ["Buffs"] = vartable["numpetbuffsshown"], |
||
694 | ["Debuffs"] = vartable["numpetdebuffsshown"], |
||
695 | ["Transparency"] = vartable["transparency"], |
||
696 | ["BuffLocation"] = vartable["bufflocation"], |
||
697 | ["DebuffLocation"] = vartable["debufflocation"], |
||
698 | ["XPosition"] = floor(Perl_Player_Pet_Frame:GetLeft() + 0.5), |
||
699 | ["YPosition"] = floor(Perl_Player_Pet_Frame:GetTop() - (UIParent:GetTop() / Perl_Player_Pet_Frame:GetScale()) + 0.5), |
||
700 | ["BuffSize"] = vartable["buffsize"], |
||
701 | ["DebuffSize"] = vartable["debuffsize"], |
||
702 | ["ShowPortrait"] = vartable["showportrait"], |
||
703 | ["ThreeDPortrait"] = vartable["threedportrait"], |
||
704 | }; |
||
705 | end |
||
706 | |||
707 | if (Perl_Raid_Frame) then |
||
708 | local vartable = Perl_Raid_GetVars(); |
||
709 | Perl_Config_Global_Raid_Config["Global Settings"] = { |
||
710 | ["Locked"] = locked, |
||
711 | ["ShowGroup1"] = vartable["showgroup1"], |
||
712 | ["ShowGroup2"] = vartable["showgroup2"], |
||
713 | ["ShowGroup3"] = vartable["showgroup3"], |
||
714 | ["ShowGroup4"] = vartable["showgroup4"], |
||
715 | ["ShowGroup5"] = vartable["showgroup5"], |
||
716 | ["ShowGroup6"] = vartable["showgroup6"], |
||
717 | ["ShowGroup7"] = vartable["showgroup7"], |
||
718 | ["ShowGroup8"] = vartable["showgroup8"], |
||
719 | ["ShowPercents"] = vartable["showpercents"], |
||
720 | ["SortRaidByClass"] = vartable["sortraidbyclass"], |
||
721 | ["Transparency"] = vartable["transparency"], |
||
722 | ["Scale"] = vartable["scale"], |
||
723 | ["XPosition1"] = floor(Perl_Raid_Grp1:GetLeft() + 0.5), |
||
724 | ["YPosition1"] = floor(Perl_Raid_Grp1:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp1:GetScale()) + 0.5), |
||
725 | ["XPosition2"] = floor(Perl_Raid_Grp2:GetLeft() + 0.5), |
||
726 | ["YPosition2"] = floor(Perl_Raid_Grp2:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp2:GetScale()) + 0.5), |
||
727 | ["XPosition3"] = floor(Perl_Raid_Grp3:GetLeft() + 0.5), |
||
728 | ["YPosition3"] = floor(Perl_Raid_Grp3:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp3:GetScale()) + 0.5), |
||
729 | ["XPosition4"] = floor(Perl_Raid_Grp4:GetLeft() + 0.5), |
||
730 | ["YPosition4"] = floor(Perl_Raid_Grp4:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp4:GetScale()) + 0.5), |
||
731 | ["XPosition5"] = floor(Perl_Raid_Grp5:GetLeft() + 0.5), |
||
732 | ["YPosition5"] = floor(Perl_Raid_Grp5:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp5:GetScale()) + 0.5), |
||
733 | ["XPosition6"] = floor(Perl_Raid_Grp6:GetLeft() + 0.5), |
||
734 | ["YPosition6"] = floor(Perl_Raid_Grp6:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp6:GetScale()) + 0.5), |
||
735 | ["XPosition7"] = floor(Perl_Raid_Grp7:GetLeft() + 0.5), |
||
736 | ["YPosition7"] = floor(Perl_Raid_Grp7:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp7:GetScale()) + 0.5), |
||
737 | ["XPosition8"] = floor(Perl_Raid_Grp8:GetLeft() + 0.5), |
||
738 | ["YPosition8"] = floor(Perl_Raid_Grp8:GetTop() - (UIParent:GetTop() / Perl_Raid_Grp8:GetScale()) + 0.5), |
||
739 | ["ShowHeaders"] = vartable["showheaders"], |
||
740 | ["ShowMissingHealth"] = vartable["showmissinghealth"], |
||
741 | ["VerticalAlign"] = vartable["verticalalign"], |
||
742 | }; |
||
743 | end |
||
744 | |||
745 | if (Perl_Target_Frame) then |
||
746 | local vartable = Perl_Target_GetVars(); |
||
747 | Perl_Config_Global_Target_Config["Global Settings"] = { |
||
748 | ["Locked"] = vartable["locked"], |
||
749 | ["ComboPoints"] = vartable["showcp"], |
||
750 | ["ClassIcon"] = vartable["showclassicon"], |
||
751 | ["ClassFrame"] = vartable["showclassframe"], |
||
752 | ["PvPIcon"] = vartable["showpvpicon"], |
||
753 | ["Buffs"] = vartable["numbuffsshown"], |
||
754 | ["Debuffs"] = vartable["numdebuffsshown"], |
||
755 | ["MobHealthSupport"] = vartable["mobhealthsupport"], |
||
756 | ["Scale"] = vartable["scale"], |
||
757 | ["ShowPvPRank"] = vartable["showpvprank"], |
||
758 | ["Transparency"] = vartable["transparency"], |
||
759 | ["BuffDebuffScale"] = vartable["buffdebuffscale"], |
||
760 | ["XPosition"] = floor(Perl_Target_Frame:GetLeft() + 0.5), |
||
761 | ["YPosition"] = floor(Perl_Target_Frame:GetTop() - (UIParent:GetTop() / Perl_Target_Frame:GetScale()) + 0.5), |
||
762 | ["ShowPortrait"] = vartable["showportrait"], |
||
763 | ["ThreeDPortrait"] = vartable["threedportrait"], |
||
764 | ["PortraitCombatText"] = vartable["portraitcombattext"], |
||
765 | ["ShowRareEliteFrame"] = vartable["showrareeliteframe"], |
||
766 | ["NameFrameComboPoints"] = vartable["nameframecombopoints"], |
||
767 | ["ComboFrameDebuffs"] = vartable["comboframedebuffs"], |
||
768 | ["FrameStyle"] = vartable["framestyle"], |
||
769 | ["CompactMode"] = vartable["compactmode"], |
||
770 | ["CompactPercent"] = vartable["compactpercent"], |
||
771 | ["HideBuffBackground"] = vartable["hidebuffbackground"], |
||
772 | }; |
||
773 | end |
||
774 | |||
775 | if (Perl_Target_Target_Script_Frame) then |
||
776 | local vartable = Perl_Target_Target_GetVars(); |
||
777 | Perl_Config_Global_Target_Target_Config["Global Settings"] = { |
||
778 | ["Locked"] = vartable["locked"], |
||
779 | ["MobHealthSupport"] = vartable["mobhealthsupport"], |
||
780 | ["Scale"] = vartable["scale"], |
||
781 | ["ToTSupport"] = vartable["totsupport"], |
||
782 | ["ToToTSupport"] = vartable["tototsupport"], |
||
783 | ["Transparency"] = vartable["transparency"], |
||
784 | ["XPositionToT"] = floor(Perl_Target_Target_Frame:GetLeft() + 0.5), |
||
785 | ["YPositionToT"] = floor(Perl_Target_Target_Frame:GetTop() - (UIParent:GetTop() / Perl_Target_Target_Frame:GetScale()) + 0.5), |
||
786 | ["XPositionToToT"] = floor(Perl_Target_Target_Target_Frame:GetLeft() + 0.5), |
||
787 | ["YPositionToToT"] = floor(Perl_Target_Target_Target_Frame:GetTop() - (UIParent:GetTop() / Perl_Target_Target_Target_Frame:GetScale()) + 0.5), |
||
788 | ["AlertSound"] = vartable["alertsound"], |
||
789 | ["AlertMode"] = vartable["alertmode"], |
||
790 | ["AlertSize"] = vartable["alertsize"], |
||
791 | }; |
||
792 | end |
||
793 | end |
||
794 | |||
795 | function Perl_Config_Global_Load_Settings() |
||
796 | -- Load all global settings from last save and then do window positions in this mod since we aren't saving the positions in each individual mod (and to keep all position changes in one file instead of six). |
||
797 | if (Perl_ArcaneBar_Frame_Loaded_Frame) then |
||
798 | Perl_ArcaneBar_UpdateVars(Perl_Config_Global_ArcaneBar_Config); |
||
799 | end |
||
800 | |||
801 | if (Perl_CombatDisplay_Frame) then |
||
802 | Perl_CombatDisplay_UpdateVars(Perl_Config_Global_CombatDisplay_Config); |
||
803 | |||
804 | if (Perl_Config_Global_CombatDisplay_Config["Global Settings"] ~= nil) then |
||
805 | if ((Perl_Config_Global_CombatDisplay_Config["Global Settings"]["XPositionCD"] ~= nil) and (Perl_Config_Global_CombatDisplay_Config["Global Settings"]["YPositionCD"] ~= nil) and (Perl_Config_Global_CombatDisplay_Config["Global Settings"]["XPositionCDT"] ~= nil) and (Perl_Config_Global_CombatDisplay_Config["Global Settings"]["YPositionCDT"] ~= nil)) then |
||
806 | Perl_CombatDisplay_Frame:SetUserPlaced(1); |
||
807 | Perl_CombatDisplay_Target_Frame:SetUserPlaced(1); |
||
808 | Perl_CombatDisplay_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_CombatDisplay_Config["Global Settings"]["XPositionCD"], Perl_Config_Global_CombatDisplay_Config["Global Settings"]["YPositionCD"]); |
||
809 | Perl_CombatDisplay_Target_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_CombatDisplay_Config["Global Settings"]["XPositionCDT"], Perl_Config_Global_CombatDisplay_Config["Global Settings"]["YPositionCDT"]); |
||
810 | end |
||
811 | end |
||
812 | end |
||
813 | |||
814 | if (Perl_Config_Frame) then |
||
815 | Perl_Config_UpdateVars(Perl_Config_Global_Config_Config); |
||
816 | end |
||
817 | |||
818 | if (Perl_Party_Frame) then |
||
819 | Perl_Party_UpdateVars(Perl_Config_Global_Party_Config); |
||
820 | |||
821 | if (Perl_Config_Global_Party_Config["Global Settings"] ~= nil) then |
||
822 | if ((Perl_Config_Global_Party_Config["Global Settings"]["XPosition"] ~= nil) and (Perl_Config_Global_Party_Config["Global Settings"]["YPosition"] ~= nil)) then |
||
823 | Perl_Party_Frame:SetUserPlaced(1); |
||
824 | Perl_Party_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Party_Config["Global Settings"]["XPosition"], Perl_Config_Global_Party_Config["Global Settings"]["YPosition"]); |
||
825 | end |
||
826 | end |
||
827 | end |
||
828 | |||
829 | if (Perl_Party_Pet_Script_Frame) then |
||
830 | Perl_Party_Pet_UpdateVars(Perl_Config_Global_Party_Pet_Config); |
||
831 | |||
832 | if (Perl_Config_Global_Party_Pet_Config["Global Settings"] ~= nil) then |
||
833 | if ((Perl_Config_Global_Party_Pet_Config["Global Settings"]["XPosition1"] ~= nil) and (Perl_Config_Global_Party_Pet_Config["Global Settings"]["YPosition1"] ~= nil)) then |
||
834 | Perl_Party_Pet1:SetUserPlaced(1); |
||
835 | Perl_Party_Pet2:SetUserPlaced(1); |
||
836 | Perl_Party_Pet3:SetUserPlaced(1); |
||
837 | Perl_Party_Pet4:SetUserPlaced(1); |
||
838 | Perl_Party_Pet1:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Party_Pet_Config["Global Settings"]["XPosition1"], Perl_Config_Global_Party_Pet_Config["Global Settings"]["YPosition1"]); |
||
839 | Perl_Party_Pet2:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Party_Pet_Config["Global Settings"]["XPosition2"], Perl_Config_Global_Party_Pet_Config["Global Settings"]["YPosition2"]); |
||
840 | Perl_Party_Pet3:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Party_Pet_Config["Global Settings"]["XPosition3"], Perl_Config_Global_Party_Pet_Config["Global Settings"]["YPosition3"]); |
||
841 | Perl_Party_Pet4:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Party_Pet_Config["Global Settings"]["XPosition4"], Perl_Config_Global_Party_Pet_Config["Global Settings"]["YPosition4"]); |
||
842 | end |
||
843 | end |
||
844 | end |
||
845 | |||
846 | if (Perl_Player_Frame) then |
||
847 | Perl_Player_UpdateVars(Perl_Config_Global_Player_Config); |
||
848 | |||
849 | if (Perl_Config_Global_Player_Config["Global Settings"] ~= nil) then |
||
850 | if ((Perl_Config_Global_Player_Config["Global Settings"]["XPosition"] ~= nil) and (Perl_Config_Global_Player_Config["Global Settings"]["YPosition"] ~= nil)) then |
||
851 | Perl_Player_Frame:SetUserPlaced(1); |
||
852 | Perl_Player_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Player_Config["Global Settings"]["XPosition"], Perl_Config_Global_Player_Config["Global Settings"]["YPosition"]); |
||
853 | end |
||
854 | end |
||
855 | end |
||
856 | |||
857 | if (Perl_Player_Buff_Script_Frame) then |
||
858 | Perl_Player_Buff_UpdateVars(Perl_Config_Global_Player_Buff_Config); |
||
859 | end |
||
860 | |||
861 | if (Perl_Player_Pet_Frame) then |
||
862 | Perl_Player_Pet_UpdateVars(Perl_Config_Global_Player_Pet_Config); |
||
863 | |||
864 | if (Perl_Config_Global_Player_Pet_Config["Global Settings"] ~= nil) then |
||
865 | if ((Perl_Config_Global_Player_Pet_Config["Global Settings"]["XPosition"] ~= nil) and (Perl_Config_Global_Player_Pet_Config["Global Settings"]["YPosition"] ~= nil)) then |
||
866 | Perl_Player_Pet_Frame:SetUserPlaced(1); |
||
867 | Perl_Player_Pet_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Player_Pet_Config["Global Settings"]["XPosition"], Perl_Config_Global_Player_Pet_Config["Global Settings"]["YPosition"]); |
||
868 | end |
||
869 | end |
||
870 | end |
||
871 | |||
872 | if (Perl_Raid_Frame) then |
||
873 | Perl_Raid_UpdateVars(Perl_Config_Global_Raid_Config); |
||
874 | |||
875 | if (Perl_Config_Global_Raid_Config["Global Settings"] ~= nil) then |
||
876 | if ((Perl_Config_Global_Raid_Config["Global Settings"]["XPosition1"] ~= nil) and (Perl_Config_Global_Raid_Config["Global Settings"]["YPosition1"] ~= nil)) then |
||
877 | Perl_Raid_Grp1:SetUserPlaced(1); |
||
878 | Perl_Raid_Grp2:SetUserPlaced(1); |
||
879 | Perl_Raid_Grp3:SetUserPlaced(1); |
||
880 | Perl_Raid_Grp4:SetUserPlaced(1); |
||
881 | Perl_Raid_Grp5:SetUserPlaced(1); |
||
882 | Perl_Raid_Grp6:SetUserPlaced(1); |
||
883 | Perl_Raid_Grp7:SetUserPlaced(1); |
||
884 | Perl_Raid_Grp8:SetUserPlaced(1); |
||
885 | Perl_Raid_Grp1:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition1"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition1"]); |
||
886 | Perl_Raid_Grp2:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition2"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition2"]); |
||
887 | Perl_Raid_Grp3:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition3"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition3"]); |
||
888 | Perl_Raid_Grp4:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition4"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition4"]); |
||
889 | Perl_Raid_Grp5:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition5"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition5"]); |
||
890 | Perl_Raid_Grp6:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition6"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition6"]); |
||
891 | Perl_Raid_Grp7:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition7"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition7"]); |
||
892 | Perl_Raid_Grp8:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Raid_Config["Global Settings"]["XPosition8"], Perl_Config_Global_Raid_Config["Global Settings"]["YPosition8"]); |
||
893 | end |
||
894 | end |
||
895 | end |
||
896 | |||
897 | if (Perl_Target_Frame) then |
||
898 | Perl_Target_UpdateVars(Perl_Config_Global_Target_Config); |
||
899 | |||
900 | if (Perl_Config_Global_Target_Config["Global Settings"] ~= nil) then |
||
901 | if ((Perl_Config_Global_Target_Config["Global Settings"]["XPosition"] ~= nil) and (Perl_Config_Global_Target_Config["Global Settings"]["YPosition"] ~= nil)) then |
||
902 | Perl_Target_Frame:SetUserPlaced(1); |
||
903 | Perl_Target_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Target_Config["Global Settings"]["XPosition"], Perl_Config_Global_Target_Config["Global Settings"]["YPosition"]); |
||
904 | end |
||
905 | end |
||
906 | end |
||
907 | |||
908 | if (Perl_Target_Target_Script_Frame) then |
||
909 | Perl_Target_Target_UpdateVars(Perl_Config_Global_Target_Target_Config); |
||
910 | |||
911 | if (Perl_Config_Global_Target_Target_Config["Global Settings"] ~= nil) then |
||
912 | if ((Perl_Config_Global_Target_Target_Config["Global Settings"]["XPositionToT"] ~= nil) and (Perl_Config_Global_Target_Target_Config["Global Settings"]["YPositionToT"] ~= nil) and (Perl_Config_Global_Target_Target_Config["Global Settings"]["XPositionToToT"] ~= nil) and (Perl_Config_Global_Target_Target_Config["Global Settings"]["YPositionToToT"] ~= nil)) then |
||
913 | Perl_Target_Target_Frame:SetUserPlaced(1); |
||
914 | Perl_Target_Target_Target_Frame:SetUserPlaced(1); |
||
915 | Perl_Target_Target_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Target_Target_Config["Global Settings"]["XPositionToT"], Perl_Config_Global_Target_Target_Config["Global Settings"]["YPositionToT"]); |
||
916 | Perl_Target_Target_Target_Frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", Perl_Config_Global_Target_Target_Config["Global Settings"]["XPositionToToT"], Perl_Config_Global_Target_Target_Config["Global Settings"]["YPositionToToT"]); |
||
917 | end |
||
918 | end |
||
919 | end |
||
920 | end |
||
921 | |||
922 | ------------------------------ |
||
923 | -- Saved Variable Functions -- |
||
924 | ------------------------------ |
||
925 | function Perl_Config_GetVars() |
||
926 | texture = Perl_Config_Config[UnitName("player")]["Texture"]; |
||
927 | showminimapbutton = Perl_Config_Config[UnitName("player")]["ShowMiniMapButton"]; |
||
928 | minimapbuttonpos = Perl_Config_Config[UnitName("player")]["MiniMapButtonPos"]; |
||
929 | transparentbackground = Perl_Config_Config[UnitName("player")]["TransparentBackground"]; |
||
930 | PCUF_CASTPARTYSUPPORT = Perl_Config_Config[UnitName("player")]["PCUF_CastPartySupport"]; |
||
931 | PCUF_COLORHEALTH = Perl_Config_Config[UnitName("player")]["PCUF_ColorHealth"]; |
||
932 | |||
933 | if (texture == nil) then |
||
934 | texture = 0; |
||
935 | end |
||
936 | if (showminimapbutton == nil) then |
||
937 | showminimapbutton = 1; |
||
938 | end |
||
939 | if (minimapbuttonpos == nil) then |
||
940 | minimapbuttonpos = 270; |
||
941 | end |
||
942 | if (transparentbackground == nil) then |
||
943 | transparentbackground = 0; |
||
944 | end |
||
945 | if (PCUF_CASTPARTYSUPPORT == nil) then |
||
946 | PCUF_CASTPARTYSUPPORT = 1; |
||
947 | end |
||
948 | if (PCUF_COLORHEALTH == nil) then |
||
949 | PCUF_COLORHEALTH = 0; |
||
950 | end |
||
951 | |||
952 | local vars = { |
||
953 | ["texture"] = texture, |
||
954 | ["showminimapbutton"] = showminimapbutton, |
||
955 | ["minimapbuttonpos"] = minimapbuttonpos, |
||
956 | ["transparentbackground"] = transparentbackground, |
||
957 | ["PCUF_CastPartySupport"] = PCUF_CASTPARTYSUPPORT, |
||
958 | ["PCUF_ColorHealth"] = PCUF_COLORHEALTH, |
||
959 | } |
||
960 | return vars; |
||
961 | end |
||
962 | |||
963 | function Perl_Config_UpdateVars(vartable) |
||
964 | if (vartable ~= nil) then |
||
965 | -- Sanity checks in case you use a load from an old version |
||
966 | if (vartable["Global Settings"] ~= nil) then |
||
967 | if (vartable["Global Settings"]["Texture"] ~= nil) then |
||
968 | texture = vartable["Global Settings"]["Texture"]; |
||
969 | else |
||
970 | texture = nil; |
||
971 | end |
||
972 | if (vartable["Global Settings"]["ShowMiniMapButton"] ~= nil) then |
||
973 | showminimapbutton = vartable["Global Settings"]["ShowMiniMapButton"]; |
||
974 | else |
||
975 | showminimapbutton = nil; |
||
976 | end |
||
977 | if (vartable["Global Settings"]["MiniMapButtonPos"] ~= nil) then |
||
978 | minimapbuttonpos = vartable["Global Settings"]["MiniMapButtonPos"]; |
||
979 | else |
||
980 | minimapbuttonpos = nil; |
||
981 | end |
||
982 | if (vartable["Global Settings"]["TransparentBackground"] ~= nil) then |
||
983 | transparentbackground = vartable["Global Settings"]["TransparentBackground"]; |
||
984 | else |
||
985 | transparentbackground = nil; |
||
986 | end |
||
987 | if (vartable["Global Settings"]["PCUF_CastPartySupport"] ~= nil) then |
||
988 | PCUF_CASTPARTYSUPPORT = vartable["Global Settings"]["PCUF_CastPartySupport"]; |
||
989 | else |
||
990 | PCUF_CASTPARTYSUPPORT = nil; |
||
991 | end |
||
992 | if (vartable["Global Settings"]["PCUF_ColorHealth"] ~= nil) then |
||
993 | PCUF_COLORHEALTH = vartable["Global Settings"]["PCUF_ColorHealth"]; |
||
994 | else |
||
995 | PCUF_COLORHEALTH = nil; |
||
996 | end |
||
997 | end |
||
998 | |||
999 | -- Set the new values if any new values were found, same defaults as above |
||
1000 | if (texture == nil) then |
||
1001 | texture = 0; |
||
1002 | end |
||
1003 | if (showminimapbutton == nil) then |
||
1004 | showminimapbutton = 1; |
||
1005 | end |
||
1006 | if (minimapbuttonpos == nil) then |
||
1007 | minimapbuttonpos = 270; |
||
1008 | end |
||
1009 | if (transparentbackground == nil) then |
||
1010 | transparentbackground = 0; |
||
1011 | end |
||
1012 | if (PCUF_CASTPARTYSUPPORT == nil) then |
||
1013 | PCUF_CASTPARTYSUPPORT = 1; |
||
1014 | end |
||
1015 | if (PCUF_COLORHEALTH == nil) then |
||
1016 | PCUF_COLORHEALTH = 0; |
||
1017 | end |
||
1018 | |||
1019 | -- Call any code we need to activate them |
||
1020 | Perl_Config_Set_Texture(texture); |
||
1021 | Perl_Config_Set_MiniMap_Button(showminimapbutton); |
||
1022 | Perl_Config_Set_MiniMap_Position(minimapbuttonpos); |
||
1023 | Perl_Config_Set_Background(); |
||
1024 | end |
||
1025 | |||
1026 | Perl_Config_Config[UnitName("player")] = { |
||
1027 | ["Texture"] = texture, |
||
1028 | ["ShowMiniMapButton"] = showminimapbutton, |
||
1029 | ["MiniMapButtonPos"] = minimapbuttonpos, |
||
1030 | ["TransparentBackground"] = transparentbackground, |
||
1031 | ["PCUF_CastPartySupport"] = PCUF_CASTPARTYSUPPORT, |
||
1032 | ["PCUF_ColorHealth"] = PCUF_COLORHEALTH, |
||
1033 | }; |
||
1034 | end |
||
1035 | |||
1036 | |||
1037 | ------------------------- |
||
1038 | -- The Toggle Function -- |
||
1039 | ------------------------- |
||
1040 | function Perl_Config_Toggle() |
||
1041 | if (Perl_Config_Frame:IsVisible()) then |
||
1042 | Perl_Config_Frame:Hide(); |
||
1043 | Perl_Config_Hide_All(); |
||
1044 | else |
||
1045 | Perl_Config_Frame:Show(); |
||
1046 | Perl_Config_Hide_All(); |
||
1047 | end |
||
1048 | end |
||
1049 | |||
1050 | function Perl_Config_Hide_All() |
||
1051 | Perl_Config_All_Frame:Hide(); |
||
1052 | Perl_Config_ArcaneBar_Frame:Hide(); |
||
1053 | Perl_Config_CombatDisplay_Frame:Hide(); |
||
1054 | Perl_Config_NotInstalled_Frame:Hide(); |
||
1055 | Perl_Config_Party_Frame:Hide(); |
||
1056 | Perl_Config_Party_Pet_Frame:Hide(); |
||
1057 | Perl_Config_Player_Frame:Hide(); |
||
1058 | Perl_Config_Player_Buff_Frame:Hide(); |
||
1059 | Perl_Config_Player_Pet_Frame:Hide(); |
||
1060 | Perl_Config_Raid_Frame:Hide(); |
||
1061 | Perl_Config_Target_Frame:Hide(); |
||
1062 | Perl_Config_Target_Target_Frame:Hide(); |
||
1063 | end |
||
1064 | |||
1065 | function Perl_Config_ShowHide_MiniMap_Button() |
||
1066 | if (showminimapbutton == 0) then |
||
1067 | Perl_Config_ButtonFrame:Hide(); |
||
1068 | else |
||
1069 | Perl_Config_ButtonFrame:Show(); |
||
1070 | end |
||
1071 | end |
||
1072 | |||
1073 | |||
1074 | --------------------------- |
||
1075 | -- The Minimap Functions -- |
||
1076 | --------------------------- |
||
1077 | function Perl_Config_Button_OnClick() |
||
1078 | Perl_Config_Toggle(); |
||
1079 | end |
||
1080 | |||
1081 | function Perl_Config_Button_UpdatePosition() |
||
1082 | Perl_Config_ButtonFrame:SetPoint( |
||
1083 | "TOPLEFT", |
||
1084 | "Minimap", |
||
1085 | "TOPLEFT", |
||
1086 | 55 - (75 * cos(minimapbuttonpos)), |
||
1087 | (75 * sin(minimapbuttonpos)) - 55 |
||
1088 | ); |
||
1089 | end |
||
1090 | |||
1091 | |||
1092 | ---------------------- |
||
1093 | -- myAddOns Support -- |
||
1094 | ---------------------- |
||
1095 | function Perl_Config_myAddOns_Support() |
||
1096 | -- Register the addon in myAddOns |
||
1097 | if (myAddOnsFrame_Register) then |
||
1098 | local Perl_Config_myAddOns_Details = { |
||
1099 | name = "Perl_Config", |
||
1100 | version = "Version 0.58", |
||
1101 | releaseDate = "April 15, 2006", |
||
1102 | author = "Global", |
||
1103 | email = "global@g-ball.com", |
||
1104 | website = "http://www.curse-gaming.com/mod.php?addid=2257", |
||
1105 | category = MYADDONS_CATEGORY_OTHERS, |
||
1106 | optionsframe = "Perl_Config_Frame", |
||
1107 | }; |
||
1108 | Perl_Config_myAddOns_Help = {}; |
||
1109 | Perl_Config_myAddOns_Help[1] = "/perl"; |
||
1110 | myAddOnsFrame_Register(Perl_Config_myAddOns_Details, Perl_Config_myAddOns_Help); |
||
1111 | end |
||
1112 | end |