comparison CyborgMMO7.lua @ 0:bf9220814fb5

The first version of the Cyborg MMO7 addon for warcraft
author madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09
date Tue, 24 Jan 2012 17:14:21 +0000
parents
children a4e2eaf9cad9
comparison
equal deleted inserted replaced
-1:000000000000 0:bf9220814fb5
1 --~ Warcraft Plugin for Cyborg MMO7
2 --~ Filename: CyborgMMO7.lua
3 --~ Description: Plugin entry point, String tables and other generic crap that I could not think to put anywhere else.
4 --~ Copyright (C) 2012 Mad Catz Inc.
5 --~ Author: Christopher Hooks
6
7 --~ This program is free software; you can redistribute it and/or
8 --~ modify it under the terms of the GNU General Public License
9 --~ as published by the Free Software Foundation; either version 2
10 --~ of the License, or (at your option) any later version.
11
12 --~ This program is distributed in the hope that it will be useful,
13 --~ but WITHOUT ANY WARRANTY; without even the implied warranty of
14 --~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 --~ GNU General Public License for more details.
16
17 --~ You should have received a copy of the GNU General Public License
18 --~ along with this program; if not, write to the Free Software
19 --~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
21 Mode = {
22 ["enUS"] = {
23 "ALT-CTRL-E",
24 "ALT-CTRL-F",
25 "ALT-CTRL-["
26 },
27 ["frFR"] = {
28 "ALT-CTRL-E",
29 "ALT-CTRL-F",
30 "ALT-CTRL-^"
31 },
32 ["deDE"] = {
33 "ALT-CTRL-E",
34 "ALT-CTRL-F",
35 "ALT-CTRL-ü"
36 },
37 ["zhCN"] = {
38 "ALT-CTRL-E",
39 "ALT-CTRL-F",
40 "ALT-CTRL-["
41 },
42 ["zhTW"] = {
43 "ALT-CTRL-E",
44 "ALT-CTRL-F",
45 "ALT-CTRL-["
46 },
47 ["esES"] = {
48 "ALT-CTRL-E",
49 "ALT-CTRL-F",
50 "ALT-CTRL-'"
51 },
52 ["esMX"] = {
53 "ALT-CTRL-E",
54 "ALT-CTRL-F",
55 "ALT-CTRL-'"
56 }
57 }
58
59 WowCommands = {
60 ["enUS"] = {
61 "ALT-CTRL-NUMPAD1",
62 "ALT-CTRL-NUMPAD2",
63 "ALT-CTRL-NUMPAD3",
64 "ALT-CTRL-NUMPAD4",
65 "ALT-CTRL-NUMPAD5",
66 "ALT-CTRL-NUMPAD6",
67 "ALT-CTRL-NUMPAD7",
68 "ALT-CTRL-NUMPAD8",
69 "ALT-CTRL-NUMPAD9",
70 "ALT-CTRL-NUMPAD0",
71 "ALT-CTRL-1",
72 "ALT-CTRL-2",
73 "ALT-CTRL-3",
74 "ALT-CTRL-4",
75 "ALT-CTRL-5",
76 "ALT-CTRL-6",
77 "ALT-CTRL-7",
78 "ALT-CTRL-8",
79 "ALT-CTRL-9",
80 "ALT-CTRL-0",
81 "ALT-CTRL-F1",
82 "ALT-CTRL-F2",
83 "ALT-CTRL-F3",
84 "ALT-CTRL-F4",
85 "ALT-CTRL-F5",
86 "ALT-CTRL-F6",
87 "ALT-CTRL-F7",
88 "ALT-CTRL-F8",
89 "ALT-CTRL-F9",
90 "ALT-CTRL-F10",
91 "ALT-CTRL-F11",
92 "ALT-CTRL-F12",
93 "ALT-CTRL--",
94 "ALT-CTRL-H",
95 "ALT-CTRL-A",
96 "ALT-CTRL-B",
97 "ALT-CTRL-C",
98 "ALT-CTRL-D",
99 "ALT-CTRL-END"
100 },
101 ["frFR"] = {
102 "ALT-CTRL-NUMPAD1",
103 "ALT-CTRL-NUMPAD2",
104 "ALT-CTRL-NUMPAD3",
105 "ALT-CTRL-NUMPAD4",
106 "ALT-CTRL-NUMPAD5",
107 "ALT-CTRL-NUMPAD6",
108 "ALT-CTRL-NUMPAD7",
109 "ALT-CTRL-NUMPAD8",
110 "ALT-CTRL-NUMPAD9",
111 "ALT-CTRL-NUMPAD0",
112 "ALT-CTRL-1",
113 "ALT-CTRL-2",
114 "ALT-CTRL-3",
115 "ALT-CTRL-4",
116 "ALT-CTRL-5",
117 "ALT-CTRL-6",
118 "ALT-CTRL-7",
119 "ALT-CTRL-8",
120 "ALT-CTRL-9",
121 "ALT-CTRL-0",
122 "ALT-CTRL-F1",
123 "ALT-CTRL-F2",
124 "ALT-CTRL-F3",
125 "ALT-CTRL-F4",
126 "ALT-CTRL-F5",
127 "ALT-CTRL-F6",
128 "ALT-CTRL-F7",
129 "ALT-CTRL-F8",
130 "ALT-CTRL-F9",
131 "ALT-CTRL-F10",
132 "ALT-CTRL-F11",
133 "ALT-CTRL-F12",
134 "ALT-CTRL-)",
135 "ALT-CTRL-H",
136 "ALT-CTRL-Q",
137 "ALT-CTRL-B",
138 "ALT-CTRL-C",
139 "ALT-CTRL-D",
140 "ALT-CTRL-END"
141 },
142 ["deDE"] = {
143 "ALT-CTRL-NUMPAD1",
144 "ALT-CTRL-NUMPAD2",
145 "ALT-CTRL-NUMPAD3",
146 "ALT-CTRL-NUMPAD4",
147 "ALT-CTRL-NUMPAD5",
148 "ALT-CTRL-NUMPAD6",
149 "ALT-CTRL-NUMPAD7",
150 "ALT-CTRL-NUMPAD8",
151 "ALT-CTRL-NUMPAD9",
152 "ALT-CTRL-NUMPAD0",
153 "ALT-CTRL-1",
154 "ALT-CTRL-2",
155 "ALT-CTRL-3",
156 "ALT-CTRL-4",
157 "ALT-CTRL-5",
158 "ALT-CTRL-6",
159 "ALT-CTRL-7",
160 "ALT-CTRL-8",
161 "ALT-CTRL-9",
162 "ALT-CTRL-0",
163 "ALT-CTRL-F1",
164 "ALT-CTRL-F2",
165 "ALT-CTRL-F3",
166 "ALT-CTRL-F4",
167 "ALT-CTRL-F5",
168 "ALT-CTRL-F6",
169 "ALT-CTRL-F7",
170 "ALT-CTRL-F8",
171 "ALT-CTRL-F9",
172 "ALT-CTRL-F10",
173 "ALT-CTRL-F11",
174 "ALT-CTRL-F12",
175 "ALT-CTRL-ß",
176 "ALT-CTRL-H",
177 "ALT-CTRL-A",
178 "ALT-CTRL-B",
179 "ALT-CTRL-C",
180 "ALT-CTRL-D",
181 "ALT-CTRL-END"
182 },
183 ["zhCN"] = {
184 "ALT-CTRL-NUMPAD1",
185 "ALT-CTRL-NUMPAD2",
186 "ALT-CTRL-NUMPAD3",
187 "ALT-CTRL-NUMPAD4",
188 "ALT-CTRL-NUMPAD5",
189 "ALT-CTRL-NUMPAD6",
190 "ALT-CTRL-NUMPAD7",
191 "ALT-CTRL-NUMPAD8",
192 "ALT-CTRL-NUMPAD9",
193 "ALT-CTRL-NUMPAD0",
194 "ALT-CTRL-1",
195 "ALT-CTRL-2",
196 "ALT-CTRL-3",
197 "ALT-CTRL-4",
198 "ALT-CTRL-5",
199 "ALT-CTRL-6",
200 "ALT-CTRL-7",
201 "ALT-CTRL-8",
202 "ALT-CTRL-9",
203 "ALT-CTRL-0",
204 "ALT-CTRL-F1",
205 "ALT-CTRL-F2",
206 "ALT-CTRL-F3",
207 "ALT-CTRL-F4",
208 "ALT-CTRL-F5",
209 "ALT-CTRL-F6",
210 "ALT-CTRL-F7",
211 "ALT-CTRL-F8",
212 "ALT-CTRL-F9",
213 "ALT-CTRL-F10",
214 "ALT-CTRL-F11",
215 "ALT-CTRL-F12",
216 "ALT-CTRL--",
217 "ALT-CTRL-H",
218 "ALT-CTRL-A",
219 "ALT-CTRL-B",
220 "ALT-CTRL-C",
221 "ALT-CTRL-D",
222 "ALT-CTRL-END"
223 },
224 ["zhTW"] = {
225 "ALT-CTRL-NUMPAD1",
226 "ALT-CTRL-NUMPAD2",
227 "ALT-CTRL-NUMPAD3",
228 "ALT-CTRL-NUMPAD4",
229 "ALT-CTRL-NUMPAD5",
230 "ALT-CTRL-NUMPAD6",
231 "ALT-CTRL-NUMPAD7",
232 "ALT-CTRL-NUMPAD8",
233 "ALT-CTRL-NUMPAD9",
234 "ALT-CTRL-NUMPAD0",
235 "ALT-CTRL-1",
236 "ALT-CTRL-2",
237 "ALT-CTRL-3",
238 "ALT-CTRL-4",
239 "ALT-CTRL-5",
240 "ALT-CTRL-6",
241 "ALT-CTRL-7",
242 "ALT-CTRL-8",
243 "ALT-CTRL-9",
244 "ALT-CTRL-0",
245 "ALT-CTRL-F1",
246 "ALT-CTRL-F2",
247 "ALT-CTRL-F3",
248 "ALT-CTRL-F4",
249 "ALT-CTRL-F5",
250 "ALT-CTRL-F6",
251 "ALT-CTRL-F7",
252 "ALT-CTRL-F8",
253 "ALT-CTRL-F9",
254 "ALT-CTRL-F10",
255 "ALT-CTRL-F11",
256 "ALT-CTRL-F12",
257 "ALT-CTRL--",
258 "ALT-CTRL-H",
259 "ALT-CTRL-A",
260 "ALT-CTRL-B",
261 "ALT-CTRL-C",
262 "ALT-CTRL-D",
263 "ALT-CTRL-END"
264 },
265 ["esES"] = {
266 "ALT-CTRL-NUMPAD1",
267 "ALT-CTRL-NUMPAD2",
268 "ALT-CTRL-NUMPAD3",
269 "ALT-CTRL-NUMPAD4",
270 "ALT-CTRL-NUMPAD5",
271 "ALT-CTRL-NUMPAD6",
272 "ALT-CTRL-NUMPAD7",
273 "ALT-CTRL-NUMPAD8",
274 "ALT-CTRL-NUMPAD9",
275 "ALT-CTRL-NUMPAD0",
276 "ALT-CTRL-1",
277 "ALT-CTRL-2",
278 "ALT-CTRL-3",
279 "ALT-CTRL-4",
280 "ALT-CTRL-5",
281 "ALT-CTRL-6",
282 "ALT-CTRL-7",
283 "ALT-CTRL-8",
284 "ALT-CTRL-9",
285 "ALT-CTRL-0",
286 "ALT-CTRL-F1",
287 "ALT-CTRL-F2",
288 "ALT-CTRL-F3",
289 "ALT-CTRL-F4",
290 "ALT-CTRL-F5",
291 "ALT-CTRL-F6",
292 "ALT-CTRL-F7",
293 "ALT-CTRL-F8",
294 "ALT-CTRL-F9",
295 "ALT-CTRL-F10",
296 "ALT-CTRL-F11",
297 "ALT-CTRL-F12",
298 "ALT-CTRL-'",
299 "ALT-CTRL-H",
300 "ALT-CTRL-A",
301 "ALT-CTRL-B",
302 "ALT-CTRL-C",
303 "ALT-CTRL-D",
304 "ALT-CTRL-END"
305 },
306 ["esMX"] = {
307 "ALT-CTRL-NUMPAD1",
308 "ALT-CTRL-NUMPAD2",
309 "ALT-CTRL-NUMPAD3",
310 "ALT-CTRL-NUMPAD4",
311 "ALT-CTRL-NUMPAD5",
312 "ALT-CTRL-NUMPAD6",
313 "ALT-CTRL-NUMPAD7",
314 "ALT-CTRL-NUMPAD8",
315 "ALT-CTRL-NUMPAD9",
316 "ALT-CTRL-NUMPAD0",
317 "ALT-CTRL-1",
318 "ALT-CTRL-2",
319 "ALT-CTRL-3",
320 "ALT-CTRL-4",
321 "ALT-CTRL-5",
322 "ALT-CTRL-6",
323 "ALT-CTRL-7",
324 "ALT-CTRL-8",
325 "ALT-CTRL-9",
326 "ALT-CTRL-0",
327 "ALT-CTRL-F1",
328 "ALT-CTRL-F2",
329 "ALT-CTRL-F3",
330 "ALT-CTRL-F4",
331 "ALT-CTRL-F5",
332 "ALT-CTRL-F6",
333 "ALT-CTRL-F7",
334 "ALT-CTRL-F8",
335 "ALT-CTRL-F9",
336 "ALT-CTRL-F10",
337 "ALT-CTRL-F11",
338 "ALT-CTRL-F12",
339 "ALT-CTRL-'",
340 "ALT-CTRL-H",
341 "ALT-CTRL-A",
342 "ALT-CTRL-B",
343 "ALT-CTRL-C",
344 "ALT-CTRL-D",
345 "ALT-CTRL-END"
346 }
347 }
348
349
350 StringTable = {
351 ["enUS"] = {
352 CyborgButtonTitle="Cyborg Button",
353 MiniMapButtonTitle="MiniMap Button",
354 OptionPageTitle="Cyborg MMO7",
355 OptionPageSetDefaults="Default",
356 CyborgSizeSliderTitle="Cyborg Head Size",
357 PluginSizeSliderTitle="Interface Window Size"
358 },
359 ["frFR"] = {
360 CyborgButtonTitle="Bouton Cyborg",
361 MiniMapButtonTitle="Bouton minimap",
362 OptionPageTitle="Cyborg MMO7",
363 OptionPageSetDefaults="Par défaut",
364 CyborgSizeSliderTitle="Dimension de la tête Cyborg",
365 PluginSizeSliderTitle="Dimension de la fenêtre d'interface"
366 },
367 ["deDE"] = {
368 CyborgButtonTitle="Cyborg-Taste",
369 MiniMapButtonTitle="MiniMap-Taste",
370 OptionPageTitle="Cyborg MMO7",
371 OptionPageSetDefaults="Standard",
372 CyborgSizeSliderTitle="Größe des Cyborg-Kopfes",
373 PluginSizeSliderTitle="Größe des Schnittstellenfensters"
374 },
375 ["zhCN"] = {
376 CyborgButtonTitle="Cyborg 按钮",
377 MiniMapButtonTitle="“迷你地图”按钮",
378 OptionPageTitle="Cyborg MMO7",
379 OptionPageSetDefaults="默认",
380 CyborgSizeSliderTitle="Cyborg 标题大小",
381 PluginSizeSliderTitle="界面窗口大小"
382 },
383 ["zhTW"] = {
384 CyborgButtonTitle="Cyborg 按鈕",
385 MiniMapButtonTitle="MiniMap 按鈕",
386 OptionPageTitle="Cyborg MMO7",
387 OptionPageSetDefaults="預設",
388 CyborgSizeSliderTitle="Cyborg 頭大小",
389 PluginSizeSliderTitle="介面視窗大小"
390 },
391 ["esES"] = {
392 CyborgButtonTitle="Botón Cyborg",
393 MiniMapButtonTitle="Botón Minimapa",
394 OptionPageTitle="Cyborg MMO7",
395 OptionPageSetDefaults="Predeterminado",
396 CyborgSizeSliderTitle="Tamaño de la cabeza de Cyborg",
397 PluginSizeSliderTitle="Tamaño de la ventana de la interfaz"
398 },
399 ["esMX"] = {
400 CyborgButtonTitle="Botón de Cyborg",
401 MiniMapButtonTitle="Botón de Minimapa",
402 OptionPageTitle="Cyborg MMO7",
403 OptionPageSetDefaults="Modo predeterminado",
404 CyborgSizeSliderTitle="Tamaño de la cabeza de Cyborg",
405 PluginSizeSliderTitle="Tamaño de la ventana de interfaz"
406 }
407 }
408
409 function LoadStrings(self)
410 self:SetText(StringTable[GetLocale()][self:GetName()]);
411 end
412
413 local VarsLoaded = false;
414 local EnteredWorld = false;
415 local LoadBinding = false;
416 local SaveName = GetRealmName().."_"..UnitName("player");
417 local Settings = nil;
418
419
420
421 function CyborgMiniMapButton_Reposition(pos)
422 CyborgMiniMapFrame:SetPoint("TOPLEFT",
423 "Minimap",
424 "TOPLEFT",
425 52-(80*cos(pos)),
426 (80*sin(pos))-52)
427 end
428
429
430 function CyborgMiniMapButton_OnUpdate()
431
432 local xpos,ypos = GetCursorPosition()
433 local xmin,ymin = Minimap:GetLeft(), Minimap:GetBottom()
434
435 xpos = (xmin)-(xpos / UIParent:GetScale())
436 ypos = (ypos/ UIParent:GetScale())-(ymin)
437
438 local degrees = math.deg(math.atan2(ypos,xpos));
439
440 while(degrees < 0) do
441 degrees = degrees + 360;
442 end
443
444
445 CyborgMiniMapButton_Reposition(degrees)
446 end
447
448 function MouseModeChange(mode)
449 local MiniMapTexture = getglobal("CyborgMiniMapButton_Icon")
450 local MiniMapGlowTexture = getglobal("CyborgMiniMapButton_IconGlow")
451 local OpenButtonTexture = getglobal("OpenButtonPage".."OpenMainForm"):GetNormalTexture();
452 local OpenButtonGlowTexture = getglobal("OpenButtonPage".."OpenMainForm"):GetHighlightTexture();
453 if(1==mode) then
454 MiniMapTexture:SetVertexColor(1,0,0,1)
455 --MiniMapGlowTexture:SetVertexColor(1,0.26,0.26,.75);
456 OpenButtonTexture:SetVertexColor(1,0,0,0.75);
457 --OpenButtonGlowTexture:SetVertexColor(1,0.26,0.26,0.50);
458 elseif(2==mode) then
459 MiniMapTexture:SetVertexColor(0.07,0.22,1,1)
460 MiniMapGlowTexture:SetVertexColor(0.13,0.56,1,.75);
461 OpenButtonTexture:SetVertexColor(0.07,0.22,1,0.75);
462 OpenButtonGlowTexture:SetVertexColor(0.13,0.56,1,0.5);
463 elseif(3==mode) then
464 MiniMapTexture:SetVertexColor(0.52,0.08,0.89,1)
465 MiniMapGlowTexture:SetVertexColor(0.67,0.31,0.85,.75);
466 OpenButtonTexture:SetVertexColor(0.52,0.08,0.89,0.75);
467 OpenButtonGlowTexture:SetVertexColor(0.67,0.31,0.85,0.5);
468 end
469 end
470
471 function GetSaveData()
472 if(VarsLoaded) then
473 if (CyborgMMO7SaveData == nil) then
474 CyborgMMO7SaveData = {};
475 CyborgMMO7SaveData[SaveName] = {}
476 end
477 return CyborgMMO7SaveData[SaveName];
478 end
479 return nil;
480 end
481
482 function SetSaveData(data, index)
483 if(VarsLoaded) then
484 GetSaveData()[index] = data
485 end
486 end
487
488 function Event(self, event, ...)
489 if(event == "VARIABLES_LOADED") then
490 VarsLoaded = true;
491 elseif(event == "PLAYER_ENTERING_WORLD") then
492 EnteredWorld = true;
493 elseif(event == "PLAYER_ENTER_COMBAT") then
494 msg("PLAYER_ENTER_COMBAT");
495 Close();
496 elseif(event == nil) then
497 msg("Event is nil");
498 else
499 msg("Event is not nil");
500 end
501
502
503 -- Fire Loading if and only if the player is in the world and vars are loaded
504 if(false == LoadBinding) then
505 if(VarsLoaded) then
506 if(EnteredWorld) then
507 local data = GetSaveData()
508
509 RatPageModel.Instance().LoadData();
510 LoadBinding = true;
511
512 ShowMacroFrame();
513 HideUIPanel(MacroFrame);
514
515
516 SetupModeCallbacks(1);
517 SetupModeCallbacks(2);
518 SetupModeCallbacks(3);
519
520
521 --Reload Slider values:
522 if(nil == data["Settings"]) then
523 data["Settings"] = {}
524 data["Settings"]["Cyborg"] = 0.75;
525 data["Settings"]["Plugin"] = 0.75;
526 data["Settings"]["MiniMapButton"] = true;
527 data["Settings"]["CyborgButton"] = true;
528 end
529
530 Settings = data["Settings"];
531
532 CyborgSizeSlider:SetValue(Settings["Cyborg"]);
533 SetOpenButtonSize(Settings["Cyborg"])
534 PluginSizeSlider:SetValue(Settings["Plugin"]);
535 SetMainPageSize(Settings["Plugin"]);
536
537 if(Settings["MiniMapButton"] == false) then
538 CyborgMiniMapButton:Hide();
539 end
540
541 local xmin,ymin = Minimap:GetLeft(), Minimap:GetBottom()
542 CyborgMiniMapButton_Reposition(math.deg(math.atan2(ymin,xmin)))
543 -- Close the main window for now
544 Close();
545 end
546 end
547 end
548 end
549
550 function SetDefaultSettings()
551 OpenButtonPageOpenMainForm:ClearAllPoints();
552 MainPage:ClearAllPoints();
553 OpenButtonPageOpenMainForm:SetPoint("LEFT", UIParent, "LEFT", 0, 0);
554 MainPage:SetPoint("LEFT", UIParent, "LEFT", 0, 0);
555
556 SetOpenButtonSize(0.75);
557 SetMainPageSize(0.75);
558 MiniMapButton:SetChecked();
559 SetMiniMapButton(true);
560 CyborgButton:SetChecked();
561 SetCyborgHeadButton(true);
562 end
563
564 function SetupModeCallbacks(modeNum)
565
566 fn = function()
567 MouseModeChange(modeNum);
568 RatPageModel.Instance().SetMode(modeNum)
569 end
570
571 local buttonFrame, parentFrame, name = CallbackFactory.Instance().AddCallback(fn);
572 if(1 ~= SetOverrideBindingClick(parentFrame, true, Mode[GetLocale()][modeNum], name, "LeftButton")) then
573 msg("Failed to Bind modeChange");
574 end
575 end
576
577 function Loaded()
578 MainPage:RegisterEvent("VARIABLES_LOADED");
579 MainPage:RegisterEvent("PLAYER_ENTERING_WORLD");
580 MainPage:RegisterEvent("PLAYER_ENTER_COMBAT");
581 end
582
583 function Close()
584 MainPage:Hide();
585 if(Settings["CyborgButton"] == true) then
586 OpenButtonPage:Show();
587 end
588 end
589
590 function Open()
591 MainPage:Show();
592 RatQuickPage:Hide();
593 if(Settings["CyborgButton"] == true) then
594 OpenButtonPage:Show();
595 end
596 end
597
598 function IsOpen()
599 if(MainPage:IsVisible() == 1) then
600 return true;
601 else
602 return false;
603 end
604 end
605
606 function Toggle()
607 if(IsOpen()) then
608 Close();
609 else
610 Open();
611 end
612 end
613
614 function msg(m)
615 local id, name = GetChannelName("Debug");
616 SendChatMessage(m, "CHANNEL", nil, id);
617 end
618
619 function SetMainPageSize(percent)
620 if(VarsLoaded) then
621 if(EnteredWorld) then
622 MainPage:SetScale(percent);
623 Settings["Plugin"] = percent;
624 local data = GetSaveData()
625 data["Settings"] = Settings
626 PluginSizeSlider:SetValue(percent);
627 end
628 end
629 end
630
631 function SetOpenButtonSize(percent)
632 if(VarsLoaded) then
633 if(EnteredWorld) then
634 OpenButtonPage:SetScale(percent)
635 Settings["Cyborg"] = percent;
636 local data = GetSaveData()
637 data["Settings"] = Settings
638 CyborgSizeSlider:SetValue(percent);
639 end
640 end
641 end
642
643 function SetCyborgHeadButton(boolVal)
644 Settings["CyborgButton"] = boolVal;
645 if(Settings["CyborgButton"] == true) then
646 Close();
647 else
648 OpenButtonPage:Hide();
649 end
650 local data = GetSaveData()
651 data["Settings"] = Settings
652 end
653
654 function SetMiniMapButton(boolVal)
655 Settings["MiniMapButton"] = boolVal;
656 if(Settings["MiniMapButton"] == true) then
657 CyborgMiniMapButton:Show();
658 else
659 CyborgMiniMapButton:Hide();
660 end
661 local data = GetSaveData()
662 data["Settings"] = Settings
663 end
664