Skip to content

Feat: Classic UI option - #53

Draft
rhrlima wants to merge 3 commits into
Doddler:masterfrom
rhrlima:feat/classic-ui
Draft

Feat: Classic UI option#53
rhrlima wants to merge 3 commits into
Doddler:masterfrom
rhrlima:feat/classic-ui

Conversation

@rhrlima

@rhrlima rhrlima commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Related to Issue #52

This PR adds an option to "Classic" UI themed windows.

It uses components and scripts that I put into an Unity Package called RO Flex UI, which is a collection of modular prefabs and scripts that should simplify the way we build UI in general, not only with the classic style.

What Changed?

  • Add Player Info and Main Menu classic windows
  • Add toggle to UI menu to swap between Modern and Classic styles
  • Adds a UiManagerV2 as an initial idea to simplify the current UiManager script
  • Adds a ClassicUI Scene with examples of windows created using the components
  • Adds a custom Pixel Font based in the original RO.

PlayerInfo and MainMenu windows

I did only these two windows for now as simpler examples that do not require complex behavior.

PlayerInfo is the top-left window that displays Player's information like Name, Job, HP/SP, exp, etc.

MainMenu is the Escape window that usually shows options for character selection and keybindings, but here I added buttons for the same options we have at the bottom.

I had to rework a little bit of CharacterDetailBox and PlayerState and use an Observer pattern to update the old and new UI windows based on changes to the Player data. I believe this can be expanded and added to other parts of the code as well, to simplify how we handle controller and view scripts.

// Events emitted by PlayerState
public Action OnTextChanged;
public Action OnHpSPChanged;
public Action OnProgressChanged;
public Action OnWeightOrCurrencyChanged;
public Action OnStatsChanged;
public Action OnSkillsChanged;
// Example of UI script subscribing to PlayerState events
private void Subscribe()
{
    var state = PlayerState.Instance;
    if (state == null || subscribed)
        return;

    state.OnTextChanged += OnTextChanged;
    state.OnHpSPChanged += OnHpSpChanged;
    state.OnProgressChanged += OnProgressChanged;
    state.OnWeightOrCurrencyChanged += OnWeightAndZenyChanged;
    subscribed = true;
}

UiManagerV2

Follows the same basic idea from the current script with a dictionary of windows for management, and a list of openwindows, to control what to close.

It also proposes a self-register pattern, where the Window script can call during Start() something like:

UiManagerV2.Instance.RegisterWindow(WindowID.PLAYER_INFO, this, KeyCode.Q);

Which should simplify how we register windows, and possibly handle keyboard events.

Example

Working Player Info window
image

Examples of Classic Windows built using the components
image

rhrlima added 3 commits July 15, 2026 17:33
- UI Style swap in option menu
- PlayerInfo window
- MainMenu window
- UiManagerV2 initial design
- Temp changes to work with existing setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant