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 |