Advertisement
Guest User

GlueParent.lua

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