I have a problem with a new function, and indeed it is to save your password.
I'm changing it all the time the lines of code, but I can not get out
I get this error message all the time
Here is my code:
[spoiler:3p32k7q5]AccountLogin.xml
AccountLoginPasswordEdit
<EditBox name="AccountLoginPasswordEdit" letters="16" password="1">
<Size x="200" y="35"/>
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="-330" y="600"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentFill" inherits="GlueFontDisableSmall" justifyH="LEFT" justifyV="MIDDLE" text="ENTER_PASS">
<Anchors>
<Anchor point="CENTER" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="3"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Backdrop bgFile="InterfaceTooltipsUI-Tooltip-Background" edgeFile="InterfaceGluesCommonGlue-Tooltip-Border" tile="true">
<BackgroundInsets>
<AbsInset left="10" right="5" top="4" bottom="9"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="16"/>
</TileSize>
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
</Backdrop>
<Scripts>
<OnTabPressed>
if ( AccountLoginTokenEdit:IsShown() ) then
AccountLoginTokenEdit:SetFocus();
else
AccountLogin_FocusAccountName();
end
</OnTabPressed>
<OnEscapePressed>
AccountLogin_Exit();
</OnEscapePressed>
<OnEnterPressed>
if ( TOSFrame:IsShown() ) then
return;
end
AccountLogin_Login();
</OnEnterPressed>
<OnEditFocusLost>
self:HighlightText(0, 0);
</OnEditFocusLost>
<OnEditFocusGained>
self:HighlightText();
</OnEditFocusGained>
<OnTextChanged>
local Password = GetSavedPassword();
if ( Password ~= "" and Password ~= self:SetText("") ) then
SetSavedPassword("");
AccountLoginSavePassword:SetChecked(0);
end
if ( self:SetText("") ~= "" ) then
AccountLoginPasswordEditFill:Hide();
else
AccountLoginPasswordEditFill:Show();
end
</OnTextChanged>
</Scripts>
<FontString inherits="GlueEditBoxFont"/>
<TextInsets>
<AbsInset left="12" right="5" bottom="5"/>
</TextInsets>
</EditBox>
AccountLoginSavePassord NEW FUNCTION
<CheckButton name="AccountLoginSavePassword">
<Size>
<AbsDimension x="20" y="20"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="AccountLoginSavePasswordText" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
if ( GetSavedPassword() ~= "" ) then
self:SetChecked(1);
else
self:SetChecked(0);
end
</OnLoad>
<OnClick>
if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOff");
else
PlaySound("igMainMenuOptionCheckBoxOn");
end
</OnClick>
</Scripts>
<NormalTexture file="InterfaceButtonsUI-CheckBox-Up"/>
<PushedTexture file="InterfaceButtonsUI-CheckBox-Down"/>
<HighlightTexture file="InterfaceButtonsUI-CheckBox-Highlight" alphaMode="ADD"/>
<CheckedTexture file="InterfaceButtonsUI-CheckBox-Check"/>
<DisabledCheckedTexture file="InterfaceButtonsUI-CheckBox-Check-Disabled"/>
</CheckButton>
AccountLogin.lua
GetSavedPassword NEW FUNCTION
local Password = GetSavedPassword();
if AccountLoginAccountEdit:SetText("") == "" then AccountLoginAccountEdit:SetText(accountName); end
--AccountLoginPasswordEdit:SetText("");
AccountLoginTokenEdit:SetText("");
if ( Password and Password ~= "" and GetUsesToken() ) then
AccountLoginTokenEdit:Show()
else
AccountLoginTokenEdit:Hide()
end
[/spoiler:3p32k7q5]
I have another problem, I want my logo on the left sit in the corner, but it does not work
Code:
[spoiler:3p32k7q5]AccountLogin.xml
AccountLoginLogo
[code]
<Texture name="AccountLoginLogo" file="Interface/Glues/Common/Glues-WoW-Logo">
<Size>
<AbsDimension x="100" y="50"/>
</Size>
<Anchors>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="1" y="1"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
[Code][/spoiler:3p32k7q5]