Hello,
Once I have an UI element that is used for coloring, for example:
{
new = nil,
setId = <function>,
setName = <function>,
getName = <function>,
setVisible = <function>,
setTransparent = <function>,
setHighlighted = <function>,
setLayout = <function>,
setFocus = <function>,
hasFocus = <function>,
getParent = <function>,
getContentRect = <function>,
calcMinimumSize = <function>,
getLayout = <function>,
setTooltip = <function>,
setStyleClassList = <function>,
addStyleClass = <function>,
removeStyleClass = <function>,
addLifeTimeChecker = <function>,
setEnabled = <function>,
setGravity = <function>,
isEnabled = <function>,
isVisible = <function>,
setMaximumSize = <function>,
setMinimumSize = <function>,
invokeLater = <function>,
onDestroy = <function>,
onStep = <function>,
onVisibilityChange = <function>,
__doc__ = {
destroy = "(ILayoutItem self) -> Nil",
getContentRect = "(Component self) -> Rect",
addLifeTimeChecker = "(Component self) -> LifetimeChecker",
getId = "(ILayoutItem self) -> String",
setHighlighted = "(Component self, Bool highlighted) -> Nil",
getParent = "(Component self) -> Object",
setStyleClassList = "(Component self, Vector[String] list) -> Component",
isEnabled = "(Component self) -> Bool",
setLayout = "(Component self, ILayout layout) -> Component",
addStyleClass = "(Component self, String class) -> Nil",
isVisible = "(Component self) -> Bool",
setTransparent = "(Component self, Bool transparent) -> Nil",
setVisible = "(Component self, Bool visible, Bool emitSignal) -> Nil",
invokeLater = "(Component self, Function callback) -> Nil",
calcMinimumSize = "(Component self) -> Size",
getName = "(Component self) -> String",
hasFocus = "(Component self) -> Bool",
setFocus = "(Component self) -> Bool",
setName = "(Component self, String name) -> Nil",
setGravity = "(Component self, Number horizontal, Number vertical) -> Component",
setEnabled = "(Component self, Bool enabled) -> Component",
removeStyleClass = "(Component self, String class) -> Nil",
onDestroy = "(Component self, Function callback) -> Connection",
setId = "(Component self, String id) -> Nil",
new = "(String name) -> Component",
getLayout = "(Component self) -> Object",
setTooltip = "(Component self, String text) -> Component",
onStep = "(Component self, Function callback[Number, Number]) -> Nil",
setMaximumSize = "(Component self, Size size) -> Component",
setMinimumSize = "(Component self, Size size) -> Component",
onVisibilityChange = "(Component self, Function callback) -> Connection",
},
}
Alles anzeigen
How can I get its color? Maybe there's a background color? or maybe some painting of some sort? Maybe it's a style in the stylesheet?
Assuming it's colored using a style class, is there a way to get the style class of the element? I can't find anything in the classutil.lua about that.
If it's as the manual states:
ZitatTo find out the name or class of an ui element, you can use the ingame tools to pick elements. Then the name of the element that the cursor points on is visible in the console.
But I want to know the class. Here states I can pick an element and know the name. I want to know the class and I don't just want to know through the console. I want to know programatically.