Community Forum

Problems with "GuiElement"

Forum Overview >> Scripting

CategoryScripting
Created10.05.2018 10:02


Andreas P. (apuehri) 10.05.2018 10:02
I 'm currently working on an in-game menu for a mod.
I try to build it like the real ingame options menu

It worked without problems with the following entries ....

<GuiElement type="multiTextOption" profile="multiTextOptionSettings" onCreate="onCreatexxx" toolTip="$l10n_gui_xxx" onFocus="onFocusElement" onLeave="onLeaveElement" focusChangeTop="11" focusChangeBottom="11" focusId="11">
<GuiElement type="button" profile="multiTextOptionLeft" />
<GuiElement type="button" profile="multiTextOptionRight" />
<GuiElement type="text" profile="multiTextOptionText" />
<GuiElement type="text" profile="multiTextOptionTitle" text="$l10n_gui_xxxx" />
<GuiElement type="bitmap" profile="multiTextOptionBg" />
</GuiElement>

and

<GuiElement type="toggleButton2" profile="multiTextOptionSettings" onCreate="onCreatexxx" toolTip="$l10n_gui_xxx" onFocus="onFocusElement" onLeave="onLeaveElement" focusChangeTop="12" focusChangeBottom="12" focusId="12">
<GuiElement type="button" profile="multiTextOptionLeft" />
<GuiElement type="button" profile="multiTextOptionRight" />
<GuiElement type="text" profile="multiTextOptionText" />
<GuiElement type="text" profile="multiTextOptionTitle" text="$l10n_gui_xxx" />
<GuiElement type="bitmap" profile="multiTextOptionBg" />
</GuiElement>

However, I have problems implementing an input field that works like the name input of the player in the options menu.

Can someone help me here?
How should the entries be in the XML for this to work properly?
I have solved it at the moment as follows, it looks visually right in the game and the input works well, but it causes log errors ..

<GuiElement type="multiTextOption" profile="multiTextOptionSettings" onCreate="onCreatexxxx" >
<GuiElement type="text" profile="multiTextOptionText" />
<GuiElement type="text" profile="multiTextOptionTitle" text="$l10n_gui_hat_nameHelperM1" />
<GuiElement type="textInput" profile="textInput" maxInputTextWidth="120px" maxCharacters="10" onEnterPressed="onEnterPresxxx" toolTip="$l10n_gui_xxx" onFocus="onFocusElement" onLeave="onLeaveElement" focusChangeTop="21" focusChangeBottom="21" focusId="21"/>
</GuiElement>

Many Thanks

Unknown 24.11.2018 22:22
Hi Andreas,

sorry I can't solve your issue because i'am just getting into modding here.
But I was looking for a GUI modding hint or example and it seems that you somehow found something to create such a "in-game-looking-ui" option.

Could you tell me were to find more information about this or were to find these xml/xsd files that describe the GuiElement's?

Regrads,

xxlinkexx

Jos Kuijpers (Unknown) 02.01.2019 15:52
don't put the textInput inside a multiTextOption

What are the log errors?


Note: Log in to post. Create a new account here.