diff --git a/AccountLogin.lua b/AccountLogin.lua
index abf53f1..e56a3ae 100644
--- a/AccountLogin.lua
+++ b/AccountLogin.lua
@@ -249,6 +249,7 @@ function Autologin_PrevPage()
Autologin_UpdateUI();
end
+
FADE_IN_TIME = 2;
DEFAULT_TOOLTIP_COLOR = {0.8, 0.8, 0.8, 0.09, 0.09, 0.09};
MAX_PIN_LENGTH = 10;
@@ -257,13 +258,11 @@ function AccountLogin_OnLoad()
this:SetSequence(0);
this:SetCamera(0);
- TOSFrame.noticeType = "EULA";
-
this:RegisterEvent("SHOW_SERVER_ALERT");
this:RegisterEvent("SHOW_SURVEY_NOTIFICATION");
local versionType, buildType, version, internalVersion, date = GetBuildInfo();
- AccountLoginVersion:SetText(format(TEXT(VERSION_TEMPLATE), versionType, version, internalVersion, buildType, date));
+ AccountLoginVersion:SetText(format(VERSION_TEMPLATE, versionType, version, internalVersion, buildType, date));
-- Color edit box backdrops
local backdropColor = DEFAULT_TOOLTIP_COLOR;
@@ -271,14 +270,15 @@ function AccountLogin_OnLoad()
AccountLoginAccountEdit:SetBackdropColor(backdropColor[4], backdropColor[5], backdropColor[6]);
AccountLoginPasswordEdit:SetBackdropBorderColor(backdropColor[1], backdropColor[2], backdropColor[3]);
AccountLoginPasswordEdit:SetBackdropColor(backdropColor[4], backdropColor[5], backdropColor[6]);
+ VirtualKeypadText:SetBackdropBorderColor(backdropColor[1], backdropColor[2], backdropColor[3]);
+ VirtualKeypadText:SetBackdropColor(backdropColor[4], backdropColor[5], backdropColor[6]);
end
function AccountLogin_OnShow()
CurrentGlueMusic = "Sound\\Music\\GlueScreenMusic\\wow_main_theme.mp3";
-
- -- Try to show the EULA or the TOS
- -- AccountLogin_ShowUserAgreements();
-
+
+ AcceptTOS();
+ AcceptEULA();
local serverName = GetServerName();
if(serverName) then
AccountLoginRealmName:SetText(serverName);
@@ -286,9 +286,6 @@ function AccountLogin_OnShow()
AccountLoginRealmName:Hide()
end
- -- Autologin OnShow. Load sets `Autologin_SelectedIdx` from the
- -- last-used account name (via GetSavedAccountName), so honor that
- -- here instead of unconditionally picking row 1.
Autologin_Load();
Autologin_PasswordFieldForced = false;
if ( table.getn(Autologin_Table) ~= 0 ) then
@@ -307,9 +304,6 @@ function AccountLogin_OnShow()
elseif ( AccountLoginPasswordEdit:IsVisible() ) then
AccountLogin_FocusPassword();
end
- -- If the password field is hidden (saved-account autologin), don't
- -- grab focus — Enter will still trigger Login via the parent frame's
- -- OnKeyDown handler, and the user can click the name field to edit.
end
function AccountLogin_FocusPassword()
@@ -333,7 +327,7 @@ function AccountLogin_OnKeyDown()
else
AccountLogin_Exit();
end
-
+
elseif ( arg1 == "ENTER" ) then
if ( not TOSAccepted() ) then
return;
@@ -363,14 +357,34 @@ function AccountLogin_Login()
Autologin_OnLogin();
end
-function AccountLogin_ManageAccount()
+function AccountLogin_Turtle_Armory_Website()
PlaySound("gsLoginNewAccount");
- LaunchURL(AUTH_NO_TIME_URL);
+ LaunchURL(TURTLE_ARMORY_WEBSITE);
end
-function AccountLogin_LaunchCommunitySite()
+function AccountLogin_Turtle_Website()
PlaySound("gsLoginNewAccount");
- LaunchURL(COMMUNITY_URL);
+ LaunchURL(AUTH_TURTLE_WEBSITE);
+end
+
+function AccountLogin_Turtle_Knowledge_Database()
+ PlaySound("gsLoginNewAccount");
+ LaunchURL(TURTLE_KNOWLEDGE_DATABASE_WEBSITE);
+end
+
+function AccountLogin_Turtle_Community_Forum()
+ PlaySound("gsLoginNewAccount");
+ LaunchURL(TURTLE_COMMUNITY_FORUM_WEBSITE);
+end
+
+function AccountLogin_Turtle_Discord()
+ PlaySound("gsLoginNewAccount");
+ LaunchURL(TURTLE_DISCORD_WEBSITE);
+end
+
+function AccountLogin_Turtle_Reddit()
+ PlaySound("gsLoginNewAccount");
+ LaunchURL(TURTLE_REDDIT_WEBSITE);
end
function AccountLogin_Credits()
@@ -412,73 +426,12 @@ function AccountLogin_SurveyNotificationDone(accepted)
AccountLoginUI:Show();
end
-function AccountLogin_ShowUserAgreements()
- TOSScrollFrame:Hide();
- EULAScrollFrame:Hide();
- ScanningScrollFrame:Hide();
- ContestScrollFrame:Hide();
- TOSText:Hide();
- EULAText:Hide();
- ScanningText:Hide();
- if ( not EULAAccepted() ) then
- if ( ShowEULANotice() ) then
- TOSNotice:SetText(EULA_NOTICE);
- TOSNotice:Show();
- end
- AccountLoginUI:Hide();
- TOSFrame.noticeType = "EULA";
- TOSFrameTitle:SetText(EULA_FRAME_TITLE);
- TOSFrameHeader:SetWidth(TOSFrameTitle:GetWidth() + 310);
- EULAScrollFrame:Show();
- EULAText:Show();
- TOSFrame:Show();
- elseif ( not TOSAccepted() ) then
- if ( ShowTOSNotice() ) then
- TOSNotice:SetText(TOS_NOTICE);
- TOSNotice:Show();
- end
- AccountLoginUI:Hide();
- TOSFrame.noticeType = "TOS";
- TOSFrameTitle:SetText(TOS_FRAME_TITLE);
- TOSFrameHeader:SetWidth(TOSFrameTitle:GetWidth() + 310);
- TOSScrollFrame:Show();
- TOSText:Show();
- TOSFrame:Show();
- elseif ( not ScanningAccepted() and SHOW_SCANNING_AGREEMENT ) then
- if ( ShowScanningNotice() ) then
- TOSNotice:SetText(SCANNING_NOTICE);
- TOSNotice:Show();
- end
- AccountLoginUI:Hide();
- TOSFrame.noticeType = "SCAN";
- TOSFrameTitle:SetText(SCAN_FRAME_TITLE);
- TOSFrameHeader:SetWidth(TOSFrameTitle:GetWidth() + 310);
- ScanningScrollFrame:Show();
- ScanningText:Show();
- TOSFrame:Show();
- elseif ( not ContestAccepted() and SHOW_CONTEST_AGREEMENT ) then
- if ( ShowContestNotice() ) then
- TOSNotice:SetText(CONTEST_NOTICE);
- TOSNotice:Show();
- end
- AccountLoginUI:Hide();
- TOSFrame.noticeType = "CONTEST";
- TOSFrameTitle:SetText(CONTEST_FRAME_TITLE);
- TOSFrameHeader:SetWidth(TOSFrameTitle:GetWidth() + 310);
- ContestScrollFrame:Show();
- ContestText:Show();
- TOSFrame:Show();
- else
- AccountLoginUI:Show();
- TOSFrame:Hide();
- end
-end
-
-- Virtual keypad functions
+local buttonText = {}
function VirtualKeypadFrame_OnEvent(event)
if ( event == "PLAYER_ENTER_PIN" ) then
for i=1, 10 do
- getglobal("VirtualKeypadButton"..i):SetText(getglobal("arg"..i));
+ buttonText[i] = _G["arg"..i]
end
end
-- Randomize location to prevent hacking (yeah right)
@@ -486,8 +439,8 @@ function VirtualKeypadFrame_OnEvent(event)
local yPadding = 10;
local xPos = random(xPadding, GlueParent:GetWidth()-VirtualKeypadFrame:GetWidth()-xPadding);
local yPos = random(yPadding, GlueParent:GetHeight()-VirtualKeypadFrame:GetHeight()-yPadding);
- VirtualKeypadFrame:SetPoint("TOPLEFT", GlueParent, "TOPLEFT", xPos, -yPos);
-
+ --VirtualKeypadFrame:SetPoint("TOPLEFT", GlueParent, "TOPLEFT", xPos, -yPos);
+
VirtualKeypadFrame:Show();
VirtualKeypad_UpdateButtons();
end
@@ -497,45 +450,31 @@ function VirtualKeypadButton_OnClick()
if ( not text ) then
text = "";
end
- VirtualKeypadText:SetText(text.."*");
VirtualKeypadFrame.PIN = VirtualKeypadFrame.PIN..this:GetID();
+ VirtualKeypadText:SetText(VirtualKeypadFrame.PIN);
VirtualKeypad_UpdateButtons();
end
function VirtualKeypadOkayButton_OnClick()
- local PIN = VirtualKeypadFrame.PIN;
+ local PIN = VirtualKeypadText:GetText();
local numNumbers = strlen(PIN);
+ if numNumbers < 6 then return end
local pinNumber = {};
for i=1, MAX_PIN_LENGTH do
if ( i <= numNumbers ) then
- pinNumber[i] = strsub(PIN,i,i);
+ pinNumber[i] = nil;
+ for j=1, 10 do
+ if tonumber(buttonText[j]) == tonumber(strsub(PIN,i,i)) then
+ pinNumber[i] = j-1;
+ end
+ end
else
pinNumber[i] = nil;
end
end
- PINEntered(pinNumber[1] , pinNumber[2], pinNumber[3], pinNumber[4], pinNumber[5], pinNumber[6], pinNumber[7], pinNumber[8], pinNumber[9], pinNumber[10]);
+ PINEntered(pinNumber[1], pinNumber[2], pinNumber[3], pinNumber[4], pinNumber[5], pinNumber[6], pinNumber[7], pinNumber[8], pinNumber[9], pinNumber[10]);
VirtualKeypadFrame:Hide();
end
function VirtualKeypad_UpdateButtons()
- local numNumbers = strlen(VirtualKeypadFrame.PIN);
- if ( numNumbers >= 4 and numNumbers <= MAX_PIN_LENGTH ) then
- VirtualKeypadOkayButton:Enable();
- else
- VirtualKeypadOkayButton:Disable();
- end
- if ( numNumbers == 0 ) then
- VirtualKeypadBackButton:Disable();
- else
- VirtualKeypadBackButton:Enable();
- end
- if ( numNumbers >= MAX_PIN_LENGTH ) then
- for i=1, MAX_PIN_LENGTH do
- getglobal("VirtualKeypadButton"..i):Disable();
- end
- else
- for i=1, MAX_PIN_LENGTH do
- getglobal("VirtualKeypadButton"..i):Enable();
- end
- end
end
diff --git a/AccountLogin.xml b/AccountLogin.xml
index ca1fb26..1b58ba4 100644
--- a/AccountLogin.xml
+++ b/AccountLogin.xml
@@ -2,6 +2,14 @@
..\FrameXML\UI.xsd">
+
-
@@ -93,7 +93,7 @@
-
+
@@ -118,9 +118,9 @@
-
+
-
+
@@ -348,9 +348,6 @@
AccountLogin_Exit();
- if ( TOSFrame:IsVisible() ) then
- return;
- end
AccountLogin_Login();
@@ -414,9 +411,6 @@
AccountLogin_Exit();
- if ( TOSFrame:IsVisible() ) then
- return;
- end
AccountLogin_Login();
@@ -432,10 +426,13 @@
-
-
-
- if ( not GlueDialog:IsVisible() ) then
- AccountLoginUI:Hide();
- TOSFrame:Show();
- TOSScrollFrame:Show();
- TOSScrollFrameScrollBar:SetValue(0);
- TOSFrameTitle:SetText(TOS_FRAME_TITLE);
- TOSText:Show();
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
- AccountLogin_Credits();
-
-
-
-
-
-
-
-
-
-
-
AccountLogin_Cinematics();
-
+
-
+
-
+
- AccountLogin_LaunchCommunitySite();
+ PlaySound("gsLoginNewAccount");
+ LaunchURL("http://octowow.st/social");
-
+
-
+
-
+
- AccountLogin_ManageAccount();
+ PlaySound("gsLoginNewAccount");
+ LaunchURL("http://octowow.st/db/");
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PlaySound("gsLoginNewAccount");
+ LaunchURL("http://octowow.st/");
@@ -557,9 +536,9 @@
-
+
-
+
@@ -610,7 +589,7 @@
-
+
@@ -661,20 +640,20 @@
GlueScrollFrame_OnScrollRangeChanged();
- local scrollbar = getglobal(this:GetName().."ScrollBar");
+ local scrollbar = _G[this:GetName().."ScrollBar"];
scrollbar:SetValue(arg1);
local min;
local max;
min, max = scrollbar:GetMinMaxValues();
if ( arg1 == 0 ) then
- getglobal(scrollbar:GetName().."ScrollUpButton"):Disable();
+ _G[scrollbar:GetName().."ScrollUpButton"]:Disable();
else
- getglobal(scrollbar:GetName().."ScrollUpButton"):Enable();
+ _G[scrollbar:GetName().."ScrollUpButton"]:Enable();
end
if (scrollbar:GetValue() >= max - 20) then
- getglobal(scrollbar:GetName().."ScrollDownButton"):Disable();
+ _G[scrollbar:GetName().."ScrollDownButton"]:Disable();
else
- getglobal(scrollbar:GetName().."ScrollDownButton"):Enable();
+ _G[scrollbar:GetName().."ScrollDownButton"]:Enable();
end
@@ -709,7 +688,7 @@
-
+
@@ -739,201 +718,61 @@
-
+
-
-
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
- local numNumbers = strlen(VirtualKeypadText:GetText());
- VirtualKeypadText:SetText(strsub(VirtualKeypadText:GetText(), 1, numNumbers-1));
- VirtualKeypadFrame.PIN = strsub(VirtualKeypadFrame.PIN, 1, numNumbers-1);
- VirtualKeypad_UpdateButtons();
-
+
+ VirtualKeypadText:SetFocus();
+
+
+ this:GetParent():Hide();
+ StatusDialogClick();
+
+
+ VirtualKeypadOkayButton_OnClick();
+
+
+ this:HighlightText(0, 0);
+
+
+ this:HighlightText();
+
-
+
+
+
+
+
-
+
-
+
-
+
@@ -988,536 +827,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local scrollbar = getglobal(this:GetName().."ScrollBar");
- scrollbar:SetValue(arg1);
- local min;
- local max;
- min, max = scrollbar:GetMinMaxValues();
- if ( arg1 == 0 ) then
- getglobal(scrollbar:GetName().."ScrollUpButton"):Disable();
- else
- getglobal(scrollbar:GetName().."ScrollUpButton"):Enable();
- end
- if (scrollbar:GetValue() >= max - 20) then
- getglobal(scrollbar:GetName().."ScrollDownButton"):Disable();
- TOSAccept:Enable();
- else
- getglobal(scrollbar:GetName().."ScrollDownButton"):Enable();
- if ( not TOSAccepted() and TOSFrame.noticeType == "TOS" ) then
- TOSAccept:Disable();
- end
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local scrollbar = getglobal(this:GetName().."ScrollBar");
- scrollbar:SetValue(arg1);
- local min;
- local max;
- min, max = scrollbar:GetMinMaxValues();
- if ( arg1 == 0 ) then
- getglobal(scrollbar:GetName().."ScrollUpButton"):Disable();
- else
- getglobal(scrollbar:GetName().."ScrollUpButton"):Enable();
- end
- if (scrollbar:GetValue() >= max - 20) then
- getglobal(scrollbar:GetName().."ScrollDownButton"):Disable();
- TOSAccept:Enable();
- else
- getglobal(scrollbar:GetName().."ScrollDownButton"):Enable();
- if ( not EULAAccepted() and TOSFrame.noticeType == "EULA" ) then
- TOSAccept:Disable();
- end
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local scrollbar = getglobal(this:GetName().."ScrollBar");
- scrollbar:SetValue(arg1);
- local min;
- local max;
- min, max = scrollbar:GetMinMaxValues();
- if ( arg1 == 0 ) then
- getglobal(scrollbar:GetName().."ScrollUpButton"):Disable();
- else
- getglobal(scrollbar:GetName().."ScrollUpButton"):Enable();
- end
- if ((scrollbar:GetValue() >= max - 20)) then
- getglobal(scrollbar:GetName().."ScrollDownButton"):Disable();
- TOSAccept:Enable();
- else
- getglobal(scrollbar:GetName().."ScrollDownButton"):Enable();
- if ( not ScanningAccepted() and TOSFrame.noticeType == "SCAN" ) then
- TOSAccept:Disable();
- end
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- local scrollbar = getglobal(this:GetName().."ScrollBar");
- scrollbar:SetValue(arg1);
- local min;
- local max;
- min, max = scrollbar:GetMinMaxValues();
- if ( arg1 == 0 ) then
- getglobal(scrollbar:GetName().."ScrollUpButton"):Disable();
- else
- getglobal(scrollbar:GetName().."ScrollUpButton"):Enable();
- end
- if ((scrollbar:GetValue() >= max - 20)) then
- getglobal(scrollbar:GetName().."ScrollDownButton"):Disable();
- TOSAccept:Enable();
- else
- getglobal(scrollbar:GetName().."ScrollDownButton"):Enable();
- if ( not ContestAccepted() and TOSFrame.noticeType == "CONTEST" ) then
- TOSAccept:Disable();
- end
- end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AccountLogin_Exit();
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:Disable();
-
-
- if ( TOSFrame.noticeType == "TOS" ) then
- AcceptTOS();
- elseif ( TOSFrame.noticeType == "EULA" ) then
- AcceptEULA();
- elseif ( TOSFrame.noticeType == "SCAN" ) then
- AcceptScanning();
- elseif (TOSFrame.noticeType == "CONTEST" ) then
- AcceptContest();
- end
- this:GetParent():Hide();
- TOSNotice:Hide();
- TOSAccept:Disable();
- AccountLogin_ShowUserAgreements();
-
-
-
-
-
-
-
+
+
@@ -1682,9 +994,9 @@
-
-
-
+
+
+
@@ -1844,20 +1156,20 @@
- local scrollbar = getglobal(this:GetName().."ScrollBar");
+ local scrollbar = _G[this:GetName().."ScrollBar"];
scrollbar:SetValue(arg1);
local min;
local max;
min, max = scrollbar:GetMinMaxValues();
if ( arg1 == 0 ) then
- getglobal(scrollbar:GetName().."ScrollUpButton"):Disable();
+ _G[scrollbar:GetName().."ScrollUpButton"]:Disable();
else
- getglobal(scrollbar:GetName().."ScrollUpButton"):Enable();
+ _G[scrollbar:GetName().."ScrollUpButton"]:Enable();
end
if (scrollbar:GetValue() >= max - 20) then
- getglobal(scrollbar:GetName().."ScrollDownButton"):Disable();
+ _G[scrollbar:GetName().."ScrollDownButton"]:Disable();
else
- getglobal(scrollbar:GetName().."ScrollDownButton"):Enable();
+ _G[scrollbar:GetName().."ScrollDownButton"]:Enable();
end
diff --git a/CharacterSelect.lua b/CharacterSelect.lua
index 27e8ccd..9535b65 100644
--- a/CharacterSelect.lua
+++ b/CharacterSelect.lua
@@ -8,21 +8,6 @@ MAX_CHARACTERS_PER_REALM = 10;
AUTO_DRAG_TIME = 0.5;
--- Per-account character autoselect was removed alongside the plaintext
--- credential store; the AutologinSaveCharacterButton checkbox in
--- CharacterSelect.xml is now permanently hidden, and the two functions
--- below are no-op wrappers around `EnterWorld` to keep the existing
--- call sites working.
-function Autologin_OnCharactersLoad()
- if ( AutologinSaveCharacterButton ) then
- AutologinSaveCharacterButton:Hide();
- end
-end
-
-function Autologin_EnterWorld()
- EnterWorld();
-end
-
function CharacterSelect_OnLoad()
this:SetSequence(0);
this:SetCamera(0);
@@ -59,7 +44,7 @@ function CharacterSelect_OnLoad()
local backdropColor = DEFAULT_TOOLTIP_COLOR;
CharacterSelectCharacterFrame:SetBackdropBorderColor(backdropColor[1], backdropColor[2], backdropColor[3]);
CharacterSelectCharacterFrame:SetBackdropColor(backdropColor[4], backdropColor[5], backdropColor[6], 0.85);
-
+
end
function CharacterSelect_OnShow()
@@ -72,7 +57,7 @@ function CharacterSelect_OnShow()
local serverType = "";
if ( serverName ) then
if( not connected ) then
- serverName = serverName.."\n("..TEXT(SERVER_DOWN)..")";
+ serverName = serverName.."\n("..SERVER_DOWN..")";
end
if ( isPVP ) then
if ( isRP ) then
@@ -104,7 +89,7 @@ function CharacterSelect_OnShow()
else
local billingTimeLeft = GetBillingTimeRemaining();
-- Set default text for the payment plan
- local billingText = getglobal("BILLING_TEXT"..paymentPlan);
+ local billingText = _G["BILLING_TEXT"..paymentPlan];
if ( paymentPlan == 1 ) then
-- Recurring account
billingTimeLeft = ceil(billingTimeLeft/(60 * 24));
@@ -115,7 +100,7 @@ function CharacterSelect_OnShow()
-- Free account
if ( billingTimeLeft < (24 * 60) ) then
billingText = format(BILLING_FREE_TIME_EXPIRE, billingTimeLeft.." "..GetText("MINUTES_ABBR", nil, billingTimeLeft));
- end
+ end
elseif ( paymentPlan == 3 ) then
-- Fixed but not recurring
if ( isGameRoom == 1 ) then
@@ -130,7 +115,7 @@ function CharacterSelect_OnShow()
billingText = BILLING_FIXED_LASTDAY;
else
billingText = format(billingText, MinutesToTime(billingTimeLeft));
- end
+ end
end
elseif ( paymentPlan == 4 ) then
-- Usage plan
@@ -210,7 +195,6 @@ function CharacterSelect_OnEvent()
end
UpdateCharacterList();
CharSelectCharacterName:SetText(GetCharacterInfo(GetCharIDFromIndex(this.selectedIndex)));
- Autologin_OnCharactersLoad();
elseif ( event == "UPDATE_SELECTED_CHARACTER" ) then
if ( arg1 == 0 ) then
CharSelectCharacterName:SetText("");
@@ -235,7 +219,9 @@ function CharacterSelect_OnEvent()
GlueDialog_Show("SUGGEST_REALM");
elseif ( event == "FORCE_RENAME_CHARACTER" ) then
CharacterRenameDialog:Show();
- CharacterRenameText1:SetText(getglobal(arg1));
+ CharacterRenameBackground:SetHeight(16 + CharacterRenameText1:GetHeight() + CharacterRenameText2:GetHeight() + 23 + CharacterRenameEditBox:GetHeight() + 8 + CharacterRenameButton1:GetHeight() + 16);
+
+ CharacterRenameText1:SetText(_G[arg1]);
end
end
@@ -245,56 +231,50 @@ function CharacterSelect_UpdateModel()
end
function UpdateCharacterSelection()
- -- Drag-aware: during a drag, dim every slot except the one currently
- -- holding the dragged character, and override the highlight to track
- -- the drag rather than the engine-side "selected" character.
local draggedIndex = CharacterSelect.draggedIndex;
local highlightIndex = draggedIndex or CharacterSelect.selectedIndex;
-
for i=1, MAX_CHARACTERS_DISPLAYED, 1 do
- local btn = getglobal("CharSelectCharacterButton"..i);
+ local btn = _G["CharSelectCharacterButton"..i];
btn:UnlockHighlight();
if ( draggedIndex and i ~= draggedIndex ) then
- btn:SetAlpha(0.6);
+ btn:SetAlpha(0.4);
else
btn:SetAlpha(1);
end
end
-
- if ( highlightIndex and (highlightIndex > 0) and (highlightIndex <= MAX_CHARACTERS_DISPLAYED) ) then
- getglobal("CharSelectCharacterButton"..highlightIndex):LockHighlight();
+ if ( (highlightIndex > 0) and (highlightIndex <= MAX_CHARACTERS_DISPLAYED) ) then
+ _G["CharSelectCharacterButton"..highlightIndex]:LockHighlight();
end
end
function UpdateCharacterList()
local numChars = GetNumCharacters();
local index = 1;
- local coords;
+
for i=1, numChars, 1 do
local name, race, class, level, zone, fileString, gender, ghost = GetCharacterInfo(GetCharIDFromIndex(i));
- if ( gender == 0 ) then
- gender = "MALE";
- else
- gender = "FEMALE";
- end
- local button = getglobal("CharSelectCharacterButton"..index);
+
+ local button = _G["CharSelectCharacterButton"..index];
if ( not name ) then
button:SetText("ERROR - Tell Jeremy");
else
if ( not zone ) then
zone = "";
end
- local classToken = TW_CLASS_TOKEN and TW_CLASS_TOKEN[class];
- if ( classToken and CLASS_COLORS[classToken] ) then
- class = CLASS_COLORS[classToken] .. class .. "|r";
+
+ local classColor
+ local classToken = TW_CLASS_TOKEN and TW_CLASS_TOKEN[class]
+ if classToken and CLASS_COLORS[classToken] then
+ classColor = CLASS_COLORS[classToken]
+ class = classColor .. class .. "|r"
end
- getglobal("CharSelectCharacterButton"..index.."ButtonTextName"):SetText(name);
- if( ghost ) then
- getglobal("CharSelectCharacterButton"..index.."ButtonTextInfo"):SetText(format(TEXT(CHARACTER_SELECT_INFO_GHOST), level, class));
+ _G["CharSelectCharacterButton"..index.."ButtonTextName"]:SetText(name);
+ if ( ghost ) then
+ _G["CharSelectCharacterButton"..index.."ButtonTextInfo"]:SetText(format(CHARACTER_SELECT_INFO_GHOST, level, class));
else
- getglobal("CharSelectCharacterButton"..index.."ButtonTextInfo"):SetText(format(TEXT(CHARACTER_SELECT_INFO), level, class));
+ _G["CharSelectCharacterButton"..index.."ButtonTextInfo"]:SetText(format(CHARACTER_SELECT_INFO, level, class));
end
- getglobal("CharSelectCharacterButton"..index.."ButtonTextLocation"):SetText(zone);
+ _G["CharSelectCharacterButton"..index.."ButtonTextLocation"]:SetText(zone);
end
button:Show();
@@ -313,18 +293,18 @@ function UpdateCharacterList()
end
CharacterSelect.createIndex = 0;
- CharSelectCreateCharacterButton:Hide();
-
+ CharSelectCreateCharacterButton:Hide();
+
local connected = IsConnectedToServer();
for i=index, MAX_CHARACTERS_DISPLAYED, 1 do
- local button = getglobal("CharSelectCharacterButton"..index);
+ local button = _G["CharSelectCharacterButton"..index];
if ( (CharacterSelect.createIndex == 0) and (numChars < MAX_CHARACTERS_PER_REALM) ) then
CharacterSelect.createIndex = index;
if ( connected ) then
--If can create characters position and show the create button
CharSelectCreateCharacterButton:SetID(index);
--CharSelectCreateCharacterButton:SetPoint("TOP", button, "TOP", 0, -5);
- CharSelectCreateCharacterButton:Show();
+ CharSelectCreateCharacterButton:Show();
end
end
button:Hide();
@@ -352,8 +332,6 @@ function CharacterSelect_OnChar()
end
function CharacterSelectButton_OnClick()
- -- A drag just ended on top of this button — eat the click so the
- -- drop doesn't also re-select the character at the new slot.
if ( CharacterSelect.suppressNextClick ) then
CharacterSelect.suppressNextClick = nil;
return;
@@ -377,10 +355,10 @@ function CharacterSelectButton_OnDoubleClick()
end
function CharacterSelect_TabResize()
- local buttonMiddle = getglobal(this:GetName().."Middle");
- local buttonMiddleDisabled = getglobal(this:GetName().."MiddleDisabled");
+ local buttonMiddle = _G[this:GetName().."Middle"];
+ local buttonMiddleDisabled = _G[this:GetName().."MiddleDisabled"];
local width = this:GetTextWidth() - 8;
- local leftWidth = getglobal(this:GetName().."Left"):GetWidth();
+ local leftWidth = _G[this:GetName().."Left"]:GetWidth();
buttonMiddle:SetWidth(width);
buttonMiddleDisabled:SetWidth(width);
this:SetWidth(width + (2 * leftWidth));
@@ -408,14 +386,14 @@ end
function CharacterDeleteDialog_OnShow()
local name, race, class, level = GetCharacterInfo(GetCharIDFromIndex(CharacterSelect.selectedIndex));
- CharacterDeleteText1:SetText(format(TEXT(CONFIRM_CHAR_DELETE), name, level, class));
+ CharacterDeleteText1:SetText(format(CONFIRM_CHAR_DELETE, name, level, class));
CharacterDeleteBackground:SetHeight(16 + CharacterDeleteText1:GetHeight() + CharacterDeleteText2:GetHeight() + 23 + CharacterDeleteEditBox:GetHeight() + 8 + CharacterDeleteButton1:GetHeight() + 16);
CharacterDeleteButton1:Disable();
end
function CharacterSelect_EnterWorld()
PlaySound("gsCharacterSelectionEnterWorld");
- Autologin_EnterWorld();
+ EnterWorld();
end
function CharacterSelect_Exit()
@@ -430,7 +408,7 @@ end
function CharacterSelect_TechSupport()
PlaySound("gsCharacterSelectionAcctOptions");
- LaunchURL(TEXT(TECH_SUPPORT_URL));
+ LaunchURL(TECH_SUPPORT_URL);
end
function CharacterSelect_Delete()
@@ -491,9 +469,10 @@ end
function CharacterSelect_ManageAccount()
PlaySound("gsCharacterSelectionAcctOptions");
- LaunchURL(TEXT(AUTH_NO_TIME_URL));
+ LaunchURL(AUTH_NO_TIME_URL);
end
+
-- ---------------------------------------------------------------------------
-- Character reordering
-- ---------------------------------------------------------------------------
diff --git a/CharacterSelect.xml b/CharacterSelect.xml
index 40d6a0a..c7911a2 100644
--- a/CharacterSelect.xml
+++ b/CharacterSelect.xml
@@ -125,52 +125,16 @@
CharacterSelect_EnterWorld();
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ( this:GetChecked() ) then
- PlaySound("igMainMenuOptionCheckBoxOff");
- else
- PlaySound("igMainMenuOptionCheckBoxOn");
- end
-
-
-
-
-
-
-
-
@@ -643,7 +607,7 @@
-
+
@@ -651,7 +615,7 @@
-
+
@@ -731,7 +695,7 @@
else
CharacterDeleteButton1:Disable();
end
-
+
if ( CharacterDeleteButton1:IsEnabled() == 1 ) then
CharacterSelect_DeleteCharacter();
@@ -811,7 +775,7 @@
-
+
@@ -819,7 +783,7 @@
-
+