Skip to content

Character creator ImGui migration#86250

Merged
GuardianDll merged 5 commits intoCleverRaven:masterfrom
ShnitzelX2:character-creator-ui-persistent-uilist
Apr 13, 2026
Merged

Character creator ImGui migration#86250
GuardianDll merged 5 commits intoCleverRaven:masterfrom
ShnitzelX2:character-creator-ui-persistent-uilist

Conversation

@ShnitzelX2
Copy link
Copy Markdown
Contributor

@ShnitzelX2 ShnitzelX2 commented Apr 5, 2026

Summary

Interface "character creator ImGui migration"

Purpose of change

Update character creator UI to ImGui, and improve maintainability by not having seven different UI layouts.

This should be functional, so please build and test it for yourself. Feedback is very welcome.

Describe the solution

Minor non-infrastructure changes to the UI layout:

  • Basic character information appears on the "top bar" and can be changed at any time.
  • All tabs (excluding the "SUMMARY" tab) display with a uilist on the left and tab information on the right.
  • Magic numbers were replaced with constants, see character.h, game_constants.h.
  • Sub-tab support for traits and skills.

Some changes to uilist were required. uilist::query has been modified such that uilist can be utilized as a UI component along with being a standalone prompt.

Describe alternatives you've considered

  • uilist does not have sorting support, but it does have filter support. Thus, the tab lists no longer support sorting, though whether it's useful currently is up for debate.
  • drawing uilist at a fixed size instead of just to fit the max entry size
    - uilist::allow_disabled = true still skips selection of disabled entries, I would use it for traits if it worked it works, my bad

Testing

Checklist:

Basics:

  • Create a "Custom Character" and advance to game with that character
  • "Preset Character" ..
  • "Random Character" ..
  • "Play Now!" still works
  • Exit to main menu
  • Exiting and re-entering character creator resets properly
  • Aftershock random character
  • Magiclysm random character
  • MA mod custom character (a mod with 1 scenario)

Actions (all keybinds, mouse):

  • (+, +) "NEXT_TAB" / "PREV_TAB"
  • (+, N/A) "QUIT"
    • "HELP_KEYBINDINGS"
  • (+, +) "SAVE_TEMPLATE"
  • (+, +) "RANDOMIZE_CHAR_NAME"
  • (+, +) "RANDOMIZE_CHAR_DESCRIPTION"
  • (+, +) "REROLL_CHARACTER"
  • (+, +) "REROLL_CHARACTER_WITH_SCENARIO"
  • (+, +) "CHANGE_GENDER"
  • (+, +) "CHANGE_OUTFIT"
  • (+, +) "CHANGE_NAME"
  • (+, +) "CHANGE_AGE"
  • (+, +) "CHANGE_HEIGHT"
  • (+, +) "CHANGE_BLOOD_TYPE"
  • (+, +) "CHANGE_START_OF_CATACLYSM"
  • (+, +) "CHANGE_START_OF_GAME"
  • (+, +) "RESET_CALENDAR"
  • (+, +) "SCROLL_INFOBOX_UP" / "SCROLL_INFOBOX_DOWN"
  • (+, +) "CHOOSE_CITY"
  • (+, +) "CHOOSE_LOCATION"
Screenshots image image image image image image image filter: "challenge" image

Additional context

Remaining tasks:

  • no keybind to scroll through right-side details
  • professions inventory recalculates per-draw
  • skills uilist does not draw at correct width
    - [ ] SUMMARY tab input lag (low priority for now)
  • handle commented block in past_games_info.cpp
  • CI
  • testing and any other cleanup

uilist and other ImGui bugs:

  • filter footer_text gets cut off at bottom of uilist
  • width sometimes cuts off a character for longest entry
  • existing uilist double-selection bug
  • number input popups don't resize to prompt text properly

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies [C++] Changes (can be) made in C++. Previously named `Code` Scenarios New Scenarios, balancing, bugs with scenarios Character / World Generation Issues and enhancements concerning stages of creating a character or a world astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Apr 5, 2026
@ShnitzelX2 ShnitzelX2 marked this pull request as ready for review April 8, 2026 01:59
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @Qrox

@RenechCDDA
Copy link
Copy Markdown
Member

I haven't reviewed this, but I did read your summary.

Is there a reason for using a uilist over imgui's native listbox? It sounds like you had to modify uilist to work much like listbox, which seems redundant.

@ShnitzelX2
Copy link
Copy Markdown
Contributor Author

Is there a reason for using a uilist over imgui's native listbox? It sounds like you had to modify uilist to work much like listbox, which seems redundant.

Yes: uilist is an existing list structure with lots of useful built-in features already implemented in ImGui. It seemed redundant to me not to just modify it to be more flexible, and my main goal was to not make yet another list implementation.

@ShnitzelX2 ShnitzelX2 force-pushed the character-creator-ui-persistent-uilist branch 2 times, most recently from f4402c3 to 5cc4215 Compare April 9, 2026 00:57
@ShnitzelX2
Copy link
Copy Markdown
Contributor Author

Recent commits include changing the top bar and summary to have buttons functioning as clickable alternatives to existing keybinds:

image

Comment thread src/newcharacter.cpp
@github-actions github-actions bot added BasicBuildPassed This PR builds correctly, label assigned by github actions and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels Apr 11, 2026
@ShnitzelX2 ShnitzelX2 force-pushed the character-creator-ui-persistent-uilist branch from 76d2560 to ae828bf Compare April 12, 2026 00:22
@github-actions github-actions bot added the Map / Mapgen Overmap, Mapgen, Map extras, Map display label Apr 13, 2026
@ShnitzelX2 ShnitzelX2 force-pushed the character-creator-ui-persistent-uilist branch from 1b286ef to 44a6f95 Compare April 13, 2026 04:01
@ShnitzelX2 ShnitzelX2 force-pushed the character-creator-ui-persistent-uilist branch from 44a6f95 to 1ae6881 Compare April 13, 2026 04:02
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 13, 2026
@GuardianDll
Copy link
Copy Markdown
Member

let's goooo

@GuardianDll GuardianDll merged commit 7e87c35 into CleverRaven:master Apr 13, 2026
27 of 33 checks passed
@Inglonias
Copy link
Copy Markdown
Contributor

Congratulations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies Scenarios New Scenarios, balancing, bugs with scenarios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants