Merge remote branch 'scrawl/guifixes'

This commit is contained in:
Marc Zinnschlag 2012-06-19 19:06:18 +02:00
commit 1f0efa9f7d
10 changed files with 17 additions and 15 deletions

View file

@ -843,7 +843,7 @@ namespace MWDialogue
void DialogueManager::goodbyeSelected() void DialogueManager::goodbyeSelected()
{ {
MWBase::Environment::get().getWindowManager()->popGuiMode(); MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
} }
void DialogueManager::questionAnswered(std::string answere) void DialogueManager::questionAnswered(std::string answere)

View file

@ -70,8 +70,8 @@ namespace MWGui
void AlchemyWindow::onCancelButtonClicked(MyGUI::Widget* _sender) void AlchemyWindow::onCancelButtonClicked(MyGUI::Widget* _sender)
{ {
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Alchemy);
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Inventory);
} }
void AlchemyWindow::onCreateButtonClicked(MyGUI::Widget* _sender) void AlchemyWindow::onCreateButtonClicked(MyGUI::Widget* _sender)

View file

@ -92,7 +92,7 @@ void BookWindow::onCloseButtonClicked (MyGUI::Widget* _sender)
// no 3d sounds because the object could be in a container. // no 3d sounds because the object could be in a container.
MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0); MWBase::Environment::get().getSoundManager()->playSound ("book close", 1.0, 1.0);
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Book);
} }
void BookWindow::onTakeButtonClicked (MyGUI::Widget* _sender) void BookWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
@ -102,7 +102,7 @@ void BookWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
MWWorld::ActionTake take(mBook); MWWorld::ActionTake take(mBook);
take.execute(); take.execute();
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Book);
} }
void BookWindow::onNextPageButtonClicked (MyGUI::Widget* _sender) void BookWindow::onNextPageButtonClicked (MyGUI::Widget* _sender)

View file

@ -640,7 +640,7 @@ void ContainerWindow::onCloseButtonClicked(MyGUI::Widget* _sender)
{ {
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop) if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
{ {
MWBase::Environment::get().getWindowManager()->popGuiMode(); MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
} }
} }
@ -671,7 +671,7 @@ void ContainerWindow::onTakeAllButtonClicked(MyGUI::Widget* _sender)
containerStore.clear(); containerStore.clear();
MWBase::Environment::get().getWindowManager()->popGuiMode(); MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
} }
} }

View file

@ -58,7 +58,7 @@ void MessageBoxManager::onFrame (float frameDuration)
if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) { if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) {
delete mInterMessageBoxe; delete mInterMessageBoxe;
mInterMessageBoxe = NULL; mInterMessageBoxe = NULL;
mWindowManager->popGuiMode(); mWindowManager->removeGuiMode(GM_InterMessageBox);
} }
} }

View file

@ -56,7 +56,7 @@ void ScrollWindow::onCloseButtonClicked (MyGUI::Widget* _sender)
{ {
MWBase::Environment::get().getSoundManager()->playSound ("scroll", 1.0, 1.0); MWBase::Environment::get().getSoundManager()->playSound ("scroll", 1.0, 1.0);
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Scroll);
} }
void ScrollWindow::onTakeButtonClicked (MyGUI::Widget* _sender) void ScrollWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
@ -66,5 +66,5 @@ void ScrollWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
MWWorld::ActionTake take(mScroll); MWWorld::ActionTake take(mScroll);
take.execute(); take.execute();
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Scroll);
} }

View file

@ -155,7 +155,7 @@ namespace MWGui
void SettingsWindow::onOkButtonClicked(MyGUI::Widget* _sender) void SettingsWindow::onOkButtonClicked(MyGUI::Widget* _sender)
{ {
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Settings);
} }
void SettingsWindow::onResolutionSelected(MyGUI::ListBox* _sender, size_t index) void SettingsWindow::onResolutionSelected(MyGUI::ListBox* _sender, size_t index)

View file

@ -212,7 +212,7 @@ namespace MWGui
std::string sound = "Item Gold Up"; std::string sound = "Item Gold Up";
MWBase::Environment::get().getSoundManager()->playSound (sound, 1.0, 1.0); MWBase::Environment::get().getSoundManager()->playSound (sound, 1.0, 1.0);
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Barter);
} }
void TradeWindow::onCancelButtonClicked(MyGUI::Widget* _sender) void TradeWindow::onCancelButtonClicked(MyGUI::Widget* _sender)
@ -222,7 +222,7 @@ namespace MWGui
// now gimme back my stuff! // now gimme back my stuff!
mWindowManager.getInventoryWindow()->returnBoughtItems(MWWorld::Class::get(mPtr).getContainerStore(mPtr)); mWindowManager.getInventoryWindow()->returnBoughtItems(MWWorld::Class::get(mPtr).getContainerStore(mPtr));
mWindowManager.popGuiMode(); mWindowManager.removeGuiMode(GM_Barter);
} }
void TradeWindow::updateLabels() void TradeWindow::updateLabels()

View file

@ -464,7 +464,7 @@ void WindowManager::onDialogueWindowBye()
//removeDialog(dialogueWindow); //removeDialog(dialogueWindow);
mDialogueWindow->setVisible(false); mDialogueWindow->setVisible(false);
} }
popGuiMode(); removeGuiMode(GM_Dialogue);
} }
void WindowManager::onFrame (float frameDuration) void WindowManager::onFrame (float frameDuration)
@ -677,6 +677,9 @@ void WindowManager::removeGuiMode(GuiMode mode)
++it; ++it;
} }
bool gameMode = !isGuiMode();
MWBase::Environment::get().getInputManager()->changeInputMode(!gameMode);
updateVisible(); updateVisible();
} }

View file

@ -7,7 +7,6 @@ namespace MWWorld
{ {
void ActionAlchemy::execute() void ActionAlchemy::execute()
{ {
MWBase::Environment::get().getWindowManager()->popGuiMode();
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Alchemy); MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Alchemy);
} }
} }