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

Clear screen after world/options menu close to clean up graphical artifacts #36257

Closed
wants to merge 1 commit into from

Conversation

mark7
Copy link
Contributor

@mark7 mark7 commented Dec 19, 2019

Large world/options menus can extend outside of the "normal" main menu
area. When they do so and are closed, the area that they had been
covering up is not cleared. Clear it.

Summary

SUMMARY: Bugfixes "Redraw area outside of world/options menu close to clean up graphical artifacts"

Purpose of change

Presently, if there is a large world creation menu or a large options menu that extends beyond the normal "main menu" area -- as it can on a tall window -- then when that it closed, the area surrounding the normal "main menu" area is not cleared, leaving behind graphical artifacts.

world_creation_artifact
options_artifact

My guess is that this issue has probably been present since larger menus were introduced in PR #35157.

Describe the solution

Clear the screen before doing a refresh.

Testing

Ran (on the tiles target; tiles/non-tiles shouldn't matter) a large menu for each of the options and world creation menu and confirmed that they no longer leave behind graphical artifacts after being closed.

Large world/options menus can extend outside of the "normal" main menu
area.  When they do so and are closed, the area that they had been
covering up is not cleared.  Clear it.
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. labels Dec 19, 2019
@ZhilkinSerg
Copy link
Contributor

There are more things requiring same fix. Please also add catacurses::clear() near catacurses::refresh() on lines 489, 760, 1167 and 1178 in worldfactory.cpp.

@@ -2691,6 +2691,7 @@ std::string options_manager::show( bool ingame, const bool world_options_only )
// keybinding screen erased the internal borders of main menu, restore it:
draw_borders_internal( w_options_header, mapLines );
} else if( action == "QUIT" ) {
catacurses::clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly it would be better to put catacurses::clear() before drawing certain screens instead of when exiting options screen as window would be cleared on "Save changes"/"Abort World generation " popups.

image

image

@ghost
Copy link

ghost commented Dec 19, 2019

This will fix #35835

@ZhilkinSerg
Copy link
Contributor

Closed in favor of #36380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [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.

2 participants