Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Miscellaneous => Topic started by: Christoffel on May 08, 2012, 03:16:31 pm
-
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
(http://img94.imageshack.us/img94/247/errormsg.png) (http://imageshack.us/photo/my-images/94/errormsg.png/)
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
(http://img11.imageshack.us/img11/4103/logouek.png) (http://imageshack.us/photo/my-images/11/logouek.png/)
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]
-
I got another Problem, i want to delete Races and Classes from wow.
I got this error Message:
(http://img208.imageshack.us/img208/9341/errorvok.png) (http://imageshack.us/photo/my-images/208/errorvok.png/)
The files and CharacterCreate.Lua CharacterCreate.xml, CharRaces.dbc, CharClasses I have all been processed:
CharCreate.lua
MAX_RACES = 4;
MAX_CLASSES_PER_RACE = 4;
CharCreate.xml
Race Buttons:
<CheckButton name="CharacterCreateRaceButton1" inherits="CharacterCreateRaceButtonTemplate" id="1">
<Anchors>
<Anchor point="TOP" relativePoint="TOP" x="-50" y="-61"/>
</Anchors>
</CheckButton>
<CheckButton name="CharacterCreateRaceButton2" inherits="CharacterCreateRaceButtonTemplate" id="2">
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="CharacterCreateRaceButton2" relativePoint="TOPRIGHT" x="1" y="1"/>"/>
</Anchors>
</CheckButton>
Class Buttons:
<CheckButton name="CharacterCreateClassButton1" inherits="CharacterCreateClassButtonTemplate" id="1">
<Anchors>
<Anchor point="TOP" x="-90" y="-456"/>
</Anchors>
</CheckButton>
<CheckButton name="CharacterCreateClassButton2" inherits="CharacterCreateClassButtonTemplate" id="2">
<Anchors>
<Anchor point="LEFT" relativeTo="CharacterCreateClassButton1" relativePoint="RIGHT" x="6" y="0"/>
</Anchors>
</CheckButton>
<CheckButton name="CharacterCreateClassButton3" inherits="CharacterCreateClassButtonTemplate" id="3">
<Anchors>
<Anchor point="LEFT" relativeTo="CharacterCreateClassButton2" relativePoint="RIGHT" x="6" y="0"/>
</Anchors>
</CheckButton>
<CheckButton name="CharacterCreateClassButton4" inherits="CharacterCreateClassButtonTemplate" id="4">
<Anchors>
<Anchor point="LEFT" relativeTo="CharacterCreateClassButton3" relativePoint="RIGHT" x="6" y="0"/>
</Anchors>
</CheckButton>
[/spoiler]