From 5472a8c7609a608ad5d71fe450854a2d5fea9142 Mon Sep 17 00:00:00 2001 From: Nicolay Korslund Date: Sat, 17 Jul 2010 19:37:37 +0200 Subject: [PATCH] Killed mygui_dev --- CMakeLists.txt | 5 --- apps/mygui_dev/.gitignore | 2 - apps/mygui_dev/CMakeLists.txt | 14 ------ apps/mygui_dev/main.cpp | 85 ----------------------------------- 4 files changed, 106 deletions(-) delete mode 100644 apps/mygui_dev/.gitignore delete mode 100644 apps/mygui_dev/CMakeLists.txt delete mode 100644 apps/mygui_dev/main.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 2af57c7eae..9b8740c154 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,11 +206,6 @@ if (BUILD_CLIENTCONSOLE) add_subdirectory( apps/clientconsole ) endif() -option(BUILD_MYGUI_TEST "build test program for MyGUI" ON) -if (BUILD_MYGUI_TEST) - add_subdirectory( apps/mygui_dev ) -endif() - option(BUILD_MWCOMPILER "build standalone Morrowind script compiler" ON) if (BUILD_MWCOMPILER) add_subdirectory( apps/mwcompiler ) diff --git a/apps/mygui_dev/.gitignore b/apps/mygui_dev/.gitignore deleted file mode 100644 index e36a9e0261..0000000000 --- a/apps/mygui_dev/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -old -run.sh diff --git a/apps/mygui_dev/CMakeLists.txt b/apps/mygui_dev/CMakeLists.txt deleted file mode 100644 index 9265279e51..0000000000 --- a/apps/mygui_dev/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -add_executable(mygui_test - main.cpp - ${BSA} ${BSA_HEADER} - ${MWGUI} ${MWGUI_HEADER} - ${OENGINE_OGRE} - ${OENGINE_GUI} - ${MANGLE_INPUT} -) -target_link_libraries(mygui_test - ${OGRE_LIBRARIES} - ${OIS_LIBRARIES} - MyGUIEngine - MyGUI.OgrePlatform -) diff --git a/apps/mygui_dev/main.cpp b/apps/mygui_dev/main.cpp deleted file mode 100644 index 2e589ddd68..0000000000 --- a/apps/mygui_dev/main.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include -using namespace std; - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -#include - -// Frame listener -struct Listener : public Ogre::FrameListener -{ - bool exit; - - Mangle::Input::Driver *input; - - Listener() : exit(false) {} - - bool frameStarted(const Ogre::FrameEvent &evt) - { - if(input) - input->capture(); - - if(input->isDown(OIS::KC_ESCAPE)) - exit = true; - - return !exit; - } -}; - -int main() -{ - OEngine::Render::OgreRenderer ogre; - ogre.configure(false, "plugins.cfg", false); - ogre.createWindow("MyGUI test"); - ogre.createScene(); - - Listener listener; - ogre.getRoot()->addFrameListener(&listener); - - cout << "Adding data path and BSA\n"; - // Add the Morrowind window resources - Ogre::ResourceGroupManager::getSingleton(). - addResourceLocation("resources/mygui/", "FileSystem", "General"); - - // And add the BSA, since most of the window bitmaps are located - // there - addBSA("data/Morrowind.bsa"); - - cout << "Setting up input with OIS\n"; - Mangle::Input::OISDriver input(ogre.getWindow()); - listener.input = &input; - - // Make sure you load the data paths BEFORE you initialize the - // GUI. MyGUI depends on finding core.xml in resources/mygui/. - cout << "Setting up MyGUI\n"; - OEngine::GUI::MyGUIManager gui(ogre.getWindow(), ogre.getScene()); - - cout << "Connecting to input\n"; - OEngine::GUI::EventInjector *evt = new OEngine::GUI::EventInjector(gui.getGui()); - input.setEvent(Mangle::Input::EventPtr(evt)); - - cout << "Setting up the window manager\n"; - MWGui::WindowManager gm(gui.getGui()); - - gm.setMode(MWGui::GM_Inventory); - - cout << "Starting rendering loop\n"; - cout << "PRESS ESCAPE TO EXIT\n"; - ogre.start(); - ogre.screenshot("mygui_test.png"); - - cout << "Done.\n"; - return 0; -}