forked from mirror/openmw-tes3mp
Moved mwgui manager to components, ready for testing
This commit is contained in:
parent
4eb2863db4
commit
4d74f85ae0
9 changed files with 30 additions and 21 deletions
|
@ -52,8 +52,11 @@ source_group(components\\esm FILES ${ESM_HEADER})
|
||||||
|
|
||||||
# components/mw_gui
|
# components/mw_gui
|
||||||
set(MWGUI_HEADER
|
set(MWGUI_HEADER
|
||||||
${COMP_DIR}/mw_gui/mw_layouts.hpp)
|
${COMP_DIR}/mwgui/mw_layouts.hpp
|
||||||
source_group(components\\mw_gui FILES ${MWGUI_HEADER})
|
${COMP_DIR}/mwgui/guimanager.hpp)
|
||||||
|
set(MWGUI
|
||||||
|
${COMP_DIR}/mwgui/guimanager.cpp)
|
||||||
|
source_group(components\\mwgui FILES ${MWGUI_HEADER} ${MWGUI})
|
||||||
|
|
||||||
set(COMMANDSERVER
|
set(COMMANDSERVER
|
||||||
${COMP_DIR}/commandserver/command.hpp
|
${COMP_DIR}/commandserver/command.hpp
|
||||||
|
@ -80,9 +83,7 @@ file(GLOB INTERPRETER_HEADER ${COMP_DIR}/interpreter/*.hpp)
|
||||||
source_group(components\\interpreter FILES ${INTERPRETER} ${INTERPRETER_HEADER})
|
source_group(components\\interpreter FILES ${INTERPRETER} ${INTERPRETER_HEADER})
|
||||||
|
|
||||||
set(COMPONENTS ${BSA} ${NIF} ${NIFOGRE} ${ESM_STORE} ${MISC}
|
set(COMPONENTS ${BSA} ${NIF} ${NIFOGRE} ${ESM_STORE} ${MISC}
|
||||||
${COMMANDSERVER}
|
${COMMANDSERVER} ${COMPILER} ${INTERPRETER} ${MWGUI})
|
||||||
${COMPILER}
|
|
||||||
${INTERPRETER})
|
|
||||||
set(COMPONENTS_HEADER ${BSA_HEADER} ${NIF_HEADER} ${NIFOGRE_HEADER} ${ESM_STORE_HEADER}
|
set(COMPONENTS_HEADER ${BSA_HEADER} ${NIF_HEADER} ${NIFOGRE_HEADER} ${ESM_STORE_HEADER}
|
||||||
${ESM_HEADER} ${MISC_HEADER} ${COMPILER_HEADER}
|
${ESM_HEADER} ${MISC_HEADER} ${COMPILER_HEADER}
|
||||||
${INTERPRETER_HEADER} ${MWGUI_HEADER})
|
${INTERPRETER_HEADER} ${MWGUI_HEADER})
|
||||||
|
|
|
@ -7,7 +7,7 @@ using namespace std;
|
||||||
|
|
||||||
#include <mangle/input/servers/ois_driver.hpp>
|
#include <mangle/input/servers/ois_driver.hpp>
|
||||||
|
|
||||||
#include <components/mw_gui/mw_layouts.hpp>
|
#include <components/mwgui/mw_layouts.hpp>
|
||||||
#include <components/bsa/bsa_archive.hpp>
|
#include <components/bsa/bsa_archive.hpp>
|
||||||
|
|
||||||
#include <OgreResourceGroupManager.h>
|
#include <OgreResourceGroupManager.h>
|
||||||
|
@ -74,10 +74,10 @@ int main()
|
||||||
input.setEvent(Mangle::Input::EventPtr(evt));
|
input.setEvent(Mangle::Input::EventPtr(evt));
|
||||||
|
|
||||||
cout << "Setting up the window layouts\n";
|
cout << "Setting up the window layouts\n";
|
||||||
MWGUI::HUD hud(w,h);
|
MWGui::HUD hud(w,h);
|
||||||
MWGUI::MapWindow map;
|
MWGui::MapWindow map;
|
||||||
MWGUI::MainMenu menu(w,h);
|
MWGui::MainMenu menu(w,h);
|
||||||
MWGUI::StatsWindow stats;
|
MWGui::StatsWindow stats;
|
||||||
|
|
||||||
hud.setVisible(true);
|
hud.setVisible(true);
|
||||||
map.setVisible(true);
|
map.setVisible(true);
|
||||||
|
|
|
@ -59,12 +59,6 @@ set(GAMESOUND_HEADER
|
||||||
mwsound/soundmanager.hpp)
|
mwsound/soundmanager.hpp)
|
||||||
source_group(apps\\openmw\\mwsound FILES ${GAMESOUND} ${GAMESOUND_HEADER})
|
source_group(apps\\openmw\\mwsound FILES ${GAMESOUND} ${GAMESOUND_HEADER})
|
||||||
|
|
||||||
set(GAMEGUI
|
|
||||||
mwgui/guimanager.cpp)
|
|
||||||
set(GAMEGUI_HEADER
|
|
||||||
mwgui/guimanager.hpp)
|
|
||||||
source_group(apps\\openmw\\mwgui FILES ${GAMEGUI} ${GAMEGUI_HEADER})
|
|
||||||
|
|
||||||
set(GAMEWORLD
|
set(GAMEWORLD
|
||||||
mwworld/world.cpp)
|
mwworld/world.cpp)
|
||||||
set(GAMEWORLD_HEADER
|
set(GAMEWORLD_HEADER
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include <components/misc/fileops.hpp>
|
#include <components/misc/fileops.hpp>
|
||||||
#include <components/bsa/bsa_archive.hpp>
|
#include <components/bsa/bsa_archive.hpp>
|
||||||
|
|
||||||
|
#include <components/mwgui/guimanager.hpp>
|
||||||
|
|
||||||
#include "mwinput/inputmanager.hpp"
|
#include "mwinput/inputmanager.hpp"
|
||||||
|
|
||||||
#include "mwscript/scriptmanager.hpp"
|
#include "mwscript/scriptmanager.hpp"
|
||||||
|
@ -17,8 +19,6 @@
|
||||||
|
|
||||||
#include "mwsound/soundmanager.hpp"
|
#include "mwsound/soundmanager.hpp"
|
||||||
|
|
||||||
#include "mwgui/guimanager.hpp"
|
|
||||||
|
|
||||||
#include "mwworld/world.hpp"
|
#include "mwworld/world.hpp"
|
||||||
#include "mwworld/ptr.hpp"
|
#include "mwworld/ptr.hpp"
|
||||||
#include "mwworld/environment.hpp"
|
#include "mwworld/environment.hpp"
|
||||||
|
|
|
@ -7,9 +7,10 @@
|
||||||
#include <components/interpreter/runtime.hpp>
|
#include <components/interpreter/runtime.hpp>
|
||||||
#include <components/interpreter/opcodes.hpp>
|
#include <components/interpreter/opcodes.hpp>
|
||||||
|
|
||||||
|
#include <components/mwgui/guimanager.hpp>
|
||||||
|
|
||||||
#include "interpretercontext.hpp"
|
#include "interpretercontext.hpp"
|
||||||
|
|
||||||
#include "../mwgui/guimanager.hpp"
|
|
||||||
|
|
||||||
namespace MWScript
|
namespace MWScript
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "../mwworld/world.hpp"
|
#include "../mwworld/world.hpp"
|
||||||
|
|
||||||
#include "../mwgui/guimanager.hpp"
|
#include <components/mwgui/guimanager.hpp>
|
||||||
|
|
||||||
#include "locals.hpp"
|
#include "locals.hpp"
|
||||||
#include "globalscripts.hpp"
|
#include "globalscripts.hpp"
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "mw_layouts.hpp"
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
void GuiManager::enableWindow (GuiWindow window)
|
void GuiManager::enableWindow (GuiWindow window)
|
|
@ -3,8 +3,19 @@
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
// Predeclarations, these are defined in mw_layouts.hpp
|
||||||
|
class HUD;
|
||||||
|
class MapWindow;
|
||||||
|
class MainMenu;
|
||||||
|
class StatsWindow;
|
||||||
|
|
||||||
class GuiManager
|
class GuiManager
|
||||||
{
|
{
|
||||||
|
HUD *hud;
|
||||||
|
MapWindow *map;
|
||||||
|
MainMenu *menu;
|
||||||
|
StatsWindow *stats;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum GuiWindow
|
enum GuiWindow
|
|
@ -16,7 +16,7 @@
|
||||||
setVisible().
|
setVisible().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace MWGUI
|
namespace MWGui
|
||||||
{
|
{
|
||||||
class HUD : public OEngine::GUI::Layout
|
class HUD : public OEngine::GUI::Layout
|
||||||
{
|
{
|
Loading…
Reference in a new issue