styleutil¶
Quelle: base/tealdef/gui/main/styleutil.d.tl
Hinweise
Hilfsfunktion, die aus einer einfachen Lua-Tabelle ein api.gui.StyleSheet baut.
StyleUtil¶
record global base/tealdef/gui/main/styleutil.d.tl:3
global record StyleUtil
Laden: local styleutil = ug_require "::/gui/main/styleutil.tl" as StyleUtil
Hinweise
Hilfe für Stylesheets.
Funktionen
makeStyle(styleTable : table) : StyleSheet base/tealdef/gui/main/styleutil.d.tl:4
Aufruf: styleutil.makeStyle(…)
Hinweise
Erzeugt aus einer Tabelle ein api.gui.StyleSheet.
| Parameter | Typ | Beschreibung |
|---|---|---|
styleTable |
table |
Tabelle mit beliebigen dieser Schlüssel: borderColor, color, backgroundColor, backgroundColor1, backgroundColor2, borderWidth (jeweils {r, g, b, a} oder ein Vec4f), size, anchorPoint ({x, y} oder ein Vec2f), backgroundImage1, backgroundImage2 (Nine-Patch) und fontSize (Ganzzahl). Andere Schlüssel werden ignoriert. |
Rückgabe StyleSheet: Das neue Stylesheet.
Im Basisspiel verwendet: 48-mal in 15 Dateien
base/content/game_mechanics/game_mechanics/finance/finances_cargo_lifetime.tl:161
base/content/game_mechanics/game_mechanics/finance/finances_react_util.tl:55
base/content/gui/gui/entity_window/entity_window_util.tl:405
base/content/gui/gui/entity_window/industry_react_util.tl:436
base/content/gui/gui/entity_window/station_group/station_group.tl:281
base/content/gui/gui/entity_window/vehicle/vehicle.tl:103
… und 9 weitere Dateien.