More actions
created |
No edit summary |
||
Line 4: | Line 4: | ||
Root tag: <GUI> | Root tag: <GUI> | ||
Attributes: onOpen, onClose, onCreate | Attributes: onOpen, onClose, onCreate, the value of these is the name of a function in the corresponding lua script | ||
==== Main Layout section ==== | |||
{| class="wikitable" | |||
|+ | |||
!Tag | |||
!Function | |||
!Attributes | |||
! | |||
|- | |||
|GuiElement | |||
|Mostly as a parent/container element to group others | |||
|profile, id | |||
| | |||
|- | |||
|Bitmap | |||
|Often used to encapsulate individual elements - exact reason unknown, can also be used to display an image | |||
|profile, id | |||
| | |||
|- | |||
|ThreePartBitmap | |||
|unknown | |||
| | |||
| | |||
|- | |||
|Text | |||
|simple text display | |||
|profile, id, text, name | |||
| | |||
|- | |||
|BoxLayout | |||
| | |||
| | |||
| | |||
|- | |||
|BinaryOption | |||
|Option between 2 values, can be on/off, can also be a/b | |||
|profile, id, name, onClick, focusInit | |||
| | |||
|- | |||
|MultiTextOption | |||
|Selector between multiple values | |||
|profile, id, name, onClick | |||
| | |||
|- | |||
|OptionSlider | |||
|Slider to select a value | |||
|profile, id, name, onClick | |||
| | |||
|- | |||
|ScrollingLayout | |||
| | |||
| | |||
| | |||
|- | |||
|Button | |||
| | |||
|profile, id, text, onClick | |||
| | |||
|} | |||
==== GUIProfiles ==== | ==== GUIProfiles ==== | ||
Line 10: | Line 69: | ||
Organised in <Profile> tags with attributes name, extends, (with) | Organised in <Profile> tags with attributes name, extends, (with) | ||
{| class="wikitable" | |||
|+<Profile> tag attributes | |||
!Atrribute | |||
!Values | |||
! | |||
|- | |||
|name | |||
|string name matching GuiElement's profile attribute | |||
| | |||
|- | |||
|extends | |||
|emptyPanel, baseReference, fs25_textDefault, fs25_binaryOption, fs25_multiTextOption, fs25_optionSlider | |||
| | |||
|- | |||
|with | |||
|anchorTopRight, anchorTopCenter, anchorTopLeft, anchorMiddleRight, anchorMiddleLeft, anchorMiddleCenter, anchorBottomLeft, anchorBottomCenter, anchorBottomLeft, anchorTopStretchingX, pivotBottomLeft, pivotBottomRight, pivotBottomCenter, ... | |||
|Optional | |||
|} | |||
Children can be: | Children can be: | ||
{| | {| | ||
|- | |- | ||
!Tag!!Type!!Example | !Tag | ||
!Attribute!!Type!!Example | |||
|- | |- | ||
|size||% or px||10% 20px | |size | ||
|value||% or px||10% 20px | |||
|- | |- | ||
|position||% or px||-10px | |position | ||
|value||% or px||-10px | |||
|- | |- | ||
|alignmentY||middle, top, bottom | |alignmentY | ||
|value||middle, top, bottom | |||
|- | |- | ||
|alignmentX||left, right, center | |alignmentX | ||
|value||left, right, center | |||
|- | |- | ||
|elementSpacing||% or px||15px | |elementSpacing | ||
|value||% or px||15px | |||
|- | |- | ||
|textSize||px||18px | |textSize | ||
|value||px||18px | |||
|- | |- | ||
|textBold||boolean||true | |textBold | ||
|value||boolean||true | |||
|- | |- | ||
|textUpperCase||boolean||true | |textUpperCase | ||
|value||boolean||true | |||
|- | |- | ||
|textAutoWidth||boolean||true | |textAutoWidth | ||
|value||boolean||true | |||
|- | |- | ||
|width||% or px||400px | |width | ||
|value||% or px||400px | |||
|- | |- | ||
|focusOnHighlight||boolean||true | |focusOnHighlight | ||
|value||boolean||true | |||
|- | |- | ||
|flowDirection||||vertical | |flowDirection | ||
|value|| ||vertical | |||
|- | |- | ||
|height||% or px||70px | |height | ||
|value||% or px||70px | |||
|- | |- | ||
|textLayoutMode||||scrolling | |textLayoutMode | ||
|value|| ||scrolling | |||
|- | |- | ||
|textAlignment||||center | |textAlignment | ||
|value|| ||center | |||
|- | |- | ||
|imageSliceId||image slice ID||gui.loadingAnimation | |imageSliceId | ||
|value||image slice ID||gui.loadingAnimation | |||
|- | |- | ||
|imageColor||color | |imageColor | ||
|value||color | |||
|- | |- | ||
|animationMode||||rotate | |animationMode | ||
|value|| ||rotate | |||
|- | |- | ||
|animationSpeed||||1000 | |animationSpeed | ||
|value|| ||1000 | |||
|- | |- | ||
|useYesNoTexts||||nil | |useYesNoTexts | ||
|value|| ||nil | |||
|} | |} |
Latest revision as of 11:57, 11 July 2025
Reference for FS25 GUI design
The GUI xml
Root tag: <GUI>
Attributes: onOpen, onClose, onCreate, the value of these is the name of a function in the corresponding lua script
Main Layout section
Tag | Function | Attributes | |
---|---|---|---|
GuiElement | Mostly as a parent/container element to group others | profile, id | |
Bitmap | Often used to encapsulate individual elements - exact reason unknown, can also be used to display an image | profile, id | |
ThreePartBitmap | unknown | ||
Text | simple text display | profile, id, text, name | |
BoxLayout | |||
BinaryOption | Option between 2 values, can be on/off, can also be a/b | profile, id, name, onClick, focusInit | |
MultiTextOption | Selector between multiple values | profile, id, name, onClick | |
OptionSlider | Slider to select a value | profile, id, name, onClick | |
ScrollingLayout | |||
Button | profile, id, text, onClick |
GUIProfiles
Styling information for GuiElements
Organised in <Profile> tags with attributes name, extends, (with)
Atrribute | Values | |
---|---|---|
name | string name matching GuiElement's profile attribute | |
extends | emptyPanel, baseReference, fs25_textDefault, fs25_binaryOption, fs25_multiTextOption, fs25_optionSlider | |
with | anchorTopRight, anchorTopCenter, anchorTopLeft, anchorMiddleRight, anchorMiddleLeft, anchorMiddleCenter, anchorBottomLeft, anchorBottomCenter, anchorBottomLeft, anchorTopStretchingX, pivotBottomLeft, pivotBottomRight, pivotBottomCenter, ... | Optional |
Children can be:
Tag | Attribute | Type | Example |
---|---|---|---|
size | value | % or px | 10% 20px |
position | value | % or px | -10px |
alignmentY | value | middle, top, bottom | |
alignmentX | value | left, right, center | |
elementSpacing | value | % or px | 15px |
textSize | value | px | 18px |
textBold | value | boolean | true |
textUpperCase | value | boolean | true |
textAutoWidth | value | boolean | true |
width | value | % or px | 400px |
focusOnHighlight | value | boolean | true |
flowDirection | value | vertical | |
height | value | % or px | 70px |
textLayoutMode | value | scrolling | |
textAlignment | value | center | |
imageSliceId | value | image slice ID | gui.loadingAnimation |
imageColor | value | color | |
animationMode | value | rotate | |
animationSpeed | value | 1000 | |
useYesNoTexts | value | nil |