Get color (or class) of UI element

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • Hello,

    Once I have an UI element that is used for coloring, for example:


    Code
    e:getName()
    "LineColorComp"

    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:

    Zitat

    To 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.

    Einmal editiert, zuletzt von brunoais ()

BlueBrixx