Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ui_adaptor in new character menu, debug message popup, and loading ui #38916

Merged
merged 5 commits into from
Mar 21, 2020

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Mar 21, 2020

Summary

SUMMARY: None

Purpose of change

Migrate new character menu, debug message popup, and loading ui to ui_adaptor, which were missed in #38235. Also fixed the issue where world creation menu would erase its contents when querying whether to cancel.

Describe the solution

  1. Used ui_adaptor for new character menu, debug message popup, and loading ui.
  2. Exit query of world generation menu is moved from the main UI function to separate tabs, so the tabs can be properly redrawn when the query is shown.
  3. Debug message will block any previous uis from being drawn or resized, since they could be in an unknown state when the debug message is shown.

Testing

Tested in game and everything works fine.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. labels Mar 21, 2020
@Rivet-the-Zombie Rivet-the-Zombie merged commit 0b046cb into CleverRaven:dev Mar 21, 2020
@Qrox Qrox deleted the migrate-ui-1 branch March 29, 2020 18:24
@ZhilkinSerg ZhilkinSerg mentioned this pull request Apr 1, 2020
13 tasks
@@ -1561,6 +1592,7 @@ tab_direction set_profession( const catacurses::window &w, avatar &u, points_lef
// Add traits for the new profession (and perhaps scenario, if, for example,
// both the scenario and old profession require the same trait)
u.add_traits( points );
const int netPointCost = sorted_profs[cur_id]->point_cost() - u.prof->point_cost();
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess issue #39208 is from here - netPointCost should contain difference between current and new profession, but character profession was already set to selected profession just 4 lines above, so it always returns 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants