Cowzy Friday: Another UI update and Event Dispatchers!!
- Wesley Chartrand
- Mar 21
- 2 min read
Welcome back to another Cowzy Friday update! This week, I've been focused on a refactor of the Toolbar UI, making it more modular, and improving how elements communicate with each other using Event Dispatchers. Let’s dive into the details! 🐄
New Feature: Popup Option Panel 🎉
One of the most noticeable UI improvements is the addition of a popup option panel when hovering over toolbar buttons. This feature allows for quick access to additional options without cluttering the main interface.
Toolbar UI Refactor: Modular Widget Structure 🏗️
Previously, the Toolbar Button was a single, monolithic widget. While functional, it made adding new features cumbersome. To solve this, I refactored it into smaller, more manageable components that work together.
The Toolbar UI now consists of:
WBP_ToolbarButton – The main button that players interact with.
WBP_ToolbarOptionPanel – The popup panel that appears on hover, containing additional settings.
WBP_ToolbarOptionButton – The individual buttons inside the panel that handle specific actions.
These components now combine to create WBP_BuildButton, WBP_PathButton, etc., ensuring each toolbar mode has its own configuration without unnecessary duplication.
This approach makes the UI more flexible and scalable, allowing for faster iteration on new features.
Event Dispatchers: Lightweight Communication Between Blueprints
Event Dispatchers are magic and one way I'm taking advantage of Unreal Engine.
Why Event Dispatchers?
Instead of casting between Blueprints, Event Dispatchers allow different UI components to listen for changes and respond accordingly.


How Cowzy Uses Them:
The WBP_BuildButton listens for events when there is a highlight or selection and then calls the Mouse Enter/Leave for the Toolbar Button.
The WBP_ToolbarButton sends calls to the WBP_ToolbarOptionPanel related to button selection (although no logic is implemented)
UI elements can communicate without needing to know specific implementation details of the game logic.
Next Steps: Expanding UI Functionality 🛠️
Now that the structure is in place, the next focus is on making the Toolbar Option Panel interactive:
Implement Logic in WBP_ToolbarOptionPanel – Buttons, sliders, and other UI elements need to trigger real game actions, such as:
Allowing players to place buildings.
Path creation mode.
Managing construction settings dynamically.
Closing Thoughts
Refactoring the UI and integrating Event Dispatchers was a time-consuming but necessary step toward a more modular and scalable system. Now, adding new toolbar options and interactions will be quicker and easier going forward.
Thanks for joining me this Cowzy Friday! 🏡🐄
Comments