#Help with title text visiblity

1 messages · Page 1 of 1 (latest)

limpid star
#

{
    "namespace": "hud",
    "00anim": {
        "anim_type": "alpha",
        "easing": "in_quint",
        "from": 0,
        "to": 1,
        "duration": 9
    },
    "new_image": {
        "type": "image",
        "texture": "textures/items/apple",
        "anchor_from": "center",
        "anchor_to": "center",
        "size": [
            32,
            32
        ],
        "bindings": [
            {
                "binding_name": "#hud_title_text_string"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#hud_title_text_string = '0')",
                "target_property_name": "#visible"
            }
        ]
    },
    "hud_title_text/title": {
        "bindings": [
            {
                "binding_type": "global",
                "binding_name": "#hud_title_text_string",
                "binding_name_override": "#text"
            },
            {
                "binding_type": "view",
                "source_property_name": "(not (#text = '0'))",
                "target_property_name": "#visible"
            }
        ]
    },
    "root_panel": {
        "modifications": [
            {
                "array_name": "controls",
                "operation": "insert_front",
                "value": [
                    {
                        "@hud.new_image": {}
                    }
                ]
            }
        ]
    }
}

#

Try this