mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 10:23:56 +00:00
Merge branch 'master' into alchemy
This commit is contained in:
commit
9b623a79ff
21 changed files with 223 additions and 163 deletions
|
@ -15,7 +15,7 @@ include (OpenMWMacros)
|
|||
# Version
|
||||
|
||||
set (OPENMW_VERSION_MAJOR 0)
|
||||
set (OPENMW_VERSION_MINOR 14)
|
||||
set (OPENMW_VERSION_MINOR 15)
|
||||
set (OPENMW_VERSION_RELEASE 0)
|
||||
|
||||
set (OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VERSION_RELEASE}")
|
||||
|
|
|
@ -105,7 +105,7 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
|||
// frame.
|
||||
|
||||
// passing of time
|
||||
if (MWBase::Environment::get().getWindowManager()->getMode()==MWGui::GM_Game)
|
||||
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
MWBase::Environment::get().getWorld()->advanceTime (
|
||||
mEnvironment.getFrameDuration()*MWBase::Environment::get().getWorld()->getTimeScaleFactor()/3600);
|
||||
|
||||
|
@ -116,9 +116,9 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
|||
// update actors
|
||||
std::vector<std::pair<std::string, Ogre::Vector3> > movement;
|
||||
MWBase::Environment::get().getMechanicsManager()->update (movement, mEnvironment.getFrameDuration(),
|
||||
MWBase::Environment::get().getWindowManager()->getMode()!=MWGui::GM_Game);
|
||||
MWBase::Environment::get().getWindowManager()->isGuiMode());
|
||||
|
||||
if (MWBase::Environment::get().getWindowManager()->getMode()==MWGui::GM_Game)
|
||||
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
MWBase::Environment::get().getWorld()->doPhysics (movement, mEnvironment.getFrameDuration());
|
||||
|
||||
// update world
|
||||
|
@ -413,7 +413,7 @@ void OMW::Engine::go()
|
|||
|
||||
void OMW::Engine::activate()
|
||||
{
|
||||
if (MWBase::Environment::get().getWindowManager()->getMode()!=MWGui::GM_Game)
|
||||
if (MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
return;
|
||||
|
||||
std::string handle = MWBase::Environment::get().getWorld()->getFacedHandle();
|
||||
|
|
|
@ -635,7 +635,7 @@ namespace MWDialogue
|
|||
actorKnownTopics.clear();
|
||||
|
||||
//initialise the GUI
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode(MWGui::GM_Dialogue);
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue);
|
||||
MWGui::DialogueWindow* win = MWBase::Environment::get().getWindowManager()->getDialogueWindow();
|
||||
win->startDialogue(actor, MWWorld::Class::get (actor).getName (actor));
|
||||
|
||||
|
@ -843,7 +843,7 @@ namespace MWDialogue
|
|||
|
||||
void DialogueManager::goodbyeSelected()
|
||||
{
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode(MWGui::GM_Game);
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
}
|
||||
|
||||
void DialogueManager::questionAnswered(std::string answere)
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#include "bookwindow.hpp"
|
||||
|
||||
#include "formatting.hpp"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwinput/inputmanager.hpp"
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "formatting.hpp"
|
||||
#include "window_manager.hpp"
|
||||
|
||||
using namespace MWGui;
|
||||
|
||||
|
@ -91,7 +92,7 @@ void BookWindow::onCloseButtonClicked (MyGUI::Widget* _sender)
|
|||
// 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().getInputManager()->setGuiMode(MWGui::GM_Game);
|
||||
mWindowManager.popGuiMode();
|
||||
}
|
||||
|
||||
void BookWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
|
||||
|
@ -101,7 +102,7 @@ void BookWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
|
|||
MWWorld::ActionTake take(mBook);
|
||||
take.execute();
|
||||
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode (GM_Game);
|
||||
mWindowManager.popGuiMode();
|
||||
}
|
||||
|
||||
void BookWindow::onNextPageButtonClicked (MyGUI::Widget* _sender)
|
||||
|
|
|
@ -110,7 +110,6 @@ using namespace MWGui;
|
|||
CharacterCreation::CharacterCreation(WindowManager* _wm)
|
||||
: mNameDialog(0)
|
||||
, mRaceDialog(0)
|
||||
, mDialogueWindow(0)
|
||||
, mClassChoiceDialog(0)
|
||||
, mGenerateClassQuestionDialog(0)
|
||||
, mGenerateClassResultDialog(0)
|
||||
|
@ -253,7 +252,7 @@ void CharacterCreation::onReviewDialogDone(WindowBase* parWindow)
|
|||
if (mReviewDialog)
|
||||
mWM->removeDialog(mReviewDialog);
|
||||
|
||||
mWM->setGuiMode(GM_Game);
|
||||
mWM->popGuiMode();
|
||||
}
|
||||
|
||||
void CharacterCreation::onReviewDialogBack()
|
||||
|
@ -261,7 +260,7 @@ void CharacterCreation::onReviewDialogBack()
|
|||
if (mReviewDialog)
|
||||
mWM->removeDialog(mReviewDialog);
|
||||
|
||||
mWM->setGuiMode(GM_Birth);
|
||||
mWM->pushGuiMode(GM_Birth);
|
||||
}
|
||||
|
||||
void CharacterCreation::onReviewActivateDialog(int parDialog)
|
||||
|
@ -270,19 +269,21 @@ void CharacterCreation::onReviewActivateDialog(int parDialog)
|
|||
mWM->removeDialog(mReviewDialog);
|
||||
mCreationStage = CSE_ReviewNext;
|
||||
|
||||
mWM->popGuiMode();
|
||||
|
||||
switch(parDialog)
|
||||
{
|
||||
case ReviewDialog::NAME_DIALOG:
|
||||
mWM->setGuiMode(GM_Name);
|
||||
mWM->pushGuiMode(GM_Name);
|
||||
break;
|
||||
case ReviewDialog::RACE_DIALOG:
|
||||
mWM->setGuiMode(GM_Race);
|
||||
mWM->pushGuiMode(GM_Race);
|
||||
break;
|
||||
case ReviewDialog::CLASS_DIALOG:
|
||||
mWM->setGuiMode(GM_Class);
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
break;
|
||||
case ReviewDialog::BIRTHSIGN_DIALOG:
|
||||
mWM->setGuiMode(GM_Birth);
|
||||
mWM->pushGuiMode(GM_Birth);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -304,13 +305,19 @@ void CharacterCreation::onPickClassDialogDone(WindowBase* parWindow)
|
|||
|
||||
//TODO This bit gets repeated a few times; wrap it in a function
|
||||
if (mCreationStage == CSE_ReviewNext)
|
||||
mWM->setGuiMode(GM_Review);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Review);
|
||||
}
|
||||
else if (mCreationStage >= CSE_ClassChosen)
|
||||
mWM->setGuiMode(GM_Birth);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Birth);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCreationStage = CSE_ClassChosen;
|
||||
mWM->setGuiMode(GM_Game);
|
||||
mWM->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,7 +331,8 @@ void CharacterCreation::onPickClassDialogBack()
|
|||
mWM->removeDialog(mPickClassDialog);
|
||||
}
|
||||
|
||||
mWM->setGuiMode(GM_Class);
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
}
|
||||
|
||||
void CharacterCreation::onClassChoice(int _index)
|
||||
|
@ -334,19 +342,21 @@ void CharacterCreation::onClassChoice(int _index)
|
|||
mWM->removeDialog(mClassChoiceDialog);
|
||||
}
|
||||
|
||||
mWM->popGuiMode();
|
||||
|
||||
switch(_index)
|
||||
{
|
||||
case ClassChoiceDialog::Class_Generate:
|
||||
mWM->setGuiMode(GM_ClassGenerate);
|
||||
mWM->pushGuiMode(GM_ClassGenerate);
|
||||
break;
|
||||
case ClassChoiceDialog::Class_Pick:
|
||||
mWM->setGuiMode(GM_ClassPick);
|
||||
mWM->pushGuiMode(GM_ClassPick);
|
||||
break;
|
||||
case ClassChoiceDialog::Class_Create:
|
||||
mWM->setGuiMode(GM_ClassCreate);
|
||||
mWM->pushGuiMode(GM_ClassCreate);
|
||||
break;
|
||||
case ClassChoiceDialog::Class_Back:
|
||||
mWM->setGuiMode(GM_Race);
|
||||
mWM->pushGuiMode(GM_Race);
|
||||
break;
|
||||
|
||||
};
|
||||
|
@ -363,13 +373,19 @@ void CharacterCreation::onNameDialogDone(WindowBase* parWindow)
|
|||
}
|
||||
|
||||
if (mCreationStage == CSE_ReviewNext)
|
||||
mWM->setGuiMode(GM_Review);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Review);
|
||||
}
|
||||
else if (mCreationStage >= CSE_NameChosen)
|
||||
mWM->setGuiMode(GM_Race);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Race);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCreationStage = CSE_NameChosen;
|
||||
mWM->setGuiMode(GM_Game);
|
||||
mWM->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -383,7 +399,8 @@ void CharacterCreation::onRaceDialogBack()
|
|||
mWM->removeDialog(mRaceDialog);
|
||||
}
|
||||
|
||||
mWM->setGuiMode(GM_Name);
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Name);
|
||||
}
|
||||
|
||||
void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
||||
|
@ -398,13 +415,19 @@ void CharacterCreation::onRaceDialogDone(WindowBase* parWindow)
|
|||
}
|
||||
|
||||
if (mCreationStage == CSE_ReviewNext)
|
||||
mWM->setGuiMode(GM_Review);
|
||||
else if(mCreationStage >= CSE_RaceChosen)
|
||||
mWM->setGuiMode(GM_Class);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Review);
|
||||
}
|
||||
else if (mCreationStage >= CSE_NameChosen)
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCreationStage = CSE_RaceChosen;
|
||||
mWM->setGuiMode(GM_Game);
|
||||
mCreationStage = CSE_NameChosen;
|
||||
mWM->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -419,11 +442,14 @@ void CharacterCreation::onBirthSignDialogDone(WindowBase* parWindow)
|
|||
}
|
||||
|
||||
if (mCreationStage >= CSE_BirthSignChosen)
|
||||
mWM->setGuiMode(GM_Review);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Review);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCreationStage = CSE_BirthSignChosen;
|
||||
mWM->setGuiMode(GM_Game);
|
||||
mWM->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -435,7 +461,8 @@ void CharacterCreation::onBirthSignDialogBack()
|
|||
mWM->removeDialog(mBirthSignDialog);
|
||||
}
|
||||
|
||||
mWM->setGuiMode(GM_Class);
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
}
|
||||
|
||||
void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
||||
|
@ -470,13 +497,19 @@ void CharacterCreation::onCreateClassDialogDone(WindowBase* parWindow)
|
|||
}
|
||||
|
||||
if (mCreationStage == CSE_ReviewNext)
|
||||
mWM->setGuiMode(GM_Review);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Review);
|
||||
}
|
||||
else if (mCreationStage >= CSE_ClassChosen)
|
||||
mWM->setGuiMode(GM_Birth);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Birth);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCreationStage = CSE_ClassChosen;
|
||||
mWM->setGuiMode(GM_Game);
|
||||
mWM->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -485,7 +518,8 @@ void CharacterCreation::onCreateClassDialogBack()
|
|||
if (mCreateClassDialog)
|
||||
mWM->removeDialog(mCreateClassDialog);
|
||||
|
||||
mWM->setGuiMode(GM_Class);
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
}
|
||||
|
||||
void CharacterCreation::onClassQuestionChosen(int _index)
|
||||
|
@ -496,7 +530,8 @@ void CharacterCreation::onClassQuestionChosen(int _index)
|
|||
mWM->removeDialog(mGenerateClassQuestionDialog);
|
||||
if (_index < 0 || _index >= 3)
|
||||
{
|
||||
mWM->setGuiMode(GM_Class);
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -581,7 +616,8 @@ void CharacterCreation::showClassQuestionDialog()
|
|||
|
||||
if (mGenerateClassStep > sGenerateClassSteps.size())
|
||||
{
|
||||
mWM->setGuiMode(GM_Class);
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -610,7 +646,8 @@ void CharacterCreation::onGenerateClassBack()
|
|||
mWM->removeDialog(mGenerateClassResultDialog);
|
||||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
||||
|
||||
mWM->setGuiMode(GM_Class);
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Class);
|
||||
}
|
||||
|
||||
void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
||||
|
@ -620,13 +657,19 @@ void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
|||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
||||
|
||||
if (mCreationStage == CSE_ReviewNext)
|
||||
mWM->setGuiMode(GM_Review);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Review);
|
||||
}
|
||||
else if (mCreationStage >= CSE_ClassChosen)
|
||||
mWM->setGuiMode(GM_Birth);
|
||||
{
|
||||
mWM->popGuiMode();
|
||||
mWM->pushGuiMode(GM_Birth);
|
||||
}
|
||||
else
|
||||
{
|
||||
mCreationStage = CSE_ClassChosen;
|
||||
mWM->setGuiMode(GM_Game);
|
||||
mWM->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -634,7 +677,6 @@ CharacterCreation::~CharacterCreation()
|
|||
{
|
||||
delete mNameDialog;
|
||||
delete mRaceDialog;
|
||||
delete mDialogueWindow;
|
||||
delete mClassChoiceDialog;
|
||||
delete mGenerateClassQuestionDialog;
|
||||
delete mGenerateClassResultDialog;
|
||||
|
|
|
@ -46,7 +46,6 @@ namespace MWGui
|
|||
//Dialogs
|
||||
TextInputDialog* mNameDialog;
|
||||
RaceDialog* mRaceDialog;
|
||||
DialogueWindow* mDialogueWindow;
|
||||
ClassChoiceDialog* mClassChoiceDialog;
|
||||
InfoBoxDialog* mGenerateClassQuestionDialog;
|
||||
GenerateClassResultDialog* mGenerateClassResultDialog;
|
||||
|
|
|
@ -636,7 +636,7 @@ void ContainerWindow::onCloseButtonClicked(MyGUI::Widget* _sender)
|
|||
{
|
||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setGuiMode(GM_Game);
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -667,6 +667,6 @@ void ContainerWindow::onTakeAllButtonClicked(MyGUI::Widget* _sender)
|
|||
|
||||
containerStore.clear();
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->setGuiMode(GM_Game);
|
||||
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,15 +112,6 @@ void DialogueWindow::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
|||
history->setVScrollPosition(history->getVScrollPosition() - _rel*0.3);
|
||||
}
|
||||
|
||||
void DialogueWindow::open()
|
||||
{
|
||||
topicsList->clear();
|
||||
pTopicsText.clear();
|
||||
history->eraseText(0,history->getTextLength());
|
||||
updateOptions();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
void DialogueWindow::onByeClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
|
||||
|
@ -133,7 +124,7 @@ void DialogueWindow::onSelectTopic(std::string topic)
|
|||
if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarter")->str)
|
||||
{
|
||||
/// \todo check if the player is allowed to trade with this actor (e.g. faction rank high enough)?
|
||||
mWindowManager.setGuiMode(GM_Barter);
|
||||
mWindowManager.pushGuiMode(GM_Barter);
|
||||
mWindowManager.getTradeWindow()->startTrade(mActor);
|
||||
}
|
||||
|
||||
|
@ -147,6 +138,11 @@ void DialogueWindow::startDialogue(MWWorld::Ptr actor, std::string npcName)
|
|||
mActor = actor;
|
||||
topicsList->setEnabled(true);
|
||||
setTitle(npcName);
|
||||
|
||||
topicsList->clear();
|
||||
pTopicsText.clear();
|
||||
history->eraseText(0,history->getTextLength());
|
||||
updateOptions();
|
||||
}
|
||||
|
||||
void DialogueWindow::setKeywords(std::list<std::string> keyWords)
|
||||
|
|
|
@ -30,8 +30,6 @@ namespace MWGui
|
|||
public:
|
||||
DialogueWindow(WindowManager& parWindowManager);
|
||||
|
||||
void open();
|
||||
|
||||
// Events
|
||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void MessageBoxManager::onFrame (float frameDuration)
|
|||
if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) {
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
mWindowManager->setNextMode(GM_Game);
|
||||
mWindowManager->popGuiMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace MWGui
|
|||
{
|
||||
enum GuiMode
|
||||
{
|
||||
GM_Game, // Game mode, only HUD
|
||||
GM_Inventory, // Inventory mode
|
||||
GM_Container,
|
||||
GM_MainMenu, // Main menu mode
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include "scrollwindow.hpp"
|
||||
|
||||
#include "formatting.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwinput/inputmanager.hpp"
|
||||
#include "../mwworld/actiontake.hpp"
|
||||
#include "../mwsound/soundmanager.hpp"
|
||||
|
||||
#include "formatting.hpp"
|
||||
#include "window_manager.hpp"
|
||||
|
||||
using namespace MWGui;
|
||||
|
||||
ScrollWindow::ScrollWindow (WindowManager& parWindowManager) :
|
||||
|
@ -55,7 +56,7 @@ void ScrollWindow::onCloseButtonClicked (MyGUI::Widget* _sender)
|
|||
{
|
||||
MWBase::Environment::get().getSoundManager()->playSound ("scroll", 1.0, 1.0);
|
||||
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode (GM_Game);
|
||||
mWindowManager.popGuiMode();
|
||||
}
|
||||
|
||||
void ScrollWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
|
||||
|
@ -65,5 +66,5 @@ void ScrollWindow::onTakeButtonClicked (MyGUI::Widget* _sender)
|
|||
MWWorld::ActionTake take(mScroll);
|
||||
take.execute();
|
||||
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode (GM_Game);
|
||||
mWindowManager.popGuiMode();
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ namespace MWGui
|
|||
std::string sound = "Item Gold Up";
|
||||
MWBase::Environment::get().getSoundManager()->playSound (sound, 1.0, 1.0);
|
||||
|
||||
mWindowManager.setGuiMode(GM_Game);
|
||||
mWindowManager.popGuiMode();
|
||||
}
|
||||
|
||||
void TradeWindow::onCancelButtonClicked(MyGUI::Widget* _sender)
|
||||
|
@ -220,7 +220,7 @@ namespace MWGui
|
|||
// now gimme back my stuff!
|
||||
mWindowManager.getInventoryWindow()->returnBoughtItems(MWWorld::Class::get(mContainer).getContainerStore(mContainer));
|
||||
|
||||
mWindowManager.setGuiMode(GM_Game);
|
||||
mWindowManager.popGuiMode();
|
||||
}
|
||||
|
||||
void TradeWindow::updateLabels()
|
||||
|
|
|
@ -62,9 +62,6 @@ WindowManager::WindowManager(
|
|||
, playerMagicka()
|
||||
, playerFatigue()
|
||||
, gui(NULL)
|
||||
, mode(GM_Game)
|
||||
, nextMode(GM_Game)
|
||||
, needModeChange(false)
|
||||
, garbageDialogs()
|
||||
, shown(GW_ALL)
|
||||
, allowed(newGame ? GW_None : GW_ALL)
|
||||
|
@ -178,12 +175,6 @@ void WindowManager::cleanupGarbage()
|
|||
void WindowManager::update()
|
||||
{
|
||||
cleanupGarbage();
|
||||
if (needModeChange)
|
||||
{
|
||||
needModeChange = false;
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode(nextMode);
|
||||
nextMode = GM_Game;
|
||||
}
|
||||
if (showFPSLevel > 0)
|
||||
{
|
||||
hud->setFPS(mFPS);
|
||||
|
@ -192,17 +183,6 @@ void WindowManager::update()
|
|||
}
|
||||
}
|
||||
|
||||
void WindowManager::setNextMode(GuiMode newMode)
|
||||
{
|
||||
nextMode = newMode;
|
||||
needModeChange = true;
|
||||
}
|
||||
|
||||
void WindowManager::setGuiMode(GuiMode newMode)
|
||||
{
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode(newMode);
|
||||
}
|
||||
|
||||
void WindowManager::updateVisible()
|
||||
{
|
||||
// Start out by hiding everything except the HUD
|
||||
|
@ -221,15 +201,20 @@ void WindowManager::updateVisible()
|
|||
// Mouse is visible whenever we're not in game mode
|
||||
MyGUI::PointerManager::getInstance().setVisible(isGuiMode());
|
||||
|
||||
if (mode == GM_Game)
|
||||
bool gameMode = !isGuiMode();
|
||||
|
||||
if (gameMode)
|
||||
mToolTips->enterGameMode();
|
||||
else
|
||||
mToolTips->enterGuiMode();
|
||||
|
||||
switch(mode) {
|
||||
case GM_Game:
|
||||
// If in game mode, don't show anything.
|
||||
break;
|
||||
if (gameMode)
|
||||
return;
|
||||
|
||||
GuiMode mode = mGuiModes.back();
|
||||
|
||||
switch(mode) {
|
||||
case GM_MainMenu:
|
||||
menu->setVisible(true);
|
||||
break;
|
||||
|
@ -273,7 +258,7 @@ void WindowManager::updateVisible()
|
|||
mInventoryWindow->openInventory();
|
||||
break;
|
||||
case GM_Dialogue:
|
||||
mDialogueWindow->open();
|
||||
mDialogueWindow->setVisible(true);
|
||||
break;
|
||||
case GM_Barter:
|
||||
mInventoryWindow->setVisible(true);
|
||||
|
@ -281,9 +266,6 @@ void WindowManager::updateVisible()
|
|||
mTradeWindow->setVisible(true);
|
||||
break;
|
||||
case GM_InterMessageBox:
|
||||
if(!mMessageBoxManager->isInteractiveMessageBox()) {
|
||||
setGuiMode(GM_Game);
|
||||
}
|
||||
break;
|
||||
case GM_Journal:
|
||||
mJournal->setVisible(true);
|
||||
|
@ -291,9 +273,6 @@ void WindowManager::updateVisible()
|
|||
break;
|
||||
default:
|
||||
// Unsupported mode, switch back to game
|
||||
// Note: The call will eventually end up this method again but
|
||||
// will stop at the check if mode is GM_Game.
|
||||
setGuiMode(GM_Game);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -427,7 +406,7 @@ void WindowManager::messageBox (const std::string& message, const std::vector<st
|
|||
else
|
||||
{
|
||||
mMessageBoxManager->createInteractiveMessageBox(message, buttons);
|
||||
setGuiMode(GM_InterMessageBox);
|
||||
pushGuiMode(GM_InterMessageBox);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,7 +431,7 @@ void WindowManager::onDialogueWindowBye()
|
|||
//removeDialog(dialogueWindow);
|
||||
mDialogueWindow->setVisible(false);
|
||||
}
|
||||
setGuiMode(GM_Game);
|
||||
popGuiMode();
|
||||
}
|
||||
|
||||
void WindowManager::onFrame (float frameDuration)
|
||||
|
@ -597,3 +576,27 @@ void WindowManager::onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _r
|
|||
if (setting && setting->type == ESM::VT_String)
|
||||
_result = setting->str;
|
||||
}
|
||||
|
||||
void WindowManager::pushGuiMode(GuiMode mode)
|
||||
{
|
||||
if (mode==GM_Inventory && allowed==GW_None)
|
||||
return;
|
||||
|
||||
mGuiModes.push_back(mode);
|
||||
|
||||
bool gameMode = !isGuiMode();
|
||||
MWBase::Environment::get().getInputManager()->changeInputMode(!gameMode);
|
||||
|
||||
updateVisible();
|
||||
}
|
||||
|
||||
void WindowManager::popGuiMode()
|
||||
{
|
||||
if (mGuiModes.size())
|
||||
mGuiModes.pop_back();
|
||||
|
||||
bool gameMode = !isGuiMode();
|
||||
MWBase::Environment::get().getInputManager()->changeInputMode(!gameMode);
|
||||
|
||||
updateVisible();
|
||||
}
|
||||
|
|
|
@ -96,8 +96,6 @@ namespace MWGui
|
|||
WindowManager(const Compiler::Extensions& extensions, int fpsLevel, bool newGame, OEngine::Render::OgreRenderer *mOgre, const std::string logpath);
|
||||
virtual ~WindowManager();
|
||||
|
||||
void setGuiMode(GuiMode newMode);
|
||||
|
||||
/**
|
||||
* Should be called each frame to update windows/gui elements.
|
||||
* This could mean updating sizes of gui elements or opening
|
||||
|
@ -105,19 +103,17 @@ namespace MWGui
|
|||
*/
|
||||
void update();
|
||||
|
||||
void setMode(GuiMode newMode)
|
||||
void pushGuiMode(GuiMode mode);
|
||||
void popGuiMode();
|
||||
|
||||
GuiMode getMode() const
|
||||
{
|
||||
if (newMode==GM_Inventory && allowed==GW_None)
|
||||
return;
|
||||
|
||||
mode = newMode;
|
||||
updateVisible();
|
||||
if (mGuiModes.empty())
|
||||
throw std::runtime_error ("getMode() called, but there is no active mode");
|
||||
return mGuiModes.back();
|
||||
}
|
||||
void setNextMode(GuiMode newMode);
|
||||
|
||||
GuiMode getMode() const { return mode; }
|
||||
|
||||
bool isGuiMode() const { return getMode() != GM_Game; } // Everything that is not game mode is considered "gui mode"
|
||||
bool isGuiMode() const { return !mGuiModes.empty(); }
|
||||
|
||||
// Disallow all inventory mode windows
|
||||
void disallowAll()
|
||||
|
@ -244,9 +240,7 @@ namespace MWGui
|
|||
|
||||
|
||||
MyGUI::Gui *gui; // Gui
|
||||
GuiMode mode; // Current gui mode
|
||||
GuiMode nextMode; // Next mode to activate in update()
|
||||
bool needModeChange; //Whether a mode change is needed in update() [will use nextMode]
|
||||
std::vector<GuiMode> mGuiModes;
|
||||
|
||||
std::vector<OEngine::GUI::Layout*> garbageDialogs;
|
||||
void cleanupGarbage();
|
||||
|
|
|
@ -148,13 +148,13 @@ namespace MWInput
|
|||
if (mDragDrop)
|
||||
return;
|
||||
|
||||
GuiMode mode = windows.getMode();
|
||||
bool gameMode = !windows.isGuiMode();
|
||||
|
||||
// Toggle between game mode and inventory mode
|
||||
if(mode == GM_Game)
|
||||
setGuiMode(GM_Inventory);
|
||||
else if(mode == GM_Inventory)
|
||||
setGuiMode(GM_Game);
|
||||
if(gameMode)
|
||||
windows.pushGuiMode(GM_Inventory);
|
||||
else if(windows.getMode() == GM_Inventory)
|
||||
windows.popGuiMode();
|
||||
|
||||
// .. but don't touch any other mode.
|
||||
}
|
||||
|
@ -167,27 +167,32 @@ namespace MWInput
|
|||
if (mDragDrop)
|
||||
return;
|
||||
|
||||
GuiMode mode = windows.getMode();
|
||||
bool gameMode = !windows.isGuiMode();
|
||||
|
||||
// Switch to console mode no matter what mode we are currently
|
||||
// in, except of course if we are already in console mode
|
||||
if(mode == GM_Console)
|
||||
setGuiMode(GM_Game);
|
||||
else setGuiMode(GM_Console);
|
||||
if (!gameMode)
|
||||
{
|
||||
if (windows.getMode() == GM_Console)
|
||||
windows.popGuiMode();
|
||||
else
|
||||
windows.pushGuiMode(GM_Console);
|
||||
}
|
||||
else
|
||||
windows.pushGuiMode(GM_Console);
|
||||
}
|
||||
|
||||
void toggleJournal()
|
||||
{
|
||||
using namespace MWGui;
|
||||
|
||||
GuiMode mode = windows.getMode();
|
||||
|
||||
// Toggle between game mode and journal mode
|
||||
if(mode == GM_Game)
|
||||
setGuiMode(GM_Journal);
|
||||
else if(mode == GM_Journal)
|
||||
setGuiMode(GM_Game);
|
||||
bool gameMode = !windows.isGuiMode();
|
||||
|
||||
if(gameMode)
|
||||
windows.pushGuiMode(GM_Journal);
|
||||
else if(windows.getMode() == GM_Journal)
|
||||
windows.popGuiMode();
|
||||
// .. but don't touch any other mode.
|
||||
}
|
||||
|
||||
|
@ -282,8 +287,7 @@ namespace MWInput
|
|||
lst->add(guiEvents,Event::EV_ALL);
|
||||
}
|
||||
|
||||
// Start out in game mode
|
||||
setGuiMode(MWGui::GM_Game);
|
||||
changeInputMode(false);
|
||||
|
||||
/**********************************
|
||||
Key binding section
|
||||
|
@ -348,6 +352,7 @@ namespace MWInput
|
|||
windows.update();
|
||||
|
||||
// Disable movement in Gui mode
|
||||
|
||||
if (windows.isGuiMode()) return;
|
||||
|
||||
// Configure player movement according to keyboard input. Actual movement will
|
||||
|
@ -388,14 +393,10 @@ namespace MWInput
|
|||
|
||||
// Switch between gui modes. Besides controlling the Gui windows
|
||||
// this also makes sure input is directed to the right place
|
||||
void setGuiMode(MWGui::GuiMode mode)
|
||||
void changeInputMode(bool guiMode)
|
||||
{
|
||||
// Tell the GUI what to show (this also takes care of the mouse
|
||||
// pointer)
|
||||
windows.setMode(mode);
|
||||
|
||||
// Are we in GUI mode now?
|
||||
if(windows.isGuiMode())
|
||||
if(guiMode)
|
||||
{
|
||||
// Disable mouse look
|
||||
mouse->setCamera(NULL);
|
||||
|
@ -431,11 +432,6 @@ namespace MWInput
|
|||
delete impl;
|
||||
}
|
||||
|
||||
void MWInputManager::setGuiMode(MWGui::GuiMode mode)
|
||||
{
|
||||
impl->setGuiMode(mode);
|
||||
}
|
||||
|
||||
void MWInputManager::update()
|
||||
{
|
||||
impl->update();
|
||||
|
@ -445,4 +441,9 @@ namespace MWInput
|
|||
{
|
||||
impl->setDragDrop(dragDrop);
|
||||
}
|
||||
|
||||
void MWInputManager::changeInputMode(bool guiMode)
|
||||
{
|
||||
impl->changeInputMode(guiMode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,9 +50,9 @@ namespace MWInput
|
|||
|
||||
void update();
|
||||
|
||||
void setDragDrop(bool dragDrop);
|
||||
void changeInputMode(bool guiMode);
|
||||
|
||||
void setGuiMode(MWGui::GuiMode mode);
|
||||
void setDragDrop(bool dragDrop);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace MWScript
|
|||
|
||||
virtual void execute (Interpreter::Runtime& runtime)
|
||||
{
|
||||
MWBase::Environment::get().getInputManager()->setGuiMode(mDialogue);
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(mDialogue);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace MWWorld
|
|||
|
||||
void ActionOpen::execute ()
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setGuiMode(MWGui::GM_Container);
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Container);
|
||||
MWBase::Environment::get().getWindowManager()->getContainerWindow()->open(mContainer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,12 +18,12 @@ namespace MWWorld
|
|||
|
||||
if (ref->base->data.isScroll)
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setGuiMode(MWGui::GM_Scroll);
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Scroll);
|
||||
MWBase::Environment::get().getWindowManager()->getScrollWindow()->open(mObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setGuiMode(MWGui::GM_Book);
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Book);
|
||||
MWBase::Environment::get().getWindowManager()->getBookWindow()->open(mObject);
|
||||
}
|
||||
}
|
||||
|
|
28
readme.txt
28
readme.txt
|
@ -3,7 +3,7 @@ OpenMW: A reimplementation of The Elder Scrolls III: Morrowind
|
|||
OpenMW is an attempt at recreating the engine for the popular role-playing game
|
||||
Morrowind by Bethesda Softworks. You need to own and install the original game for OpenMW to work.
|
||||
|
||||
Version: 0.14.0
|
||||
Version: 0.15.0
|
||||
License: GPL (see GPL3.txt for more information)
|
||||
Website: http://www.openmw.org
|
||||
|
||||
|
@ -132,6 +132,32 @@ Thanks to Kevin Ryan for kindly providing us with the icon used for the Data Fil
|
|||
|
||||
CHANGELOG
|
||||
|
||||
0.15.0
|
||||
|
||||
Bug #5: Physics reimplementation (fixes various issues)
|
||||
Bug #258: Resizing arrow's background is not transparent
|
||||
Bug #268: Widening the stats window in X direction causes layout problems
|
||||
Bug #269: Topic pane in dialgoue window is too small for some longer topics
|
||||
Bug #271: Dialog choices are sorted incorrectly
|
||||
Bug #281: The single quote character is not rendered on dialog windows
|
||||
Bug #285: Terrain not handled properly in cells that are not predefined
|
||||
Bug #289: Dialogue filter isn't doing case smashing/folding for item IDs
|
||||
Feature #15: Collision with Terrain
|
||||
Feature #17: Inventory-, Container- and Trade-Windows
|
||||
Feature #44: Floating Labels above Focussed Objects
|
||||
Feature #80: Tooltips
|
||||
Feature #83: Barter Dialogue
|
||||
Feature #90: Book and Scroll Windows
|
||||
Feature #156: Item Stacking in Containers
|
||||
Feature #213: Pulsating lights
|
||||
Feature #218: Feather & Burden
|
||||
Feature #256: Implement magic effect bookkeeping
|
||||
Feature #259: Add missing information to Stats window
|
||||
Feature #260: Correct case for dialogue topics
|
||||
Feature #280: GUI texture atlasing
|
||||
Feature #291: Ability to use GMST strings from GUI layout files
|
||||
Task #255: Make MWWorld::Environment into a singleton
|
||||
|
||||
0.14.0
|
||||
|
||||
Bug #1: Meshes rendered with wrong orientation
|
||||
|
|
Loading…
Reference in a new issue