Skip to content

if KeybindList is unbound when the menu is opened, KeybindListEditor does not display its EmptyText property #102

@pneuma163

Description

@pneuma163

Example sml:

<frame layout="256px 256px"
        padding="16"
        background={@Mods/StardewUI/Sprites/ControlBorder} >
    <keybind-editor button-height="64"
            sprite-map={@Mods/StardewUI/SpriteMaps/Buttons:default-default-0.5}
            editable-type="MultipleKeybinds"
            add-button-text="Add"
            empty-text="Not set"
            focusable="true"
            keybind-list={<>OpenMenuKeybinds} />
</frame>

In the above example, OpenMenuKeybinds gets set in the model to a value from the ModConfig. That value has a default, but the player can set it to none.

When the menu is opened, if the keybind is bound and then that binding is removed within the menu, then the EmptyText property displays in the menu (top example in the image). However if the menu is opened and the keybind is not bound, then the graphic of the KeybindListEditor is displayed with neither button nor EmptyText (bottom example in the image)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions