27 #include <RendererModules/Ogre/CEGUIOgreRenderer.h>
28 #include <RendererModules/Ogre/CEGUIOgreResourceProvider.h>
30 #include <OgreStringConverter.h>
31 #include <OgreException.h>
40 typedef void (__stdcall *NodePickedCallback)(
const char* name_);
43 namespace OpenSkyNet {
48 class InputListener :
public OIS::KeyListener,
public OIS::MouseListener {
65 virtual bool keyPressed(
const OIS::KeyEvent& arg);
68 virtual void pickNode(Ogre::SceneNode* node_);
71 virtual bool mouseMoved(
const OIS::MouseEvent& arg);
75 virtual bool mousePressed(
const OIS::MouseEvent& arg, OIS::MouseButtonID
id);
77 virtual bool mouseReleased(
const OIS::MouseEvent& arg, OIS::MouseButtonID
id);
82 class UI :
public OgreApp,
public Ogre::FrameListener,
public Ogre::WindowEventListener,
public OgreBites::SdkTrayListener {
123 virtual bool setup(
bool restoreOgreConfig_);
132 virtual void popScreen(
bool doUnload_=
true);
142 using namespace Ogre;
155 _trayManager->showFrameStats(OgreBites::TL_BOTTOMRIGHT);
183 _mouse->setEventCallback(0);
203 virtual void destroyScene(
bool doDestroyPersistentData_);
208 static bool doesHitAABB(
const Ogre::AxisAlignedBox& AABB_,
const Ogre::Vector3& origin_,
const Ogre::Vector3& direction_);
virtual void popScreen(bool doUnload_=true)
Definition: GUI.cpp:343
void showDebugOverlay(bool show_)
Definition: GUI.h:153
float _rotY
Definition: GUI.h:102
volatile bool _quit
Definition: GUI.h:114
virtual bool setup(bool restoreOgreConfig_)
Definition: GUI.cpp:272
CEGUI::System * _gUISystem
Definition: GUI.h:86
bool _useBufferedInputKeys
Definition: GUI.h:89
Ogre::Real _rotateSpeed
Definition: GUI.h:90
Ogre::Camera * _camera
Definition: GOgreApp.h:37
bool _statsOn
Definition: GUI.h:92
void setCanRotateCam(bool val_)
Definition: GUI.h:137
virtual void switchKeyMode()
Definition: GUI.h:191
Ogre::Real _timeUntilNextToggle
Definition: GUI.h:96
virtual bool frameEnded(const Ogre::FrameEvent &evt)
Definition: GUI.h:169
virtual void moveCamera()
Definition: GUI.h:141
static CEGUI::MouseButton convertOISMouseButtonToCegui(OIS::MouseButtonID buttonID_)
Definition: GUI.cpp:20
static bool doesHitAABB(const Ogre::AxisAlignedBox &AABB_, const Ogre::Vector3 &origin_, const Ogre::Vector3 &direction_)
Definition: GUI.cpp:30
virtual void destroyScene(bool doDestroyPersistentData_)
Definition: GUI.cpp:373
void setCanTranslateCam(bool val_)
Definition: GUI.h:136
void __attribute__((stdcall)) nodePickedCallback(const char *name_)
Definition: ViewerDLL.cpp:55
std::stack< UIScreen * > _screens
Definition: GUI.h:87
void setTopNodeForMousePicking(Ogre::SceneNode *n_=0)
Definition: GUI.h:124
virtual void pushScreen(UIScreen *screen_)
Definition: GUI.cpp:336
virtual bool frameStarted(const Ogre::FrameEvent &evt)
Definition: GUI.cpp:445
Ogre::Real _moveSpeed
Definition: GUI.h:90
Utils::uint _numScreenShots
Definition: GUI.h:93
virtual void setupEventHandlers()
Definition: GUI.h:125
bool _canRotateCam
Definition: GUI.h:103
float _rotX
Definition: GUI.h:102
void quit()
Definition: GUI.h:205
typedef void(__attribute__((stdcall))*NodePickedCallback)(const char *name_)
OgreBites::SdkTrayManager * _trayManager
Definition: GUI.h:112
UI(InputListener *inputListener_=0)
Definition: GUI.cpp:360
virtual void windowResized(Ogre::RenderWindow *rw)
Definition: GUI.cpp:419
CEGUI::OgreRenderer * _gUIRenderer
Definition: GUI.h:85
unsigned int uint
Definition: UTypes.h:39
Ogre::Vector3 _trans
Definition: GUI.h:115
virtual void switchMouseMode()
Definition: GUI.h:177
InputListener * _inputListener
Definition: GUI.h:109
Ogre::DisplayString _debugText
Definition: GUI.h:117
InputListener * getInputListener()
Definition: GUI.h:199
virtual bool processUnbufferedMouseInput(const Ogre::FrameEvent &evt)
Definition: GUI.cpp:407
float _rotScale
Definition: GUI.h:91
bool _useBufferedInputMouse
Definition: GUI.h:89
UIScreen * getTopScreen() const
Definition: GUI.h:130
OIS::Keyboard * _keyboard
Definition: GUI.h:108
virtual bool processUnbufferedKeyInput(const Ogre::FrameEvent &evt)
Definition: GUI.cpp:402
void popAndUnloadScreenNextUpdate()
Definition: GUI.h:133
Definition: GUIScreen.h:63
Ogre::TextureFilterOptions _filtering
Definition: GUI.h:101
Definition: GOgreApp.h:34
float _moveScale
Definition: GUI.h:91
virtual void windowClosed(Ogre::RenderWindow *rw)
Definition: GUI.cpp:430
bool _canTranslateCam
Definition: GUI.h:103
int _sceneDetailIndex
Definition: GUI.h:98
virtual ~UI()
Definition: GUI.cpp:381
int _aniso
Definition: GUI.h:100
Ogre::Vector3 _translateVector
Definition: GUI.h:99
OIS::InputManager * _inputManager
Definition: GUI.h:106
OIS::Mouse * _mouse
Definition: GUI.h:107