forked from mirror/openmw-tes3mp
added gui manager skeleton and a cmake fix
This commit is contained in:
parent
505a972faa
commit
2c63d67ceb
5 changed files with 137 additions and 14 deletions
|
@ -63,6 +63,12 @@ set(GAMESOUND_HEADER
|
|||
apps/openmw/mwsound/extensions.hpp)
|
||||
source_group(apps\\openmw\\mwsound FILES ${GAMESOUND} ${GAMESOUND_HEADER})
|
||||
|
||||
set(GAMEGUI
|
||||
apps/openmw/mwgui/guimanager.cpp)
|
||||
set(GAMEGUI_HEADER
|
||||
apps/openmw/mwgui/guimanager.hpp)
|
||||
source_group(apps\\openmw\\mwgui FILES ${GAMEGUI} ${GAMEGUI_HEADER})
|
||||
|
||||
set(GAMEWORLD
|
||||
apps/openmw/mwworld/world.cpp)
|
||||
set(GAMEWORLD_HEADER
|
||||
|
@ -74,9 +80,9 @@ set(GAMEWORLD_HEADER
|
|||
source_group(apps\\openmw\\mwworld FILES ${GAMEWORLD} ${GAMEWORLD_HEADER})
|
||||
|
||||
|
||||
set(APPS ${GAME} ${GAMEREND} ${GAMEINPUT} ${GAMESCRIPT} ${GAMESOUND} ${GAMEWORLD})
|
||||
set(APPS ${GAME} ${GAMEREND} ${GAMEINPUT} ${GAMESCRIPT} ${GAMESOUND} ${GAMEGUI} ${GAMEWORLD})
|
||||
set(APPS_HEADER ${GAME_HEADER} ${GAMEREND_HEADER} ${GAMEINPUT_HEADER} ${GAMESCRIPT_HEADER}
|
||||
${GAMESOUND_HEADER} ${GAMEWORLD_HEADER})
|
||||
${GAMESOUND_HEADER} ${GAMEGUI_HEADER} ${GAMEWORLD_HEADER})
|
||||
|
||||
# source directory: components
|
||||
|
||||
|
@ -231,22 +237,11 @@ endif (CMAKE_COMPILER_IS_GNUCC)
|
|||
|
||||
# Main executable
|
||||
add_executable(openmw
|
||||
${BSA} ${BSA_HEADER}
|
||||
${TOOLS} ${TOOLS_HEADER}
|
||||
${OGRE} ${OGRE_HEADER}
|
||||
${INPUT} ${INPUT_HEADER}
|
||||
${NIF} ${NIF_HEADER}
|
||||
${NIFOGRE} ${NIFOGRE_HEADER}
|
||||
${MANGLE_VFS}
|
||||
${GAME}
|
||||
${ESM_STORE} ${ESM_STORE_HEADER}
|
||||
${GAMEREND} ${GAMEREND_HEADER}
|
||||
# ???
|
||||
# MACOSX_BUNDLE
|
||||
${COMPONENTS} ${COMPONENTS_HEADER}
|
||||
${OPENMW_LIBS} ${OPENMW_LIBS_HEADER}
|
||||
${APPS} ${APPS_HEADER}
|
||||
${ESM_HEADER}
|
||||
${APPLE_BUNDLE_RESOURCES}
|
||||
)
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
#include "mwsound/soundmanager.hpp"
|
||||
|
||||
#include "mwgui/guimanager.hpp"
|
||||
|
||||
#include "mwworld/world.hpp"
|
||||
#include "mwworld/ptr.hpp"
|
||||
#include "mwworld/environment.hpp"
|
||||
|
@ -80,6 +82,7 @@ OMW::Engine::~Engine()
|
|||
mspCommandServer->stop();
|
||||
|
||||
delete mEnvironment.mWorld;
|
||||
delete mEnvironment.mGuiManager;
|
||||
delete mEnvironment.mSoundManager;
|
||||
delete mEnvironment.mGlobalScripts;
|
||||
delete mScriptManager;
|
||||
|
@ -192,6 +195,8 @@ void OMW::Engine::go()
|
|||
// Create the world
|
||||
mEnvironment.mWorld = new MWWorld::World (mOgre, mDataDir, mMaster, mCellName, mNewGame);
|
||||
|
||||
mEnvironment.mGuiManager = new MWGui::GuiManager;
|
||||
|
||||
mEnvironment.mSoundManager = new MWSound::SoundManager;
|
||||
|
||||
MWScript::registerExtensions (mExtensions);
|
||||
|
|
67
apps/openmw/mwgui/guimanager.cpp
Normal file
67
apps/openmw/mwgui/guimanager.cpp
Normal file
|
@ -0,0 +1,67 @@
|
|||
|
||||
#include "guimanager.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
void GuiManager::showBirthDialogue()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::showClassDialogue()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::showNameDialogue()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::showRaceDialogue()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::showReviewDialogue()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::enableInventoryWindow()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::enableMagicWindow()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::enableMapWindow()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::enableStatsMenu()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::enableLevelUpDialogue()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
void GuiManager::showRestDialogue()
|
||||
{
|
||||
std::cout << "" << std::endl;
|
||||
}
|
||||
|
||||
bool GuiManager::isGuiActive() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
48
apps/openmw/mwgui/guimanager.hpp
Normal file
48
apps/openmw/mwgui/guimanager.hpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
#ifndef GAME_SOUND_GUIMANAGER_H
|
||||
#define GAME_SOUND_GUIMANAGER_H
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
class GuiManager
|
||||
{
|
||||
public:
|
||||
|
||||
void showBirthDialogue();
|
||||
///< Birthsign (part of the character generation process)
|
||||
|
||||
void showClassDialogue();
|
||||
///< Class selection (part of the character generation process)
|
||||
|
||||
void showNameDialogue();
|
||||
///< Enter character name (part of the character generation process)
|
||||
|
||||
void showRaceDialogue();
|
||||
///< Race selection (part of the character generation process)
|
||||
|
||||
void showReviewDialogue();
|
||||
///< Character generation review (final part of the character generation process)
|
||||
|
||||
void enableInventoryWindow();
|
||||
///< Initially disabled.
|
||||
|
||||
void enableMagicWindow();
|
||||
///< Initially disabled.
|
||||
|
||||
void enableMapWindow();
|
||||
///< Initially disabled.
|
||||
|
||||
void enableStatsMenu();
|
||||
///< Initially disabled.
|
||||
|
||||
void enableLevelUpDialogue();
|
||||
///< Rest/Level-up. Initially disabled.
|
||||
|
||||
void showRestDialogue();
|
||||
///< Rest dialogue: ask player how many hours he wants to sleep.
|
||||
|
||||
bool isGuiActive() const;
|
||||
///< Any non-HUD GUI element active (dialogues and windows)?
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -11,6 +11,11 @@ namespace MWScript
|
|||
class GlobalScripts;
|
||||
}
|
||||
|
||||
namespace MWGui
|
||||
{
|
||||
class GuiManager;
|
||||
}
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class World;
|
||||
|
@ -19,11 +24,14 @@ namespace MWWorld
|
|||
class Environment
|
||||
{
|
||||
public:
|
||||
Environment() : mWorld (0), mSoundManager (0), mGlobalScripts (0), mFrameDuration (0) {}
|
||||
Environment()
|
||||
: mWorld (0), mSoundManager (0), mGlobalScripts (0), mGuiManager (0), mFrameDuration (0)
|
||||
{}
|
||||
|
||||
World *mWorld;
|
||||
MWSound::SoundManager *mSoundManager;
|
||||
MWScript::GlobalScripts *mGlobalScripts;
|
||||
MWGui::GuiManager *mGuiManager;
|
||||
float mFrameDuration;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue