Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

User:XPModder/GUI Reference

From Farming Simulator Modding Wiki
Revision as of 11:57, 11 July 2025 by XPModder (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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)

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

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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.