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
|
||||
textinput widgets race class birth review windowmanagerimp console dialogue
|
||||
layout textinput widgets race class birth review windowmanagerimp console dialogue
|
||||
windowbase statswindow messagebox journalwindow charactercreation
|
||||
mapwindow windowpinnablebase tooltips scrollwindow bookwindow
|
||||
formatting inventorywindow container hud countdialog tradewindow settingswindow
|
||||
|
|
|
@ -26,14 +26,6 @@ namespace MyGUI
|
|||
class UString;
|
||||
}
|
||||
|
||||
namespace OEngine
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
class Layout;
|
||||
}
|
||||
}
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
struct Class;
|
||||
|
@ -58,6 +50,8 @@ namespace MWWorld
|
|||
|
||||
namespace MWGui
|
||||
{
|
||||
class Layout;
|
||||
|
||||
class Console;
|
||||
class SpellWindow;
|
||||
class TradeWindow;
|
||||
|
@ -241,7 +235,7 @@ namespace MWBase
|
|||
virtual void addVisitedLocation(const std::string& name, int x, int y) = 0;
|
||||
|
||||
/// 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
|
||||
/** No guarentee of actually closing the window **/
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace MWGui
|
|||
class SpellIcons;
|
||||
class ItemWidget;
|
||||
|
||||
class HUD : public OEngine::GUI::Layout, public LocalMapBase
|
||||
class HUD : public Layout, public LocalMapBase
|
||||
{
|
||||
public:
|
||||
HUD(CustomMarkerCollection& customMarkers, int fpsLevel, DragAndDrop* dragAndDrop);
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
#include <MyGUI_TextBox.h>
|
||||
#include <MyGUI_Window.h>
|
||||
|
||||
namespace OEngine
|
||||
{
|
||||
namespace GUI
|
||||
namespace MWGui
|
||||
{
|
||||
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
|
||||
#define OENGINE_MYGUI_LAYOUT_H
|
||||
#ifndef OPENMW_MWGUI_LAYOUT_H
|
||||
#define OPENMW_MWGUI_LAYOUT_H
|
||||
|
||||
#include <string>
|
||||
#include <MyGUI_WidgetDefines.h>
|
||||
#include <MyGUI_Widget.h>
|
||||
|
||||
namespace OEngine {
|
||||
namespace GUI
|
||||
namespace MWGui
|
||||
{
|
||||
/** The Layout class is an utility class used to load MyGUI layouts
|
||||
from xml files, and to manipulate member widgets.
|
||||
|
@ -60,5 +59,5 @@ namespace GUI
|
|||
std::string mLayoutName;
|
||||
MyGUI::VectorWidgetPtr mListWindowRoot;
|
||||
};
|
||||
}}
|
||||
}
|
||||
#endif
|
|
@ -30,7 +30,7 @@ namespace MWGui
|
|||
{
|
||||
|
||||
MainMenu::MainMenu(int w, int h)
|
||||
: OEngine::GUI::Layout("openmw_mainmenu.layout")
|
||||
: Layout("openmw_mainmenu.layout")
|
||||
, mButtonBox(0), mWidth (w), mHeight (h)
|
||||
, mSaveGameDialog(NULL)
|
||||
, mBackground(NULL)
|
||||
|
@ -80,7 +80,7 @@ namespace MWGui
|
|||
MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_MainMenu) &&
|
||||
MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame);
|
||||
|
||||
OEngine::GUI::Layout::setVisible (visible);
|
||||
Layout::setVisible (visible);
|
||||
}
|
||||
|
||||
void MainMenu::onNewGameConfirmed()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef OPENMW_GAME_MWGUI_MAINMENU_H
|
||||
#define OPENMW_GAME_MWGUI_MAINMENU_H
|
||||
|
||||
#include <openengine/gui/layout.hpp>
|
||||
#include "layout.hpp"
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace MWGui
|
|||
class SaveGameDialog;
|
||||
class VideoWidget;
|
||||
|
||||
class MainMenu : public OEngine::GUI::Layout
|
||||
class MainMenu : public Layout
|
||||
{
|
||||
int mWidth;
|
||||
int mHeight;
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace MWGui
|
|||
int mLastButtonPressed;
|
||||
};
|
||||
|
||||
class MessageBox : public OEngine::GUI::Layout
|
||||
class MessageBox : public Layout
|
||||
{
|
||||
public:
|
||||
MessageBox (MessageBoxManager& parMessageBoxManager, const std::string& message);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef MWGUI_TOOLTIPS_H
|
||||
#define MWGUI_TOOLTIPS_H
|
||||
|
||||
#include <openengine/gui/layout.hpp>
|
||||
#include "layout.hpp"
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
#include "widgets.hpp"
|
||||
|
@ -45,7 +45,7 @@ namespace MWGui
|
|||
bool wordWrap;
|
||||
};
|
||||
|
||||
class ToolTips : public OEngine::GUI::Layout
|
||||
class ToolTips : public Layout
|
||||
{
|
||||
public:
|
||||
ToolTips();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef MWGUI_WINDOW_BASE_H
|
||||
#define MWGUI_WINDOW_BASE_H
|
||||
|
||||
#include <openengine/gui/layout.hpp>
|
||||
#include "layout.hpp"
|
||||
|
||||
namespace MWBase
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace MWGui
|
|||
class WindowManager;
|
||||
class DragAndDrop;
|
||||
|
||||
class WindowBase: public OEngine::GUI::Layout
|
||||
class WindowBase: public Layout
|
||||
{
|
||||
public:
|
||||
WindowBase(const std::string& parLayout);
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace MWGui
|
|||
// Delete any dialogs which are no longer in use
|
||||
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;
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ namespace MWGui
|
|||
mStatsWindow->updateSkillArea();
|
||||
}
|
||||
|
||||
void WindowManager::removeDialog(OEngine::GUI::Layout*dialog)
|
||||
void WindowManager::removeDialog(Layout*dialog)
|
||||
{
|
||||
if (!dialog)
|
||||
return;
|
||||
|
@ -1566,7 +1566,7 @@ namespace MWGui
|
|||
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::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);
|
||||
|
||||
///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
|
||||
virtual void exitCurrentGuiMode();
|
||||
|
@ -366,7 +366,7 @@ namespace MWGui
|
|||
bool mConsoleOnlyScripts;
|
||||
|
||||
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);
|
||||
|
||||
std::string mSelectedSpell;
|
||||
|
@ -448,7 +448,7 @@ namespace MWGui
|
|||
|
||||
SFO::CursorManager* mCursorManager;
|
||||
|
||||
std::vector<OEngine::GUI::Layout*> mGarbageDialogs;
|
||||
std::vector<Layout*> mGarbageDialogs;
|
||||
void cleanupGarbage();
|
||||
|
||||
GuiWindow mShown; // Currently shown windows in inventory mode
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
set(OENGINE_GUI
|
||||
gui/layout.cpp
|
||||
)
|
||||
|
||||
set(OENGINE_BULLET
|
||||
bullet/BtOgre.cpp
|
||||
bullet/BtOgreExtras.h
|
||||
|
@ -15,7 +11,7 @@ set(OENGINE_BULLET
|
|||
bullet/trace.h
|
||||
)
|
||||
|
||||
set(OENGINE_ALL ${OENGINE_GUI} ${OENGINE_BULLET})
|
||||
set(OENGINE_ALL ${OENGINE_BULLET})
|
||||
|
||||
set(OENGINE_LIBRARY "oengine")
|
||||
set(OENGINE_LIBRARY ${OENGINE_LIBRARY} PARENT_SCOPE)
|
||||
|
|
Loading…
Reference in a new issue