Skip to content

Enhancement: Split button row generation into a new UI widget class #1248

Description

@pushfoo

Enhancement request:

What should be added/changed?

Generating a row of buttons from labels should become a dedicated UI element. An unencapsulated version of this behavior is currently present in UIMessageBox:

button_group = UIBoxLayout(vertical=False, space_between=10)
for button_text in buttons:
button = UIFlatButton(text=button_text)
button_group.add(button)
button.on_click = self.on_ok # type: ignore

What would it help with?

It would make it easier to create button rows for other UI elements such as the file chooser (#1201). For example, the bottom row of buttons in this mockup could be implemented using the proposed widget:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementguiRelated to arcade GUI (sub module arcade.gui)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions