#hud screen ui not working

1 messages · Page 1 of 1 (latest)

astral finch
#
{
    "your_image": {
    "type": "image",
    "texture": "textures/bradparts/bradbody",
    "size": [100, 100],
    "layer": 10,
    "ignored": "(not (#actionbar_text = 'hello'))"
},
"your_image_factory": {
    "type": "panel",
    "factory": {
        "name": "hud_actionbar_text_factory",
        "control_ids": {
            "hud_actionbar_text": "[email protected]_image"
        }
    }
},

"root_panel": {
    "modifications": [
        {
            "array_name": "controls",
            "operation": "insert_front",
            "value": {
                "[email protected]_image_factory": {}
            }
        }
    ]
}
}
#

for some reason the "hello" doesnt show the texture

#

when i make "ignored": "(#actionbar_text = 'hello')" like this it shows

astral finch
#

no content log errors

solid tinsel
#

uh

#

actionbar as a binding isn't a thing??

tardy temple
#

Its on wiki tho

solid tinsel
#

even if it has binding, the element does not define the bindings for it.

astral finch
#

how do i fix it?

solid tinsel
#

well since you used factory for this.

#

you don't need bindings.

#

just use $actionbar_text instead.

#

due 1.19.80 breaking how those variables works. you could alternatively do this

  // note: that 'the_actionbar' IS a name for variable we're picking. and we redirect to actual actionbar's factory variable instead.

  "$the_actionbar": "$actionbar_text",
  "$the_text": "(($the_actionbar - 'hello') = $the_actionbar)",
  "ignored": "$the_text"

// Also note: we use $the_text as our final operator outputs, so the `ignored` property thinks that it was just regular variables rather than hardcoded one.```
astral finch
#

oh thats great