mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-05-28 17:06:34 +03:00
Fixed the issue where pop-ups left after logging out of the server could not be closed. (#12111)
* Fixed the issue where pop-ups left after logging out of the server could not be closed. * Apply suggestion from @Anuken --------- Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
@@ -717,7 +717,12 @@ public class UI implements ApplicationListener, Loadable{
|
||||
/** Shows a menu that hides when another followUp-menu is shown or when nothing is selected.
|
||||
* @see UI#showMenu(String, String, String[][], Intc) */
|
||||
public void showFollowUpMenu(int menuId, String title, String message, String[][] options, Intc callback) {
|
||||
Dialog dialog = newMenuDialog(title, message, options, (option, myself) -> callback.get(option));
|
||||
Dialog dialog = newMenuDialog(title, message, options, (option, myself) -> {
|
||||
callback.get(option);
|
||||
if(!state.isGame()){
|
||||
myself.hide();
|
||||
}
|
||||
});
|
||||
dialog.closeOnBack(() -> {
|
||||
followUpMenus.remove(menuId);
|
||||
callback.get(-1);
|
||||
|
||||
Reference in New Issue
Block a user