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

Migrate panel manager to ui_adaptor #39758

Merged
merged 1 commit into from
Apr 20, 2020
Merged

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Apr 20, 2020

Summary

SUMMARY: Interface "Migrate panel manager to ui_adaptor"

Purpose of change

Migrate more UIs to ui_adaptor. Fixes #39663.

Describe the solution

Renamed panel_manager::draw_adm to panel_manager::show_adm and moved the call to it from game::draw_panels to game::handle_action. Got rid of some tail-recursive calls to game::draw_panels in the process. panel_manager::show_adm and game::draw_panels no longer needs the column and index parameters so these are removed.

Then I refactored panel_manager::show_adm to clarify the variable names, and fixed an issue of duplicate selected entry when swapping panels.

Finally, migrated the UI to ui_adaptor.

Testing

Tested on both tiles and curses.

Switched off all panels, exited the panel manager, and the game did not crash (fixes #39663)

Opened sub-UIs and resized the game window, and the UI was resized and redrawn correctly.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. labels Apr 20, 2020
@ZhilkinSerg ZhilkinSerg merged commit 6a58402 into CleverRaven:master Apr 20, 2020
@Qrox Qrox deleted the migrate-ui-8 branch April 21, 2020 06:29
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.

Game crashes when trying to modify sidebar
2 participants