forked from teamnwah/openmw-tes3coop
Added stand-alone GUI test, compiles and runs
parent
4f170b14ea
commit
3896fd218a
@ -0,0 +1,11 @@
|
|||||||
|
add_executable(mygui_test
|
||||||
|
main.cpp
|
||||||
|
${OGRE}
|
||||||
|
${OGRE_HEADER}
|
||||||
|
)
|
||||||
|
target_link_libraries(mygui_test
|
||||||
|
${OGRE_LIBRARIES}
|
||||||
|
${OIS_LIBRARIES}
|
||||||
|
MyGUIEngine
|
||||||
|
MyGUI.OgrePlatform
|
||||||
|
)
|
@ -0,0 +1,35 @@
|
|||||||
|
#include <iostream>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
#include <MyGUI.h>
|
||||||
|
#include <MyGUI_OgrePlatform.h>
|
||||||
|
using namespace MyGUI;
|
||||||
|
|
||||||
|
#include <components/engine/ogre/renderer.hpp>
|
||||||
|
#include <OgreResourceGroupManager.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Render::OgreRenderer ogre;
|
||||||
|
ogre.configure(false, "plugins.cfg", false);
|
||||||
|
ogre.createWindow("MyGUI test");
|
||||||
|
ogre.createScene();
|
||||||
|
|
||||||
|
// Disable MyGUI logging
|
||||||
|
LogManager::initialise();
|
||||||
|
LogManager::setSTDOutputEnabled(false);
|
||||||
|
|
||||||
|
// Set up OGRE connection to MyGUI
|
||||||
|
OgrePlatform *platform = new OgrePlatform();
|
||||||
|
platform->initialise(ogre.getWindow(), ogre.getScene());
|
||||||
|
|
||||||
|
// Create GUI
|
||||||
|
Gui *gui = new Gui();
|
||||||
|
gui->initialise();
|
||||||
|
|
||||||
|
// Add the Morrowind windows resources
|
||||||
|
Ogre::ResourceGroupManager::getSingleton().
|
||||||
|
addResourceLocation("resources/mygui/", "FileSystem", "General");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,12 +0,0 @@
|
|||||||
#include <MyGUI.h>
|
|
||||||
|
|
||||||
// The global GUI object
|
|
||||||
MyGUI::Gui *mGUI;
|
|
||||||
|
|
||||||
// This is used to determine if we are displaying any gui elements
|
|
||||||
// right now. If we are (and guiMode > 0), we redirect mouse/keyboard
|
|
||||||
// input into MyGUI.
|
|
||||||
int32_t guiMode = 0;
|
|
||||||
|
|
||||||
#include "../gui/cpp_mygui.cpp"
|
|
||||||
#include "../terrain/cpp_terrain.cpp"
|
|
Loading…
Reference in New Issue