Skip to content

Commit

Permalink
fix #21 shortcut bar disappear
Browse files Browse the repository at this point in the history
Commit  5293c1f  tried to fix the crash issue, but the shortcut bar is
missing (apparently my device must have gone seriously wrong that I
didn’t notice it!).  This is an attempt to correct it.

The solution: still we don’t want to add shortcut bar to gump manager’s
gump list because it will try to close all gumps when loading a saved
games. Following the foot steps of gkeyboard(CE version), we draw the
shortcut bar in Gump_manager::paint(),  and handle events in
Gump_manager::handle_modal_gump_event().
  • Loading branch information
litchie committed Oct 16, 2015
1 parent 3eb9053 commit 388eba5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gumps/Gump_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ void Gump_manager::paint(bool modal) {
#ifdef UNDER_CE
gkeyboard->paint();
#endif
#ifdef __IPHONEOS__
g_shortcutBar->paint();
#endif
}


Expand Down Expand Up @@ -473,6 +476,10 @@ int Gump_manager::handle_modal_gump_event(
#ifdef UNDER_CE
if (gkeyboard->handle_event(&event))
break;
#endif
#ifdef __IPHONEOS__
if (g_shortcutBar->handle_event(&event))
break;
#endif
if (event.button.button == 1) {
gump->mouse_down(gx, gy, event.button.button);
Expand All @@ -497,6 +504,10 @@ int Gump_manager::handle_modal_gump_event(
#ifdef UNDER_CE
if (gkeyboard->handle_event(&event))
break;
#endif
#ifdef __IPHONEOS__
if (g_shortcutBar->handle_event(&event))
break;
#endif
if (event.button.button != 3)
gump->mouse_up(gx, gy, event.button.button);
Expand Down

1 comment on commit 388eba5

@DominusExult
Copy link
Collaborator

Choose a reason for hiding this comment

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

I had removed them in bce2c6c because they are crashing the "Setup" in the Exult main menu (where you can chose the game you want to play).
So this gets a bit more complicated :(

Please sign in to comment.