Overview

Download: https://mokha.me/ueplugins/UEPlugin_LogiclessButtons.rar

Expands Common UI to allow for swift creation of button groups using List View. Logic is kept in a separate object, promoting reusability and enabling division of work among team members. It might not be the best way to manage buttons out there, but this is what I came up with. It is not painless, just a different kind of pain.

The plugin comes packed with a titular L_ExampleMap example map. Contained in the Example folder. Together with a couple things to set everything up. You can safely delete the Example folder altogether once you understand how 3 functions in 2 objects work.

ezgif.com-resize.mp4

Why not using Common UI’s Button Groups?

Use whatever works best for you.

Components

Logicless Buttons introduces three new components to the UI Designer (& colleagues) toolkit: Button Commands, Button List View, and List Button.

The Button Command object is a powerful tool that allows for the creation of button functionality that can be shared and reused throughout a project. It works by encapsulating the logic for button commands into an object that can be easily called and executed from any button widget in the project.

Button List View and List Button widgets extend the Common UI respective parent widget by leveraging the power of the Button Command object. These widgets facilitate creating lists of buttons with unique commands and functionality. Button List View provides a simple and intuitive way to organize and display lists of buttons, while List Button allows for easy customization of individual buttons within a list.

Button Command Button List View List Button
: Extends Object : Extends CommonListView : Extends CommonButtonBase
Where the logic is. Where the m a g i c happens. Where the $æ s t h e t i c$ is.

Button Command

Don’t forget to add a Call to Parent Function at the start of your override if you want to keep the Push to Stack functionality. You can get the node by right-clicking on the matching Event Node.

Don’t forget to add a Call to Parent Function at the start of your override if you want to keep the Push to Stack functionality. You can get the node by right-clicking on the matching Event Node.

The Button Command object serves as a container for button logic and offers three customizable events: On Command Constructed from List, On Button Clicked, and On Button Released. These events have default implementations that can be overridden in both C++ and Blueprint child classes. The Button Command object has a GetGameInstance pure Blueprint function to facilitate the interfacing with Subsystems and Player Controller.

The PushToStack and WidgetToPush properties enable pushing widgets onto a Common Activatable Widget Stack, which is specified in the Button List View.

Additionally, the ButtonLabel and ButtonIcon properties further customise the button's appearance through the optional BindWidgets in the List Button widget.

Can just be a Data Blueprint if you don’t need any override.

Can just be a Data Blueprint if you don’t need any override.

Back Button Command

A special BackButtonCommand child class exists with back handling functionality already implemented into it. This button can be added automatically from the Button List View.

Button List View

This is the core of the Logicless Button workflow. Here, you select which Button Commands will be evaluated during button generation. A List Button will be generated for each Command listed. The same Button Command can be listed multiple times, allowing for custom logic to be defined in the command object itself. A Back button can be automatically added.

Just drag and drop the Button List View from the  and set it up as needed.

Just drag and drop the Button List View from the Blueprint Widget Palette and set it up as needed.

The Button List View can automatically push widgets to a stack if the Button Command is set up for it. The stack can be directly selected if it is internal, or indirectly specified by Display Name if it is external to the Widget Tree. If no Display Name is specified, it will find the first Common Activatable Widget Stack up the Widget Hierarchy and push there.