Dev Log: UI update
It's been a while since the last update. My health issues have hindered my development for the past few weeks. This post will be different from the usual. Instead of breaking down game mechanics, this post showcases some UI changes I implemented.
After receiving feedback about the lack of support for mouse control, I changed the UI to allow mouse interactions. Now, players can select items using the mouse instead of a keyboard.
Players can also click on the key prompt. I rarely use this feature, but maybe someone out there will find it useful.


Games such as Slay the Spire allow the mouse to hover over certain keywords, making it easier for beginners to learn important game mechanics. I hesitated to code this because it was complicated, but it became apparent that whatever alternative solutions I came up with weren't good enough. FINE, I'll do it.
UE5 allows users to create custom rich text decorators, which react to the mouse-over event and construct tooltip widgets. However, C++ is required to code custom decorators, something I'm not good at. Another way to achieve a similar result using blueprints is to break down a sentence into individual words; each word is an independent widget wrapped inside a wrap box. The tricky bit is the language. Chinese, Japanese, Korean, etc, don't use white spaces to separate words like English. I had to code separated logic for different languages so the function could correctly parse the sentence.
The obvious drawback of this method is that long sentences can create too many widgets. To optimize, I use "//" to isolate parts that contain no keyword. For example,
"//I have a banana.//
He has an apple." (Apple is the keyword here.)
The first part of the text contains no keywords. A single text block will spawn to contain the substring "I have a banana". The second part has a keyword; so the function breaks down the sentence into 4 separate word widgets.
In addition, I added widget pooling so the game would not garbage-collect and construct new widget components constantly. Unfortunately, even with optimization, my solution can't rival the C++ solution for its sheer efficiency.
I'm going to gradually update all the UI in the game to make them more PC -friendly. Next on the list are the combat widgets.