Fix being able to flip journal pages with the mousewheel when the options overlay is active (Fixes #2855)

sceneinput
scrawl 10 years ago
parent 58cd2b1a84
commit 7dd09dd637

@ -61,6 +61,7 @@ namespace
DisplayStateStack mStates; DisplayStateStack mStates;
Book mTopicIndexBook; Book mTopicIndexBook;
bool mQuestMode; bool mQuestMode;
bool mOptionsMode;
bool mAllQuests; bool mAllQuests;
template <typename T> template <typename T>
@ -182,6 +183,7 @@ namespace
mQuestMode = false; mQuestMode = false;
mAllQuests = false; mAllQuests = false;
mOptionsMode = false;
} }
void adjustButton (char const * name, bool optional = false) void adjustButton (char const * name, bool optional = false)
@ -244,6 +246,7 @@ namespace
void setBookMode () void setBookMode ()
{ {
mOptionsMode = false;
setVisible (OptionsBTN, true); setVisible (OptionsBTN, true);
setVisible (OptionsOverlay, false); setVisible (OptionsOverlay, false);
@ -253,6 +256,8 @@ namespace
void setOptionsMode () void setOptionsMode ()
{ {
mOptionsMode = true;
setVisible (OptionsBTN, false); setVisible (OptionsBTN, false);
setVisible (OptionsOverlay, true); setVisible (OptionsOverlay, true);
@ -508,6 +513,8 @@ namespace
void notifyNextPage(MyGUI::Widget* _sender) void notifyNextPage(MyGUI::Widget* _sender)
{ {
if (mOptionsMode)
return;
if (!mStates.empty ()) if (!mStates.empty ())
{ {
unsigned int & page = mStates.top ().mPage; unsigned int & page = mStates.top ().mPage;
@ -523,6 +530,8 @@ namespace
void notifyPrevPage(MyGUI::Widget* _sender) void notifyPrevPage(MyGUI::Widget* _sender)
{ {
if (mOptionsMode)
return;
if (!mStates.empty ()) if (!mStates.empty ())
{ {
unsigned int & page = mStates.top ().mPage; unsigned int & page = mStates.top ().mPage;

Loading…
Cancel
Save