This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [HELP] Login Screen, Need Help !  (Read 1575 times)

Christoffel

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 9
    • View Profile
[HELP] Login Screen, Need Help !
« 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



Here is my code:


[spoiler:3p32k7q5]AccountLogin.xml

AccountLoginPasswordEdit
Code: [Select]
<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
Code: [Select]
<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
Code: [Select]
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]
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Christoffel

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 9
    • View Profile
Re: [HELP] Login Screen, Need Help !
« Reply #1 on: May 12, 2012, 01:31:49 pm »
I got another Problem, i want to delete Races and Classes from wow.

I got this error Message:



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:

Code: [Select]

<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:

Code: [Select]
<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]
« Last Edit: January 01, 1970, 01:00:00 am by Admin »