mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Revert "New Game button"
This reverts commit c5dd0e19688b388b6e4e978d5ecf07ec14f5085d.
This commit is contained in:
parent
1c73a3f2fb
commit
64210e6efa
@ -82,8 +82,6 @@ namespace MWBase
|
||||
virtual OEngine::Render::Fader* getFader() = 0;
|
||||
///< \ŧodo remove this function. Rendering details should not be exposed.
|
||||
|
||||
virtual void newGame() = 0;
|
||||
|
||||
virtual MWWorld::CellStore *getExterior (int x, int y) = 0;
|
||||
|
||||
virtual MWWorld::CellStore *getInterior (const std::string& name) = 0;
|
||||
|
@ -6,15 +6,12 @@
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
|
||||
#include "confirmationdialog.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
||||
MainMenu::MainMenu(MWBase::WindowManager& parWindowManager, int w, int h)
|
||||
MainMenu::MainMenu(int w, int h)
|
||||
: OEngine::GUI::Layout("openmw_mainmenu.layout")
|
||||
, mButtonBox(0)
|
||||
, mDialog(parWindowManager)
|
||||
{
|
||||
onResChange(w,h);
|
||||
}
|
||||
@ -23,7 +20,7 @@ namespace MWGui
|
||||
{
|
||||
setCoord(0,0,w,h);
|
||||
|
||||
int height = 64 * 4;
|
||||
int height = 64 * 3;
|
||||
|
||||
if (mButtonBox)
|
||||
MyGUI::Gui::getInstance ().destroyWidget(mButtonBox);
|
||||
@ -36,11 +33,12 @@ namespace MWGui
|
||||
mReturn->eventMouseButtonClick += MyGUI::newDelegate(this, &MainMenu::returnToGame);
|
||||
curH += 64;
|
||||
|
||||
|
||||
/*
|
||||
mNewGame = mButtonBox->createWidget<MyGUI::Button> ("ButtonImage", MyGUI::IntCoord(0, curH, 128, 64), MyGUI::Align::Default);
|
||||
mNewGame->eventMouseButtonClick += MyGUI::newDelegate(this, &MainMenu::newGame);
|
||||
mNewGame->setImageResource ("Menu_NewGame");
|
||||
curH += 64;
|
||||
/*
|
||||
|
||||
mLoadGame = mButtonBox->createWidget<MyGUI::Button> ("ButtonImage", MyGUI::IntCoord(0, curH, 128, 64), MyGUI::Align::Default);
|
||||
mLoadGame->setImageResource ("Menu_LoadGame");
|
||||
curH += 64;
|
||||
@ -83,17 +81,4 @@ namespace MWGui
|
||||
Ogre::Root::getSingleton ().queueEndRendering ();
|
||||
}
|
||||
|
||||
void MainMenu::newGame(MyGUI::Widget* sender)
|
||||
{
|
||||
mDialog.open ("#{sNotifyMessage54}");
|
||||
mDialog.eventOkClicked.clear();
|
||||
mDialog.eventCancelClicked.clear();
|
||||
mDialog.eventOkClicked += MyGUI::newDelegate(this, &MainMenu::newGameConfirmed);
|
||||
}
|
||||
|
||||
void MainMenu::newGameConfirmed()
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager ()->removeGuiMode (GM_MainMenu);
|
||||
MWBase::Environment::get().getWorld ()->newGame();
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
#include <openengine/gui/layout.hpp>
|
||||
|
||||
#include "confirmationdialog.hpp"
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
|
||||
class MainMenu : public OEngine::GUI::Layout
|
||||
{
|
||||
public:
|
||||
MainMenu(MWBase::WindowManager& parWindowManager, int w, int h);
|
||||
MainMenu(int w, int h);
|
||||
|
||||
void onResChange(int w, int h);
|
||||
|
||||
@ -26,10 +24,6 @@ namespace MWGui
|
||||
void returnToGame(MyGUI::Widget* sender);
|
||||
void showOptions(MyGUI::Widget* sender);
|
||||
void exitGame(MyGUI::Widget* sender);
|
||||
void newGame(MyGUI::Widget* sender);
|
||||
void newGameConfirmed();
|
||||
|
||||
ConfirmationDialog mDialog;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ WindowManager::WindowManager(
|
||||
mDragAndDrop->mDraggedWidget = 0;
|
||||
mDragAndDrop->mDragAndDropWidget = dragAndDropWidget;
|
||||
|
||||
mMenu = new MainMenu(*this, w,h);
|
||||
mMenu = new MainMenu(w,h);
|
||||
mMap = new MapWindow(*this, cacheDir);
|
||||
mStatsWindow = new StatsWindow(*this);
|
||||
mConsole = new Console(w,h, consoleOnlyScripts);
|
||||
|
@ -170,7 +170,7 @@ namespace MWWorld
|
||||
const std::string& master, const boost::filesystem::path& resDir, const boost::filesystem::path& cacheDir, bool newGame,
|
||||
const std::string& encoding, std::map<std::string,std::string> fallbackMap)
|
||||
: mPlayer (0), mLocalScripts (mStore), mGlobalVariables (0),
|
||||
mSky (true), mCells (mStore, mEsm), mNewGameStarted(false),
|
||||
mSky (true), mCells (mStore, mEsm),
|
||||
mNumFacing(0)
|
||||
{
|
||||
mPhysics = new PhysicsSystem(renderer);
|
||||
@ -1015,12 +1015,6 @@ namespace MWWorld
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mNewGameStarted)
|
||||
{
|
||||
playVideo ("mw_intro.bik");
|
||||
mNewGameStarted = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool World::isCellExterior() const
|
||||
@ -1302,11 +1296,4 @@ namespace MWWorld
|
||||
{
|
||||
mRendering->stopVideo();
|
||||
}
|
||||
|
||||
void World::newGame ()
|
||||
{
|
||||
// set new game mark
|
||||
mGlobalVariables->setInt ("chargenstate", 1);
|
||||
mNewGameStarted = true; // in order to play the intro video at the end of the next frame
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,6 @@ namespace MWWorld
|
||||
MWWorld::Globals *mGlobalVariables;
|
||||
MWWorld::PhysicsSystem *mPhysics;
|
||||
bool mSky;
|
||||
bool mNewGameStarted;
|
||||
|
||||
Cells mCells;
|
||||
|
||||
@ -103,8 +102,6 @@ namespace MWWorld
|
||||
virtual OEngine::Render::Fader* getFader();
|
||||
///< \ŧodo remove this function. Rendering details should not be exposed.
|
||||
|
||||
virtual void newGame();
|
||||
|
||||
virtual CellStore *getExterior (int x, int y);
|
||||
|
||||
virtual CellStore *getInterior (const std::string& name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user