forked from mirror/openmw-tes3mp
Move OEngine::Gui::Layout to MWGui
This commit is contained in:
parent
9f74be8fcb
commit
223e3a53f5
13 changed files with 26 additions and 40 deletions
|
@ -33,7 +33,7 @@ add_openmw_dir (mwrender
|
||||||
# )
|
# )
|
||||||
|
|
||||||
add_openmw_dir (mwgui
|
add_openmw_dir (mwgui
|
||||||
textinput widgets race class birth review windowmanagerimp console dialogue
|
layout textinput widgets race class birth review windowmanagerimp console dialogue
|
||||||
windowbase statswindow messagebox journalwindow charactercreation
|
windowbase statswindow messagebox journalwindow charactercreation
|
||||||
mapwindow windowpinnablebase tooltips scrollwindow bookwindow
|
mapwindow windowpinnablebase tooltips scrollwindow bookwindow
|
||||||
formatting inventorywindow container hud countdialog tradewindow settingswindow
|
formatting inventorywindow container hud countdialog tradewindow settingswindow
|
||||||
|
|
|
@ -26,14 +26,6 @@ namespace MyGUI
|
||||||
class UString;
|
class UString;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace OEngine
|
|
||||||
{
|
|
||||||
namespace GUI
|
|
||||||
{
|
|
||||||
class Layout;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
struct Class;
|
struct Class;
|
||||||
|
@ -58,6 +50,8 @@ namespace MWWorld
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
class Layout;
|
||||||
|
|
||||||
class Console;
|
class Console;
|
||||||
class SpellWindow;
|
class SpellWindow;
|
||||||
class TradeWindow;
|
class TradeWindow;
|
||||||
|
@ -241,7 +235,7 @@ namespace MWBase
|
||||||
virtual void addVisitedLocation(const std::string& name, int x, int y) = 0;
|
virtual void addVisitedLocation(const std::string& name, int x, int y) = 0;
|
||||||
|
|
||||||
/// Hides dialog and schedules dialog to be deleted.
|
/// Hides dialog and schedules dialog to be deleted.
|
||||||
virtual void removeDialog(OEngine::GUI::Layout* dialog) = 0;
|
virtual void removeDialog(MWGui::Layout* dialog) = 0;
|
||||||
|
|
||||||
///Gracefully attempts to exit the topmost GUI mode
|
///Gracefully attempts to exit the topmost GUI mode
|
||||||
/** No guarentee of actually closing the window **/
|
/** No guarentee of actually closing the window **/
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace MWGui
|
||||||
class SpellIcons;
|
class SpellIcons;
|
||||||
class ItemWidget;
|
class ItemWidget;
|
||||||
|
|
||||||
class HUD : public OEngine::GUI::Layout, public LocalMapBase
|
class HUD : public Layout, public LocalMapBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HUD(CustomMarkerCollection& customMarkers, int fpsLevel, DragAndDrop* dragAndDrop);
|
HUD(CustomMarkerCollection& customMarkers, int fpsLevel, DragAndDrop* dragAndDrop);
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
#include <MyGUI_TextBox.h>
|
#include <MyGUI_TextBox.h>
|
||||||
#include <MyGUI_Window.h>
|
#include <MyGUI_Window.h>
|
||||||
|
|
||||||
namespace OEngine
|
namespace MWGui
|
||||||
{
|
|
||||||
namespace GUI
|
|
||||||
{
|
{
|
||||||
void Layout::initialise(const std::string& _layout, MyGUI::Widget* _parent)
|
void Layout::initialise(const std::string& _layout, MyGUI::Widget* _parent)
|
||||||
{
|
{
|
||||||
|
@ -78,4 +76,3 @@ namespace GUI
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,12 +1,11 @@
|
||||||
#ifndef OENGINE_MYGUI_LAYOUT_H
|
#ifndef OPENMW_MWGUI_LAYOUT_H
|
||||||
#define OENGINE_MYGUI_LAYOUT_H
|
#define OPENMW_MWGUI_LAYOUT_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <MyGUI_WidgetDefines.h>
|
#include <MyGUI_WidgetDefines.h>
|
||||||
#include <MyGUI_Widget.h>
|
#include <MyGUI_Widget.h>
|
||||||
|
|
||||||
namespace OEngine {
|
namespace MWGui
|
||||||
namespace GUI
|
|
||||||
{
|
{
|
||||||
/** The Layout class is an utility class used to load MyGUI layouts
|
/** The Layout class is an utility class used to load MyGUI layouts
|
||||||
from xml files, and to manipulate member widgets.
|
from xml files, and to manipulate member widgets.
|
||||||
|
@ -60,5 +59,5 @@ namespace GUI
|
||||||
std::string mLayoutName;
|
std::string mLayoutName;
|
||||||
MyGUI::VectorWidgetPtr mListWindowRoot;
|
MyGUI::VectorWidgetPtr mListWindowRoot;
|
||||||
};
|
};
|
||||||
}}
|
}
|
||||||
#endif
|
#endif
|
|
@ -30,7 +30,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
MainMenu::MainMenu(int w, int h)
|
MainMenu::MainMenu(int w, int h)
|
||||||
: OEngine::GUI::Layout("openmw_mainmenu.layout")
|
: Layout("openmw_mainmenu.layout")
|
||||||
, mButtonBox(0), mWidth (w), mHeight (h)
|
, mButtonBox(0), mWidth (w), mHeight (h)
|
||||||
, mSaveGameDialog(NULL)
|
, mSaveGameDialog(NULL)
|
||||||
, mBackground(NULL)
|
, mBackground(NULL)
|
||||||
|
@ -80,7 +80,7 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_MainMenu) &&
|
MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_MainMenu) &&
|
||||||
MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame);
|
MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame);
|
||||||
|
|
||||||
OEngine::GUI::Layout::setVisible (visible);
|
Layout::setVisible (visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainMenu::onNewGameConfirmed()
|
void MainMenu::onNewGameConfirmed()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef OPENMW_GAME_MWGUI_MAINMENU_H
|
#ifndef OPENMW_GAME_MWGUI_MAINMENU_H
|
||||||
#define OPENMW_GAME_MWGUI_MAINMENU_H
|
#define OPENMW_GAME_MWGUI_MAINMENU_H
|
||||||
|
|
||||||
#include <openengine/gui/layout.hpp>
|
#include "layout.hpp"
|
||||||
|
|
||||||
namespace Gui
|
namespace Gui
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ namespace MWGui
|
||||||
class SaveGameDialog;
|
class SaveGameDialog;
|
||||||
class VideoWidget;
|
class VideoWidget;
|
||||||
|
|
||||||
class MainMenu : public OEngine::GUI::Layout
|
class MainMenu : public Layout
|
||||||
{
|
{
|
||||||
int mWidth;
|
int mWidth;
|
||||||
int mHeight;
|
int mHeight;
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace MWGui
|
||||||
int mLastButtonPressed;
|
int mLastButtonPressed;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MessageBox : public OEngine::GUI::Layout
|
class MessageBox : public Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MessageBox (MessageBoxManager& parMessageBoxManager, const std::string& message);
|
MessageBox (MessageBoxManager& parMessageBoxManager, const std::string& message);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#ifndef MWGUI_TOOLTIPS_H
|
#ifndef MWGUI_TOOLTIPS_H
|
||||||
#define MWGUI_TOOLTIPS_H
|
#define MWGUI_TOOLTIPS_H
|
||||||
|
|
||||||
#include <openengine/gui/layout.hpp>
|
#include "layout.hpp"
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
|
@ -45,7 +45,7 @@ namespace MWGui
|
||||||
bool wordWrap;
|
bool wordWrap;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ToolTips : public OEngine::GUI::Layout
|
class ToolTips : public Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ToolTips();
|
ToolTips();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef MWGUI_WINDOW_BASE_H
|
#ifndef MWGUI_WINDOW_BASE_H
|
||||||
#define MWGUI_WINDOW_BASE_H
|
#define MWGUI_WINDOW_BASE_H
|
||||||
|
|
||||||
#include <openengine/gui/layout.hpp>
|
#include "layout.hpp"
|
||||||
|
|
||||||
namespace MWBase
|
namespace MWBase
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ namespace MWGui
|
||||||
class WindowManager;
|
class WindowManager;
|
||||||
class DragAndDrop;
|
class DragAndDrop;
|
||||||
|
|
||||||
class WindowBase: public OEngine::GUI::Layout
|
class WindowBase: public Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WindowBase(const std::string& parLayout);
|
WindowBase(const std::string& parLayout);
|
||||||
|
|
|
@ -422,7 +422,7 @@ namespace MWGui
|
||||||
// Delete any dialogs which are no longer in use
|
// Delete any dialogs which are no longer in use
|
||||||
if (!mGarbageDialogs.empty())
|
if (!mGarbageDialogs.empty())
|
||||||
{
|
{
|
||||||
for (std::vector<OEngine::GUI::Layout*>::iterator it = mGarbageDialogs.begin(); it != mGarbageDialogs.end(); ++it)
|
for (std::vector<Layout*>::iterator it = mGarbageDialogs.begin(); it != mGarbageDialogs.end(); ++it)
|
||||||
{
|
{
|
||||||
delete *it;
|
delete *it;
|
||||||
}
|
}
|
||||||
|
@ -722,7 +722,7 @@ namespace MWGui
|
||||||
mStatsWindow->updateSkillArea();
|
mStatsWindow->updateSkillArea();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::removeDialog(OEngine::GUI::Layout*dialog)
|
void WindowManager::removeDialog(Layout*dialog)
|
||||||
{
|
{
|
||||||
if (!dialog)
|
if (!dialog)
|
||||||
return;
|
return;
|
||||||
|
@ -1566,7 +1566,7 @@ namespace MWGui
|
||||||
return mCursorVisible;
|
return mCursorVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::trackWindow(OEngine::GUI::Layout *layout, const std::string &name)
|
void WindowManager::trackWindow(Layout *layout, const std::string &name)
|
||||||
{
|
{
|
||||||
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
||||||
MyGUI::IntPoint pos(static_cast<int>(Settings::Manager::getFloat(name + " x", "Windows") * viewSize.width),
|
MyGUI::IntPoint pos(static_cast<int>(Settings::Manager::getFloat(name + " x", "Windows") * viewSize.width),
|
||||||
|
|
|
@ -242,7 +242,7 @@ namespace MWGui
|
||||||
virtual void addVisitedLocation(const std::string& name, int x, int y);
|
virtual void addVisitedLocation(const std::string& name, int x, int y);
|
||||||
|
|
||||||
///Hides dialog and schedules dialog to be deleted.
|
///Hides dialog and schedules dialog to be deleted.
|
||||||
virtual void removeDialog(OEngine::GUI::Layout* dialog);
|
virtual void removeDialog(Layout* dialog);
|
||||||
|
|
||||||
///Gracefully attempts to exit the topmost GUI mode
|
///Gracefully attempts to exit the topmost GUI mode
|
||||||
virtual void exitCurrentGuiMode();
|
virtual void exitCurrentGuiMode();
|
||||||
|
@ -366,7 +366,7 @@ namespace MWGui
|
||||||
bool mConsoleOnlyScripts;
|
bool mConsoleOnlyScripts;
|
||||||
|
|
||||||
std::map<MyGUI::Window*, std::string> mTrackedWindows;
|
std::map<MyGUI::Window*, std::string> mTrackedWindows;
|
||||||
void trackWindow(OEngine::GUI::Layout* layout, const std::string& name);
|
void trackWindow(Layout* layout, const std::string& name);
|
||||||
void onWindowChangeCoord(MyGUI::Window* _sender);
|
void onWindowChangeCoord(MyGUI::Window* _sender);
|
||||||
|
|
||||||
std::string mSelectedSpell;
|
std::string mSelectedSpell;
|
||||||
|
@ -448,7 +448,7 @@ namespace MWGui
|
||||||
|
|
||||||
SFO::CursorManager* mCursorManager;
|
SFO::CursorManager* mCursorManager;
|
||||||
|
|
||||||
std::vector<OEngine::GUI::Layout*> mGarbageDialogs;
|
std::vector<Layout*> mGarbageDialogs;
|
||||||
void cleanupGarbage();
|
void cleanupGarbage();
|
||||||
|
|
||||||
GuiWindow mShown; // Currently shown windows in inventory mode
|
GuiWindow mShown; // Currently shown windows in inventory mode
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
set(OENGINE_GUI
|
|
||||||
gui/layout.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(OENGINE_BULLET
|
set(OENGINE_BULLET
|
||||||
bullet/BtOgre.cpp
|
bullet/BtOgre.cpp
|
||||||
bullet/BtOgreExtras.h
|
bullet/BtOgreExtras.h
|
||||||
|
@ -15,7 +11,7 @@ set(OENGINE_BULLET
|
||||||
bullet/trace.h
|
bullet/trace.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OENGINE_ALL ${OENGINE_GUI} ${OENGINE_BULLET})
|
set(OENGINE_ALL ${OENGINE_BULLET})
|
||||||
|
|
||||||
set(OENGINE_LIBRARY "oengine")
|
set(OENGINE_LIBRARY "oengine")
|
||||||
set(OENGINE_LIBRARY ${OENGINE_LIBRARY} PARENT_SCOPE)
|
set(OENGINE_LIBRARY ${OENGINE_LIBRARY} PARENT_SCOPE)
|
||||||
|
|
Loading…
Reference in a new issue