Advertisement
Guest User

GlueParent

a guest
Jul 8th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.69 KB | None | 0 0
  1.  
  2. CurrentGlueMusic = "GS_LichKing";
  3.  
  4. GlueCreditsSoundKits = { };
  5. GlueCreditsSoundKits[1] = "Menu-Credits01";
  6. GlueCreditsSoundKits[2] = "Menu-Credits02";
  7. GlueCreditsSoundKits[3] = "Menu-Credits03";
  8.  
  9.  
  10. GlueScreenInfo = { };
  11. GlueScreenInfo["login"] = "AccountLogin";
  12. GlueScreenInfo["charselect"] = "CharacterSelect";
  13. GlueScreenInfo["realmwizard"] = "RealmWizard";
  14. GlueScreenInfo["charcreate"] = "CharacterCreate";
  15. GlueScreenInfo["patchdownload"] = "PatchDownload";
  16. GlueScreenInfo["trialconvert"] = "TrialConvert";
  17. GlueScreenInfo["movie"] = "MovieFrame";
  18. GlueScreenInfo["credits"] = "CreditsFrame";
  19. GlueScreenInfo["options"] = "OptionsFrame";
  20.  
  21. CharModelFogInfo = { };
  22. CharModelFogInfo["HUMAN"] = { r=0.8, g=0.65, b=0.73, far=222 };
  23. CharModelFogInfo["ORC"] = { r=0.5, g=0.5, b=0.5, far=270 };
  24. CharModelFogInfo["DWARF"] = { r=0.85, g=0.88, b=1.0, far=500 };
  25. CharModelFogInfo["NIGHTELF"] = { r=0.25, g=0.22, b=0.55, far=611 };
  26. CharModelFogInfo["TAUREN"] = { r=1.0, g=0.61, b=0.42, far=153 };
  27. CharModelFogInfo["SCOURGE"] = { r=0, g=0.22, b=0.22, far=26 };
  28. CharModelFogInfo["CHARACTERSELECT"] = { r=0.8, g=0.65, b=0.73, far=222 };
  29.  
  30. CharModelGlowInfo = { };
  31. CharModelGlowInfo["WORGEN"] = 0.0;
  32. CharModelGlowInfo["GOBLIN"] = 0.0;
  33. CharModelGlowInfo["HUMAN"] = 0.15;
  34. CharModelGlowInfo["DWARF"] = 0.15;
  35. CharModelGlowInfo["CHARACTERSELECT"] = 0.3;
  36.  
  37. GlueAmbienceTracks = { };
  38. GlueAmbienceTracks["HUMAN"] = "GlueScreenHuman";
  39. GlueAmbienceTracks["ORC"] = "GlueScreenOrcTroll";
  40. GlueAmbienceTracks["DWARF"] = "GlueScreenDwarfGnome";
  41. GlueAmbienceTracks["TAUREN"] = "GlueScreenTauren";
  42. GlueAmbienceTracks["SCOURGE"] = "GlueScreenUndead";
  43. GlueAmbienceTracks["NIGHTELF"] = "GlueScreenNightElf";
  44. GlueAmbienceTracks["DRAENEI"] = "GlueScreenDraenei";
  45. GlueAmbienceTracks["BLOODELF"] = "GlueScreenBloodElf";
  46. GlueAmbienceTracks["DARKPORTAL"] = "GlueScreenIntro";
  47. GlueAmbienceTracks["DEATHKNIGHT"] = "GlueScreenIntro";
  48. GlueAmbienceTracks["CHARACTERSELECT"] = "GlueScreenIntro";
  49. GlueAmbienceTracks["GOBLIN"] = "GlueScreenIntro";
  50. GlueAmbienceTracks["FELORC"] = "GlueScreenIntro";
  51.  
  52. -- RaceLights[] duplicates the 3.2.2 color values in the models. Henceforth, the models no longer contain directional lights
  53. RaceLights = {
  54. HUMAN = {
  55. {1, 0, 0.000000, 0.000000, -1.000000, 1.0, 0.27, 0.27, .27, 1.0, 0, 0, 0},
  56. {1, 0, -0.45756075, -0.58900136, -0.66611975, 1.0, 0.000000, 0.000000, 0.000000, 1.0, 0.19882353, 0.34921569, 0.43588236 },
  57. {1, 0, -0.64623469, 0.57582057, -0.50081086, 1.0, 0.000000, 0.000000, 0.000000, 2.0, 0.52196085, 0.44, 0.29764709 },
  58. },
  59. ORC = {
  60. {1, 0, 0.00000, 0.00000, -1.00000, 1.0, 0.15000, 0.15000, 0.15000, 1.0, 0.00000, 0.00000, 0.00000},
  61. {1, 0, -0.74919, 0.35208, -0.56103, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.44706, 0.54510, 0.73725},
  62. {1, 0, 0.53162, -0.84340, 0.07780, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.55, 0.338625, 0.148825},
  63. },
  64. DWARF = {
  65. {1, 0, -0.00000, -0.00000, -1.00000, 1.0, 0.30000, 0.30000, 0.30000, 0.0, 0.00000, 0.00000, 0.00000},
  66. {1, 0, -0.88314, 0.42916, -0.18945, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.44706, 0.67451, 0.760785},
  67. },
  68. TAUREN = {
  69. {1, 0, -0.48073, 0.71827, -0.50297, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.65, 0.397645, 0.2727},
  70. {1, 0, -0.49767, -0.78677, 0.36513, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.60000, 0.47059, 0.32471},
  71. },
  72. SCOURGE = {
  73. {1, 0, 0.00000, 0.00000, -1.00000, 1.0, 0.20000, 0.20000, 0.20000, 1.0, 0.00000, 0.00000, 0.00000},
  74. },
  75. NIGHTELF = {
  76. {1, 0, -0.00000, -0.00000, -1.00000, 1.0, 0.09020, 0.09020, 0.17020, 1.0, 0.00000, 0.00000, 0.00000},
  77. },
  78. DRAENEI = {
  79. {1, 0, 0.61185, 0.62942, -0.47903, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.56941, 0.52000, 0.60000},
  80. {1, 0, -0.64345, -0.31052, -0.69968, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.60941, 0.60392, 0.70000},
  81. {1, 0, -0.46481, -0.14320, 0.87376, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.5835, 0.48941, 0.60000},
  82. },
  83. BLOODELF = {
  84. {1, 0, -0.82249, -0.54912, -0.14822, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.581175, 0.50588, 0.42588},
  85. {1, 0, 0.00000, -0.00000, -1.00000, 1.0, 0.60392, 0.61490, 0.70000, 1.0, 0.00000, 0.00000, 0.00000},
  86. {1, 0, 0.02575, 0.86518, -0.50081, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.59137, 0.51745, 0.63471},
  87. },
  88. DEATHKNIGHT = {
  89. {1, 0, 0.00000, 0.00000, -1.00000, 1.0, 0.38824, 0.66353, 0.76941, 1.0, 0.00000, 0.00000, 0.00000},
  90. },
  91. CHARACTERSELECT = {
  92. {1, 0, 0.00000, 0.00000, -1.00000, 1.0, 0.15000, 0.15000, 0.15000, 1.0, 0.00000, 0.00000, 0.00000},
  93. {1, 0, -0.74919, 0.35208, -0.56103, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.44706, 0.54510, 0.73725},
  94. {1, 0, 0.53162, -0.84340, 0.07780, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.55, 0.338625, 0.148825},
  95. },
  96. GOBLIN = {
  97. {1, 0, 0.00000, 0.00000, -1.00000, 1.0, 0.15000, 0.15000, 0.15000, 1.0, 0.00000, 0.00000, 0.00000},
  98. {1, 0, -0.74919, 0.35208, -0.56103, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.44706, 0.54510, 0.73725},
  99. {1, 0, 0.53162, -0.84340, 0.07780, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.55, 0.338625, 0.148825},
  100. },
  101. FELORC = {
  102. {1, 0, 0.00000, 0.00000, -1.00000, 1.0, 0.15000, 0.15000, 0.15000, 1.0, 0.00000, 0.00000, 0.00000},
  103. {1, 0, -0.74919, 0.35208, -0.56103, 1.0, 0.00000, 0.00000, 0.00000, 1.0, 0.44706, 0.54510, 0.73725},
  104. {1, 0, 0.53162, -0.84340, 0.07780, 1.0, 0.00000, 0.00000, 0.00000, 2.0, 0.55, 0.338625, 0.148825},
  105. },
  106. }
  107.  
  108. -- indicies for adding lights ModelFFX:Add*Light
  109. LIGHT_LIVE = 0;
  110. LIGHT_GHOST = 1;
  111.  
  112. -- Alpha animation stuff
  113. FADEFRAMES = {};
  114. CURRENT_GLUE_SCREEN = nil;
  115. PENDING_GLUE_SCREEN = nil;
  116. -- Time in seconds to fade
  117. LOGIN_FADE_IN = 1.5;
  118. LOGIN_FADE_OUT = 0.5;
  119. CHARACTER_SELECT_FADE_IN = 0.75;
  120. RACE_SELECT_INFO_FADE_IN = .5;
  121. RACE_SELECT_INFO_FADE_OUT = .5;
  122.  
  123. -- Realm Split info
  124. SERVER_SPLIT_SHOW_DIALOG = false;
  125. SERVER_SPLIT_CLIENT_STATE = -1; -- -1 uninitialized; 0 - no choice; 1 - realm 1; 2 - realm 2
  126. SERVER_SPLIT_STATE_PENDING = -1; -- -1 uninitialized; 0 - no server split; 1 - server split (choice mode); 2 - server split (no choice mode)
  127. SERVER_SPLIT_DATE = nil;
  128.  
  129. -- Account Messaging info
  130. ACCOUNT_MSG_NUM_AVAILABLE = 0;
  131. ACCOUNT_MSG_PRIORITY = 0;
  132. ACCOUNT_MSG_HEADERS_LOADED = false;
  133. ACCOUNT_MSG_BODY_LOADED = false;
  134. ACCOUNT_MSG_CURRENT_INDEX = nil;
  135.  
  136. -- Gender Constants
  137. SEX_NONE = 1;
  138. SEX_MALE = 2;
  139. SEX_FEMALE = 3;
  140.  
  141.  
  142. function SetGlueScreen(name)
  143. local newFrame;
  144. for index, value in pairs(GlueScreenInfo) do
  145. local frame = _G[value];
  146. if ( frame ) then
  147. frame:Hide();
  148. if ( index == name ) then
  149. newFrame = frame;
  150. end
  151. end
  152. end
  153.  
  154. if ( newFrame ) then
  155. newFrame:Show();
  156. SetCurrentScreen(name);
  157. SetCurrentGlueScreenName(name);
  158. if ( name == "credits" ) then
  159. PlayCreditsMusic( GlueCreditsSoundKits[CreditsFrame.creditsType] );
  160. StopGlueAmbience();
  161. elseif ( name ~= "movie" ) then
  162. PlayGlueMusic(CurrentGlueMusic);
  163. if (name == "login") then
  164. PlayGlueAmbience(GlueAmbienceTracks["DARKPORTAL"], 4.0);
  165. end
  166. end
  167. end
  168. end
  169.  
  170. function SetCurrentGlueScreenName(name)
  171. CURRENT_GLUE_SCREEN = name;
  172. end
  173.  
  174. function GetCurrentGlueScreenName()
  175. return CURRENT_GLUE_SCREEN;
  176. end
  177.  
  178. function SetPendingGlueScreenName(name)
  179. PENDING_GLUE_SCREEN = name;
  180. end
  181.  
  182. function GetPendingGlueScreenName()
  183. return PENDING_GLUE_SCREEN;
  184. end
  185.  
  186. function GlueParent_OnLoad(self)
  187. local width = GetScreenWidth();
  188. local height = GetScreenHeight();
  189.  
  190. if ( width / height > 16 / 9) then
  191. local maxWidth = height * 16 / 9;
  192. local barWidth = ( width - maxWidth ) / 2;
  193. self:ClearAllPoints();
  194. self:SetPoint("TOPLEFT", barWidth, 0);
  195. self:SetPoint("BOTTOMRIGHT", -barWidth, 0);
  196. end
  197.  
  198. self:RegisterEvent("FRAMES_LOADED");
  199. self:RegisterEvent("SET_GLUE_SCREEN");
  200. self:RegisterEvent("START_GLUE_MUSIC");
  201. self:RegisterEvent("DISCONNECTED_FROM_SERVER");
  202. self:RegisterEvent("GET_PREFERRED_REALM_INFO");
  203. self:RegisterEvent("SERVER_SPLIT_NOTICE");
  204. self:RegisterEvent("ACCOUNT_MESSAGES_AVAILABLE");
  205. self:RegisterEvent("ACCOUNT_MESSAGES_HEADERS_LOADED");
  206. self:RegisterEvent("ACCOUNT_MESSAGES_BODY_LOADED");
  207. end
  208.  
  209. function GlueParent_OnEvent(event, arg1, arg2, arg3)
  210. if ( event == "FRAMES_LOADED" ) then
  211. LocalizeFrames();
  212. elseif ( event == "SET_GLUE_SCREEN" ) then
  213. GlueScreenExit(GetCurrentGlueScreenName(), arg1);
  214. elseif ( event == "START_GLUE_MUSIC" ) then
  215. PlayGlueMusic(CurrentGlueMusic);
  216. PlayGlueAmbience(GlueAmbienceTracks["DARKPORTAL"], 4.0);
  217. elseif ( event == "DISCONNECTED_FROM_SERVER" ) then
  218. TokenEntry_Cancel(TokenEnterDialog);
  219. SetGlueScreen("login");
  220. if ( arg1 == 4 ) then
  221. GlueDialog_Show("PARENTAL_CONTROL");
  222. else
  223. GlueDialog_Show("DISCONNECTED");
  224. end
  225. AddonList:Hide();
  226. elseif ( event == "GET_PREFERRED_REALM_INFO" ) then
  227. if( arg1 == 1) then
  228. SetPreferredInfo(1);
  229. else
  230. SetGlueScreen("realmwizard");
  231. PlayGlueAmbience(GlueAmbienceTracks["DARKPORTAL"], 4.0);
  232. end
  233. elseif ( event == "SERVER_SPLIT_NOTICE" ) then
  234. CharacterSelectRealmSplitButton:Show();
  235. if ( SERVER_SPLIT_STATE_PENDING == -1 and arg1 == 0 and arg2 == 1 ) then
  236. SERVER_SPLIT_SHOW_DIALOG = true;
  237. end
  238. SERVER_SPLIT_CLIENT_STATE = arg1;
  239. SERVER_SPLIT_STATE_PENDING = arg2;
  240. SERVER_SPLIT_DATE = arg3;
  241. elseif ( event == "ACCOUNT_MESSAGES_AVAILABLE" ) then
  242. -- ACCOUNT_MSG_NUM_AVAILABLE = arg1;
  243. ACCOUNT_MSG_HEADERS_LOADED = false;
  244. ACCOUNT_MSG_BODY_LOADED = false;
  245. ACCOUNT_MSG_CURRENT_INDEX = nil;
  246. AccountMsg_LoadHeaders();
  247. elseif ( event == "ACCOUNT_MESSAGES_HEADERS_LOADED" ) then
  248. ACCOUNT_MSG_HEADERS_LOADED = true;
  249. ACCOUNT_MSG_NUM_AVAILABLE = AccountMsg_GetNumUnreadMsgs();
  250. ACCOUNT_MSG_CURRENT_INDEX = AccountMsg_GetIndexNextUnreadMsg();
  251. if ( ACCOUNT_MSG_NUM_AVAILABLE > 0 ) then
  252. AccountMsg_LoadBody( ACCOUNT_MSG_CURRENT_INDEX );
  253. end
  254. elseif ( event == "ACCOUNT_MESSAGES_BODY_LOADED" ) then
  255. ACCOUNT_MSG_BODY_LOADED = true;
  256. end
  257. end
  258.  
  259. -- Glue screen animation handling
  260. function GlueScreenExit(currentFrame, pendingFrame)
  261. if ( currentFrame == "login" and pendingFrame == "charselect" ) then
  262. GlueFrameFadeOut(AccountLoginUI, LOGIN_FADE_OUT, GoToPendingGlueScreen);
  263. SetPendingGlueScreenName(pendingFrame);
  264. else
  265. SetGlueScreen(pendingFrame);
  266. end
  267. end
  268.  
  269. function GoToPendingGlueScreen()
  270. SetGlueScreen(GetPendingGlueScreenName());
  271. end
  272.  
  273. -- Generic fade function
  274. function GlueFrameFade(frame, timeToFade, mode, finishedFunction)
  275. if ( frame ) then
  276. frame.fadeTimer = 0;
  277. frame.timeToFade = timeToFade;
  278. frame.mode = mode;
  279. -- finishedFunction is an optional function that is called when the animation is complete
  280. if ( finishedFunction ) then
  281. frame.finishedFunction = finishedFunction;
  282. end
  283. tinsert(FADEFRAMES, frame);
  284. end
  285. end
  286.  
  287. -- Fade in function
  288. function GlueFrameFadeIn(frame, timeToFade, finishedFunction)
  289. GlueFrameFade(frame, timeToFade, "IN", finishedFunction);
  290. end
  291.  
  292. -- Fade out function
  293. function GlueFrameFadeOut(frame, timeToFade, finishedFunction)
  294. GlueFrameFade(frame, timeToFade, "OUT", finishedFunction);
  295. end
  296.  
  297. -- Function that actually performs the alpha change
  298. function GlueFrameFadeUpdate(elapsed)
  299. local index = 1;
  300. while FADEFRAMES[index] do
  301. local frame = FADEFRAMES[index];
  302. frame.fadeTimer = frame.fadeTimer + elapsed;
  303. if ( frame.fadeTimer < frame.timeToFade ) then
  304. if ( frame.mode == "IN" ) then
  305. frame:SetAlpha(frame.fadeTimer / frame.timeToFade);
  306. elseif ( frame.mode == "OUT" ) then
  307. frame:SetAlpha((frame.timeToFade - frame.fadeTimer) / frame.timeToFade);
  308. end
  309. else
  310. if ( frame.mode == "IN" ) then
  311. frame:SetAlpha(1.0);
  312. elseif ( frame.mode == "OUT" ) then
  313. frame:SetAlpha(0);
  314. end
  315. GlueFrameFadeRemoveFrame(frame);
  316. if ( frame.finishedFunction ) then
  317. frame.finishedFunction();
  318. frame.finishedFunction = nil;
  319. end
  320. end
  321. index = index + 1;
  322. end
  323. end
  324.  
  325. function GlueFrameRemoveFrame(frame, list)
  326. local index = 1;
  327. while list[index] do
  328. if ( frame == list[index] ) then
  329. tremove(list, index);
  330. end
  331. index = index + 1;
  332. end
  333. end
  334.  
  335. function GlueFrameFadeRemoveFrame(frame)
  336. GlueFrameRemoveFrame(frame, FADEFRAMES);
  337. end
  338.  
  339. function SetLighting(model, race)
  340. model:SetSequence(0);
  341. model:SetCamera(0);
  342. local fogInfo = CharModelFogInfo[race];
  343. if ( fogInfo ) then
  344. model:SetFogColor(fogInfo.r, fogInfo.g, fogInfo.b);
  345. model:SetFogNear(0);
  346. model:SetFogFar(fogInfo.far);
  347. else
  348. model:ClearFog();
  349. end
  350.  
  351. local glowInfo = CharModelGlowInfo[race];
  352. if ( glowInfo ) then
  353. model:SetGlow(glowInfo);
  354. else
  355. model:SetGlow(0.3);
  356. end
  357.  
  358. model:ResetLights();
  359. --[[
  360. ResetLights() sets all 6 light sets to default for the background. The six sets are:
  361.  
  362. background - live
  363. background - ghost
  364. character - live
  365. character - ghost
  366. pet - live
  367. pet - ghost
  368.  
  369. If you add a light to any one of these, NONE of the default lights are used for that set (most backgrounds have 3).
  370.  
  371. You can add up to four lights per light set in the current version. They are merged in the engine.
  372.  
  373. The current version only supports setting directional lights, and pulls the default point lights from the models.
  374. ]]
  375. local LightValues = RaceLights[race];
  376. if(LightValues) then
  377. for index, Array in pairs (LightValues) do
  378. if (Array[1]==1) then -- is this light enabled?
  379. for j, f in pairs ({model.AddCharacterLight, model.AddLight, model.AddPetLight }) do
  380. f(model, LIGHT_LIVE, unpack(Array));
  381. end
  382. end
  383. end
  384. end
  385. end
  386.  
  387. -- Function to set the background model for character select and create screens
  388. function SetBackgroundModel(model, name)
  389. local nameupper = strupper(name);
  390.  
  391. if (name == "Goblin" or name == "GOBLIN") then
  392. name = "Orc";
  393. end
  394.  
  395. if (name == "FelOrc" or name == "FELORC") then
  396. name = "Orc";
  397. end
  398.  
  399. local path = "Interface\\Glues\\Models\\UI_"..name.."\\UI_"..name..".m2";
  400. if ( model == CharacterCreate ) then
  401. SetCharCustomizeBackground(path);
  402. else
  403. SetCharSelectBackground(path);
  404. end
  405. PlayGlueAmbience(GlueAmbienceTracks[nameupper], 4.0);
  406. SetLighting(model, nameupper)
  407. end
  408.  
  409. function SecondsToTime(seconds, noSeconds)
  410. local time = "";
  411. local count = 0;
  412. local tempTime;
  413. seconds = floor(seconds);
  414. if ( seconds >= 86400 ) then
  415. tempTime = floor(seconds / 86400);
  416. time = tempTime.." "..DAYS_ABBR.." ";
  417. seconds = mod(seconds, 86400);
  418. count = count + 1;
  419. end
  420. if ( seconds >= 3600 ) then
  421. tempTime = floor(seconds / 3600);
  422. time = time..tempTime.." "..HOURS_ABBR.." ";
  423. seconds = mod(seconds, 3600);
  424. count = count + 1;
  425. end
  426. if ( count < 2 and seconds >= 60 ) then
  427. tempTime = floor(seconds / 60);
  428. time = time..tempTime.." "..MINUTES_ABBR.." ";
  429. seconds = mod(seconds, 60);
  430. count = count + 1;
  431. end
  432. if ( count < 2 and seconds > 0 and not noSeconds ) then
  433. seconds = format("%d", seconds);
  434. time = time..seconds.." "..SECONDS_ABBR.." ";
  435. end
  436. return time;
  437. end
  438.  
  439. function MinutesToTime(mins, hideDays)
  440. local time = "";
  441. local count = 0;
  442. local tempTime;
  443. -- only show days if hideDays is false
  444. if ( mins > 1440 and not hideDays ) then
  445. tempTime = floor(mins / 1440);
  446. time = tempTime.." "..DAYS_ABBR.." ";
  447. mins = mod(mins, 1440);
  448. count = count + 1;
  449. end
  450. if ( mins > 60 ) then
  451. tempTime = floor(mins / 60);
  452. time = time..tempTime.." "..HOURS_ABBR.." ";
  453. mins = mod(mins, 60);
  454. count = count + 1;
  455. end
  456. if ( count < 2 ) then
  457. tempTime = mins;
  458. time = time..tempTime.." "..MINUTES_ABBR.." ";
  459. count = count + 1;
  460. end
  461. return time;
  462. end
  463.  
  464. function TriStateCheckbox_SetState(checked, checkButton)
  465. local checkedTexture = _G[checkButton:GetName().."CheckedTexture"];
  466. if ( not checkedTexture ) then
  467. message("Can't find checked texture");
  468. end
  469. if ( not checked or checked == 0 ) then
  470. -- nil or 0 means not checked
  471. checkButton:SetChecked(nil);
  472. checkButton.state = 0;
  473. elseif ( checked == 2 ) then
  474. -- 2 is a normal
  475. checkButton:SetChecked(1);
  476. checkedTexture:SetVertexColor(1, 1, 1);
  477. checkedTexture:SetDesaturated(0);
  478. checkButton.state = 2;
  479. else
  480. -- 1 is a gray check
  481. checkButton:SetChecked(1);
  482. local shaderSupported = checkedTexture:SetDesaturated(1);
  483. if ( not shaderSupported ) then
  484. checkedTexture:SetVertexColor(0.5, 0.5, 0.5);
  485. end
  486. checkButton.state = 1;
  487. end
  488. end
  489.  
  490. function SetStateRequestInfo( choice )
  491. if ( SERVER_SPLIT_CLIENT_STATE ~= choice ) then
  492. SERVER_SPLIT_CLIENT_STATE = choice;
  493. SetRealmSplitState(choice);
  494. RealmSplit_SetChoiceText();
  495. -- RequestRealmSplitInfo();
  496. end
  497. end
  498.  
  499. function UpgradeAccount()
  500. PlaySound("gsLoginNewAccount");
  501. LaunchURL(AUTH_NO_TIME_URL);
  502. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement