#include <uiMgr.h>
Public Member Functions | |
void | CreateGhostUnderMouse (std::string meshName) |
void | DestroyGhostUnderMouse (Ogre::SceneNode *node) |
void | createInputSystem () |
void | windowResized (Ogre::RenderWindow *win) |
void | windowClosed (Ogre::RenderWindow *win) |
virtual bool | frameRenderingQueued (const Ogre::FrameEvent &evt) |
virtual bool | frameStarted (const Ogre::FrameEvent &evt) |
virtual bool | frameEnded (const Ogre::FrameEvent &evt) |
void | DebugDrawTest () |
virtual bool | keyPressed (const OIS::KeyEvent &arg) |
virtual bool | keyReleased (const OIS::KeyEvent &arg) |
virtual bool | mouseMoved (const OIS::MouseEvent &arg) |
virtual bool | mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
virtual bool | mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
virtual void | ChangeGhostTextureRBGA (Ogre::SceneNode *ghost, Ogre::ColourValue color) |
virtual Ogre::ColourValue | GetGhostTextureRBGA (Ogre::SceneNode *ghost) |
virtual void | IncreaseGhostAlpha (Ogre::SceneNode *ghost, int percentIncrease) |
bool | registerKeyHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::KeyCode arg, OgreGFX::KeyHandler *handler) |
bool | registerMouseHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::MouseButtonID arg, OgreGFX::MouseHandler *handler) |
bool | callKeyHandlers (const OIS::KeyEvent &arg) |
bool | callMouseHandlers (const OIS::MouseEvent &arg, const OIS::MouseButtonID id) |
UIMgr (GraphicsInteractionManager *gim) | |
~UIMgr () | |
void | kill () |
void | updateFEEngineWithSelections () |
void | clearSelectionsAndUpdateFEEngine () |
void | printCurrentSelections () |
void | handleSingleSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | handleVolumeSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | doVolumeSelection (const Ogre::Vector2 &first, const Ogre::Vector2 &second) |
void | selectEntity (int index) |
void | decorateSelectedEntities () |
void | drawSelectionCircles () |
void | drawUnderMouseCircle () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseEvent &arg) |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseState &arg) |
void | handleCommand (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | CommandMaintainAttack (int index) |
void | CommandGatherOrPFMove (int index) |
void | CommandMove (Ogre::Vector3 pos) |
void | CommandPotentialFieldsMove (Ogre::Vector3 pos) |
FastEcslent::Group * | groupFromSelections () |
virtual void | initialize () |
void | createInputSystem () |
void | windowResized (Ogre::RenderWindow *win) |
void | windowClosed (Ogre::RenderWindow *win) |
virtual bool | frameRenderingQueued (const Ogre::FrameEvent &evt) |
virtual bool | frameStarted (const Ogre::FrameEvent &evt) |
virtual bool | frameEnded (const Ogre::FrameEvent &evt) |
void | DebugDrawTest () |
virtual bool | keyPressed (const OIS::KeyEvent &arg) |
virtual bool | keyReleased (const OIS::KeyEvent &arg) |
virtual bool | mouseMoved (const OIS::MouseEvent &arg) |
virtual bool | mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
virtual bool | mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
bool | registerKeyHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::KeyCode arg, OgreGFX::KeyHandler *handler) |
bool | registerMouseHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::MouseButtonID arg, OgreGFX::MouseHandler *handler) |
bool | callKeyHandlers (const OIS::KeyEvent &arg) |
bool | callMouseHandlers (const OIS::MouseEvent &arg, const OIS::MouseButtonID id) |
UIMgr (GraphicsInteractionManager *gim) | |
~UIMgr () | |
void | kill () |
void | updateFEEngineWithSelections () |
void | clearSelectionsAndUpdateFEEngine () |
void | printCurrentSelections () |
void | handleSingleSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | handleVolumeSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | doVolumeSelection (const Ogre::Vector2 &first, const Ogre::Vector2 &second) |
void | selectEntity (int index) |
void | decorateSelectedEntities () |
void | drawSelectionCircles () |
void | drawUnderMouseCircle () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseEvent &arg) |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseState &arg) |
void | handleCommand (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | CommandMaintainAttack (int index) |
void | CommandGatherOrPFMove (int index) |
void | CommandMove (Ogre::Vector3 pos) |
void | CommandPotentialFieldsMove (Ogre::Vector3 pos) |
FastEcslent::Group * | groupFromSelections () |
virtual void | initialize () |
void | createInputSystem () |
void | windowResized (Ogre::RenderWindow *win) |
void | windowClosed (Ogre::RenderWindow *win) |
virtual bool | frameRenderingQueued (const Ogre::FrameEvent &evt) |
virtual bool | frameStarted (const Ogre::FrameEvent &evt) |
virtual bool | frameEnded (const Ogre::FrameEvent &evt) |
void | DebugDrawTest () |
virtual bool | keyPressed (const OIS::KeyEvent &arg) |
virtual bool | keyReleased (const OIS::KeyEvent &arg) |
virtual bool | mouseMoved (const OIS::MouseEvent &arg) |
virtual bool | mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
virtual bool | mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
bool | registerKeyHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::KeyCode arg, OgreGFX::KeyHandler *handler) |
bool | registerMouseHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::MouseButtonID arg, OgreGFX::MouseHandler *handler) |
bool | callKeyHandlers (const OIS::KeyEvent &arg) |
bool | callMouseHandlers (const OIS::MouseEvent &arg, const OIS::MouseButtonID id) |
UIMgr (GraphicsInteractionManager *gim) | |
~UIMgr () | |
void | kill () |
void | updateFEEngineWithSelections () |
void | clearSelectionsAndUpdateFEEngine () |
void | printCurrentSelections () |
void | handleSingleSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | handleVolumeSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | doVolumeSelection (const Ogre::Vector2 &first, const Ogre::Vector2 &second) |
void | selectEntity (int index) |
void | decorateSelectedEntities () |
void | drawSelectionCircles () |
void | drawUnderMouseCircle () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseEvent &arg) |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseState &arg) |
void | handleCommand (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | CommandMaintainAttack (int index) |
void | CommandGatherOrPFMove (int index) |
void | CommandMove (Ogre::Vector3 pos) |
void | CommandPotentialFieldsMove (Ogre::Vector3 pos) |
FastEcslent::Group * | groupFromSelections () |
virtual void | initialize () |
void | createInputSystem () |
void | windowResized (Ogre::RenderWindow *win) |
void | windowClosed (Ogre::RenderWindow *win) |
virtual bool | frameRenderingQueued (const Ogre::FrameEvent &evt) |
virtual bool | frameStarted (const Ogre::FrameEvent &evt) |
virtual bool | frameEnded (const Ogre::FrameEvent &evt) |
void | DebugDrawTest () |
virtual bool | keyPressed (const OIS::KeyEvent &arg) |
virtual bool | keyReleased (const OIS::KeyEvent &arg) |
virtual bool | mouseMoved (const OIS::MouseEvent &arg) |
virtual bool | mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
virtual bool | mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
bool | registerKeyHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::KeyCode arg, OgreGFX::KeyHandler *handler) |
bool | registerMouseHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::MouseButtonID arg, OgreGFX::MouseHandler *handler) |
bool | callKeyHandlers (const OIS::KeyEvent &arg) |
bool | callMouseHandlers (const OIS::MouseEvent &arg, const OIS::MouseButtonID id) |
UIMgr (GraphicsInteractionManager *gim) | |
~UIMgr () | |
void | kill () |
void | updateFEEngineWithSelections () |
void | clearSelectionsAndUpdateFEEngine () |
void | printCurrentSelections () |
void | handleSingleSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | handleVolumeSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | doVolumeSelection (const Ogre::Vector2 &first, const Ogre::Vector2 &second) |
void | selectEntity (int index) |
void | decorateSelectedEntities () |
void | drawSelectionCircles () |
void | drawUnderMouseCircle () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseEvent &arg) |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseState &arg) |
void | handleCommand (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | CommandMaintainAttack (int index) |
void | CommandGatherOrPFMove (int index) |
void | CommandMove (Ogre::Vector3 pos) |
void | CommandPotentialFieldsMove (Ogre::Vector3 pos) |
FastEcslent::Group * | groupFromSelections () |
virtual void | initialize () |
void | createInputSystem () |
void | windowResized (Ogre::RenderWindow *win) |
void | windowClosed (Ogre::RenderWindow *win) |
virtual bool | frameRenderingQueued (const Ogre::FrameEvent &evt) |
virtual bool | frameStarted (const Ogre::FrameEvent &evt) |
virtual bool | frameEnded (const Ogre::FrameEvent &evt) |
void | DebugDrawTest () |
virtual bool | keyPressed (const OIS::KeyEvent &arg) |
virtual bool | keyReleased (const OIS::KeyEvent &arg) |
virtual bool | mouseMoved (const OIS::MouseEvent &arg) |
virtual bool | mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
virtual bool | mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
bool | registerKeyHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::KeyCode arg, OgreGFX::KeyHandler *handler) |
bool | registerMouseHandler (const std::set< OIS::KeyCode > *modifiers, const OIS::MouseButtonID arg, OgreGFX::MouseHandler *handler) |
bool | callKeyHandlers (const OIS::KeyEvent &arg) |
bool | callMouseHandlers (const OIS::MouseEvent &arg, const OIS::MouseButtonID id) |
UIMgr (GraphicsInteractionManager *gim) | |
~UIMgr () | |
void | kill () |
void | updateFEEngineWithSelections () |
void | clearSelectionsAndUpdateFEEngine () |
void | printCurrentSelections () |
void | handleSingleSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | handleVolumeSelection (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | doVolumeSelection (const Ogre::Vector2 &first, const Ogre::Vector2 &second) |
void | selectEntity (int index) |
void | decorateSelectedEntities () |
void | drawSelectionCircles () |
void | drawUnderMouseCircle () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse () |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseEvent &arg) |
std::pair< int, Ogre::Vector3 > | entIndexUnderMouse (const OIS::MouseState &arg) |
void | handleCommand (const OIS::MouseEvent &arg, OIS::MouseButtonID id) |
void | CommandMaintainAttack (int index) |
void | CommandGatherOrPFMove (int index) |
void | CommandMove (Ogre::Vector3 pos) |
void | CommandPotentialFieldsMove (Ogre::Vector3 pos) |
FastEcslent::Group * | groupFromSelections () |
virtual void | initialize () |
Public Attributes | |
HealthBar | bars |
Ogre::RenderWindow * | renderWindow |
Ogre::SceneManager * | sceneManager |
Ogre::Root * | ogreRoot |
Ogre::Camera * | camera |
CameraMgr * | cameraMgr |
OIS::InputManager * | inputManager |
OIS::Mouse * | mouse |
OIS::Keyboard * | keyboard |
bool | ctrlDown |
bool | shiftDown |
bool | altDown |
OIS::MouseState | ms |
Ogre::Vector3 | posUnderMouse |
FEButton * | buttonActive |
bool | shutDown |
Ogre::RaySceneQuery * | raySceneQuery |
float | selectionDistanceSquaredThreshold |
std::list< OgreGFX::GFXNode * > | currentSelections |
boost::mutex | selectionUpdateLock |
SelectionBox * | selectionBox |
Ogre::Vector2 | startPos |
Ogre::Vector2 | stopPos |
Ogre::PlaneBoundedVolumeListSceneQuery * | volQuery |
bool | selectingNow |
bool | volumeSelectingNow |
ControlGroupsHandler * | controlGroupsHandler |
Minimap * | minimap |
Ogre::SceneNode * | ghostUnderMouse |
std::list< std::pair < std::deque < FastEcslent::Command * >, Ogre::SceneNode * > > | waitingGhosts |
std::map< std::string, std::list < OgreGFX::KeyHandler * > > | keyHandlers |
std::map< std::string, std::list < OgreGFX::MouseHandler * > > | mouseHandlers |
int | rayDistanceForVolume |
Ogre::RenderWindow * | renderWindow |
Ogre::SceneManager * | sceneManager |
Ogre::Root * | ogreRoot |
Ogre::Camera * | camera |
CameraMgr * | cameraMgr |
OIS::InputManager * | inputManager |
OIS::Mouse * | mouse |
OIS::Keyboard * | keyboard |
Ogre::RaySceneQuery * | raySceneQuery |
std::list< OgreGFX::GFXNode * > | currentSelections |
SelectionBox * | selectionBox |
Ogre::PlaneBoundedVolumeListSceneQuery * | volQuery |
ControlGroupsHandler * | controlGroupsHandler |
Minimap * | minimap |
std::map< std::string, std::list < OgreGFX::KeyHandler * > > | keyHandlers |
std::map< std::string, std::list < OgreGFX::MouseHandler * > > | mouseHandlers |
Ogre::RenderWindow * | renderWindow |
Ogre::SceneManager * | sceneManager |
Ogre::Root * | ogreRoot |
Ogre::Camera * | camera |
CameraMgr * | cameraMgr |
OIS::InputManager * | inputManager |
OIS::Mouse * | mouse |
OIS::Keyboard * | keyboard |
Ogre::RaySceneQuery * | raySceneQuery |
std::list< OgreGFX::GFXNode * > | currentSelections |
SelectionBox * | selectionBox |
Ogre::PlaneBoundedVolumeListSceneQuery * | volQuery |
ControlGroupsHandler * | controlGroupsHandler |
Minimap * | minimap |
std::map< std::string, std::list < OgreGFX::KeyHandler * > > | keyHandlers |
std::map< std::string, std::list < OgreGFX::MouseHandler * > > | mouseHandlers |
Ogre::RenderWindow * | renderWindow |
Ogre::SceneManager * | sceneManager |
Ogre::Root * | ogreRoot |
Ogre::Camera * | camera |
CameraMgr * | cameraMgr |
OIS::InputManager * | inputManager |
OIS::Mouse * | mouse |
OIS::Keyboard * | keyboard |
Ogre::RaySceneQuery * | raySceneQuery |
std::list< OgreGFX::GFXNode * > | currentSelections |
SelectionBox * | selectionBox |
Ogre::PlaneBoundedVolumeListSceneQuery * | volQuery |
ControlGroupsHandler * | controlGroupsHandler |
Minimap * | minimap |
std::map< std::string, std::list < OgreGFX::KeyHandler * > > | keyHandlers |
std::map< std::string, std::list < OgreGFX::MouseHandler * > > | mouseHandlers |
Ogre::RenderWindow * | renderWindow |
Ogre::SceneManager * | sceneManager |
Ogre::Root * | ogreRoot |
Ogre::Camera * | camera |
CameraMgr * | cameraMgr |
OIS::InputManager * | inputManager |
OIS::Mouse * | mouse |
OIS::Keyboard * | keyboard |
Ogre::RaySceneQuery * | raySceneQuery |
std::list< OgreGFX::GFXNode * > | currentSelections |
SelectionBox * | selectionBox |
Ogre::PlaneBoundedVolumeListSceneQuery * | volQuery |
ControlGroupsHandler * | controlGroupsHandler |
Minimap * | minimap |
std::map< std::string, std::list < OgreGFX::KeyHandler * > > | keyHandlers |
std::map< std::string, std::list < OgreGFX::MouseHandler * > > | mouseHandlers |
Private Member Functions | |
void | checkSetModifiers (const OIS::KeyEvent &arg, bool value) |
void | clearModifiersDown () |
std::pair< bool, Ogre::Vector3 > | getMouseWorldPos (const OIS::MouseState &arg) |
std::set< OIS::KeyCode > * | makeModifiersSet () |
std::string | modifierKeyHash (const OIS::KeyCode) |
std::string | modifierKeyMouseHash (const OIS::MouseButtonID) |
void | checkSetModifiers (const OIS::KeyEvent &arg, bool value) |
void | clearModifiersDown () |
std::pair< bool, Ogre::Vector3 > | getMouseWorldPos (const OIS::MouseState &arg) |
std::set< OIS::KeyCode > * | makeModifiersSet () |
std::string | modifierKeyHash (const OIS::KeyCode) |
std::string | modifierKeyMouseHash (const OIS::MouseButtonID) |
void | checkSetModifiers (const OIS::KeyEvent &arg, bool value) |
void | clearModifiersDown () |
std::pair< bool, Ogre::Vector3 > | getMouseWorldPos (const OIS::MouseState &arg) |
std::set< OIS::KeyCode > * | makeModifiersSet () |
std::string | modifierKeyHash (const OIS::KeyCode) |
std::string | modifierKeyMouseHash (const OIS::MouseButtonID) |
void | checkSetModifiers (const OIS::KeyEvent &arg, bool value) |
void | clearModifiersDown () |
std::pair< bool, Ogre::Vector3 > | getMouseWorldPos (const OIS::MouseState &arg) |
std::set< OIS::KeyCode > * | makeModifiersSet () |
std::string | modifierKeyHash (const OIS::KeyCode) |
std::string | modifierKeyMouseHash (const OIS::MouseButtonID) |
void | checkSetModifiers (const OIS::KeyEvent &arg, bool value) |
void | clearModifiersDown () |
std::pair< bool, Ogre::Vector3 > | getMouseWorldPos (const OIS::MouseState &arg) |
std::set< OIS::KeyCode > * | makeModifiersSet () |
std::string | modifierKeyHash (const OIS::KeyCode) |
std::string | modifierKeyMouseHash (const OIS::MouseButtonID) |
Definition at line 56 of file uiMgr.h.
OgreGFX::UIMgr::UIMgr | ( | OgreGFX::GraphicsInteractionManager * | gim | ) |
The list of mouse handler functions that have been registered
Constructor for the UI manager, gets pointers to all the managers relevant to displaying and interacting with the graphics.
gim | a pointer to the global Graphics Interaction Manager, to display widget. |
Definition at line 38 of file uiMgr.cpp.
References bars, camera, cameraMgr, clearModifiersDown(), createInputSystem(), HealthBar::emptyBar, OgreGFX::GFXMgr::gfx, OgreGFX::GraphicsInteractionManager::mCamera, Rect::mObj, OgreGFX::GraphicsInteractionManager::mSceneMgr, OgreGFX::GraphicsInteractionManager::mWindow, posUnderMouse, rayDistanceForVolume, renderWindow, sceneManager, selectingNow, selectionBox, selectionDistanceSquaredThreshold, shutDown, volQuery, and volumeSelectingNow.
OgreGFX::UIMgr::UIMgr | ( | GraphicsInteractionManager * | gim | ) |
The list of mouse handler functions that have been registered
Constructor for the UI manager, gets pointers to all the managers relevant to displaying and interacting with the graphics.
gim | a pointer to the global Graphics Interaction Manager, to display widget. |
OgreGFX::UIMgr::~UIMgr | ( | ) |
OgreGFX::UIMgr::UIMgr | ( | GraphicsInteractionManager * | gim | ) |
The list of mouse handler functions that have been registered
Constructor for the UI manager, gets pointers to all the managers relevant to displaying and interacting with the graphics.
gim | a pointer to the global Graphics Interaction Manager, to display widget. |
OgreGFX::UIMgr::~UIMgr | ( | ) |
OgreGFX::UIMgr::UIMgr | ( | GraphicsInteractionManager * | gim | ) |
The list of mouse handler functions that have been registered
Constructor for the UI manager, gets pointers to all the managers relevant to displaying and interacting with the graphics.
gim | a pointer to the global Graphics Interaction Manager, to display widget. |
OgreGFX::UIMgr::~UIMgr | ( | ) |
OgreGFX::UIMgr::UIMgr | ( | GraphicsInteractionManager * | gim | ) |
The list of mouse handler functions that have been registered
Constructor for the UI manager, gets pointers to all the managers relevant to displaying and interacting with the graphics.
gim | a pointer to the global Graphics Interaction Manager, to display widget. |
OgreGFX::UIMgr::~UIMgr | ( | ) |
void OgreGFX::UIMgr::CreateGhostUnderMouse | ( | std::string | meshName | ) |
Definition at line 135 of file uiMgr.cpp.
References OgreGFX::ENT_VISIBILITY_FLAG, OgreGFX::GFXMgr::gfx, ghostUnderMouse, and OgreGFX::GraphicsInteractionManager::mSceneMgr.
Referenced by OgreGFX::FEButton::processButtonFirstEvent().
void OgreGFX::UIMgr::DestroyGhostUnderMouse | ( | Ogre::SceneNode * | node | ) |
Definition at line 155 of file uiMgr.cpp.
References OgreGFX::GFXMgr::gfx, and OgreGFX::GraphicsInteractionManager::mSceneMgr.
Referenced by frameRenderingQueued().
void OgreGFX::UIMgr::createInputSystem | ( | ) |
Setups up window, mouse and keyboard for handling input. Some configuration information is platform dependant, and currently only detects information for linux.
Definition at line 92 of file uiMgr.cpp.
References DEBUG, OgreGFX::GFXMgr::gfx, inputManager, keyboard, mouse, ms, OgreGFX::GraphicsInteractionManager::mWindow, renderWindow, and windowResized().
Referenced by UIMgr().
void OgreGFX::UIMgr::windowResized | ( | Ogre::RenderWindow * | win | ) |
Updates the mouse state so the mouse is aware of the new clickable area in the window.
win | Pointer to the window to that was resized. |
Definition at line 960 of file uiMgr.cpp.
Referenced by createInputSystem().
void OgreGFX::UIMgr::windowClosed | ( | Ogre::RenderWindow * | win | ) |
Starts the cleanup processes for closing a window.
win | Pointer to the window to that was closed. |
Definition at line 1012 of file uiMgr.cpp.
References kill(), and renderWindow.
bool OgreGFX::UIMgr::frameRenderingQueued | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when a frame event is queued, during this time the game captures the state of the mouse and keyboard inputs.
evt | Reference to the current frame event. |
Definition at line 216 of file uiMgr.cpp.
References cameraMgr, DestroyGhostUnderMouse(), OgreGFX::CameraMgr::frameRenderingQueued(), ghostUnderMouse, IncreaseGhostAlpha(), keyboard, mouse, renderWindow, and waitingGhosts.
bool OgreGFX::UIMgr::frameStarted | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when its time for the frame to be drawn. Handles the drawing of entity decorations such has circle when mouseover and filled circle around entity when selected.
evt | Reference to the current frame event. |
Definition at line 184 of file uiMgr.cpp.
References OgreGFX::DebugDrawer::build(), DEBUG, decorateSelectedEntities(), drawUnderMouseCircle(), OgreGFX::DebugDrawer::getSingletonPtr(), and renderWindow.
bool OgreGFX::UIMgr::frameEnded | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called after a frame as been drawn. Cleans up and deletes all the entity decorations that were drawn in the previous frame, so the next frame can set up what to draw.
evt | Reference to the current frame event. |
Definition at line 197 of file uiMgr.cpp.
References bars, OgreGFX::DebugDrawer::clear(), HealthBar::ClearVertices(), and OgreGFX::DebugDrawer::getSingletonPtr().
void OgreGFX::UIMgr::DebugDrawTest | ( | ) |
Used for testing the Debug Drawer, currently not in use.
Definition at line 166 of file uiMgr.cpp.
References OgreGFX::DebugDrawer::drawCuboid(), and OgreGFX::DebugDrawer::getSingleton().
bool OgreGFX::UIMgr::keyPressed | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is pressed down. Passes the event onto the camera manager as well to handle camera movements. All the keyhandlers registered will be checked against the event for matching key configurations to the current keys down. Functions with matching key configurations will be called.
arg | Reference to the keyboard event. |
Definition at line 332 of file uiMgr.cpp.
References callKeyHandlers(), cameraMgr, OgreGFX::ControlGroupsHandler::checkHandleControlGroupKeys(), checkSetModifiers(), controlGroupsHandler, ctrlDown, DEBUG, OgreGFX::CameraMgr::injectKeyDown(), and shutDown.
bool OgreGFX::UIMgr::keyReleased | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is released. Passes the event onto the camera manager as well to handle camera movements. Updates variables that store modifier keys to reflect which keys are no longer being held down.
arg | Reference to the keyboard event. |
Definition at line 361 of file uiMgr.cpp.
References cameraMgr, checkSetModifiers(), and OgreGFX::CameraMgr::injectKeyUp().
bool OgreGFX::UIMgr::mouseMoved | ( | const OIS::MouseEvent & | arg | ) | [virtual] |
OIS::MouseListener, called when the mouse is moved. Passes the event to the Tray manager for build-in OGRE buttons and the camera manager for camera movement. Implements the functionality for updating the size of a click-drag selection box.
arg | Reference to the mouse event. |
Definition at line 368 of file uiMgr.cpp.
References cameraMgr, ChangeGhostTextureRBGA(), entIndexUnderMouse(), GetGhostTextureRBGA(), getMouseWorldPos(), OgreGFX::GFXMgr::gfx, OgreGFX::GraphicsInteractionManager::gfxNodes, ghostUnderMouse, OgreGFX::CameraMgr::handleMouseScrollCameraZoom(), mouse, mouseDidScroll(), OgreGFX::WidgetMgr::mouseOverButton(), ms, FastEcslent::NENTITYTYPES, OgreGFX::GFXNode::node, selectingNow, selectionBox, OgreGFX::SelectionBox::setCorners(), startPos, stopPos, FastEcslent::TargetEntity, volumeSelectingNow, and OgreGFX::GraphicsInteractionManager::widgetMgr.
bool OgreGFX::UIMgr::mousePressed | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons and the widget manager to detect if the event occurred in the unit command box, to prevent the click from passing to game entities. Calls functions for selecting single/multiple entities or movement/attack, depending on button.
arg | Reference to the mouse event. |
Definition at line 839 of file uiMgr.cpp.
References DEBUG, handleCommand(), handleSingleSelection(), and handleVolumeSelection().
bool OgreGFX::UIMgr::mouseReleased | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons. Checks all mouse handler functions for a mouse configuration that matches the current mouse state. Functions that match the current mouse state will be called.
arg | Reference to the mouse event. |
Definition at line 856 of file uiMgr.cpp.
References callMouseHandlers(), doVolumeSelection(), selectingNow, selectionBox, startPos, stopPos, and volumeSelectingNow.
void OgreGFX::UIMgr::ChangeGhostTextureRBGA | ( | Ogre::SceneNode * | ghost, | |
Ogre::ColourValue | color | |||
) | [virtual] |
Definition at line 277 of file uiMgr.cpp.
References OgreGFX::GFXMgr::gfx, and OgreGFX::GraphicsInteractionManager::mSceneMgr.
Referenced by IncreaseGhostAlpha(), mouseMoved(), and OgreGFX::FEButton::processButtonSecondEvent().
Ogre::ColourValue OgreGFX::UIMgr::GetGhostTextureRBGA | ( | Ogre::SceneNode * | ghost | ) | [virtual] |
Definition at line 292 of file uiMgr.cpp.
References OgreGFX::GFXMgr::gfx, ghostUnderMouse, and OgreGFX::GraphicsInteractionManager::mSceneMgr.
Referenced by IncreaseGhostAlpha(), and mouseMoved().
void OgreGFX::UIMgr::IncreaseGhostAlpha | ( | Ogre::SceneNode * | ghost, | |
int | percentIncrease | |||
) | [virtual] |
Definition at line 301 of file uiMgr.cpp.
References ChangeGhostTextureRBGA(), and GetGhostTextureRBGA().
Referenced by frameRenderingQueued().
bool OgreGFX::UIMgr::registerKeyHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::KeyCode | arg, | |||
OgreGFX::KeyHandler * | handler | |||
) |
Registers a KeyHandler function with the KeyLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the KeyHandler function to be called. | |
arg | The keyboard key that must be pressed to trigger the KeyHandler function to be called. | |
handler | A pointer to a KeyHandler function |
Definition at line 871 of file uiMgr.cpp.
References keyHandlers, and OgreGFX::KeySet::toString().
Referenced by OgreGFX::WidgetMgr::initialize().
bool OgreGFX::UIMgr::registerMouseHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::MouseButtonID | arg, | |||
OgreGFX::MouseHandler * | handler | |||
) |
Registers a MouseHandler function with the MouseLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the MouseHandler function to be called. | |
arg | The mouse button that must be pressed to trigger the MouseHandler function to be called. | |
handler | A pointer to a MouseHandler function |
Definition at line 880 of file uiMgr.cpp.
References mouseHandlers, and OgreGFX::MouseButtonKeySet::toString().
Referenced by OgreGFX::WidgetMgr::initialize(), and initialize().
bool OgreGFX::UIMgr::callKeyHandlers | ( | const OIS::KeyEvent & | arg | ) |
Calls all registered key handlers that match the current key event and modifiers
arg | The key event that occurred in the last frame. |
Definition at line 919 of file uiMgr.cpp.
References keyHandlers, and modifierKeyHash().
Referenced by keyPressed().
bool OgreGFX::UIMgr::callMouseHandlers | ( | const OIS::MouseEvent & | arg, | |
const OIS::MouseButtonID | id | |||
) |
Calls all registered mouse handlers that match the current mouse event and modifiers
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
Definition at line 935 of file uiMgr.cpp.
References modifierKeyMouseHash(), and mouseHandlers.
Referenced by mouseReleased().
void OgreGFX::UIMgr::kill | ( | ) |
Destroys and cleans up all the Mgr objects used. Called when the game is exiting.
Definition at line 977 of file uiMgr.cpp.
References cameraMgr, OgreGFX::DebugDrawer::getSingletonPtr(), inputManager, keyboard, mouse, renderWindow, and selectionBox.
Referenced by OgreGFX::GraphicsInteractionManager::frameRenderingQueued(), windowClosed(), OgreGFX::GraphicsInteractionManager::windowClosed(), and ~UIMgr().
void OgreGFX::UIMgr::updateFEEngineWithSelections | ( | ) |
After the game has detected which GFXNodes have been selected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as selected.
Definition at line 630 of file uiMgr.cpp.
References OgreGFX::WidgetMgr::activateMenu(), currentSelections, OgreGFX::WidgetMgr::deactivateMenu(), OgreGFX::GraphicsInteractionManager::engine, OgreGFX::GFXMgr::gfx, FastEcslent::Engine::options, Options::player, FastEcslent::Engine::selectionMgr, selectionUpdateLock, Options::side, and OgreGFX::GraphicsInteractionManager::widgetMgr.
Referenced by doVolumeSelection(), handleSingleSelection(), and OgreGFX::ControlGroupsHandler::selectControlGroup().
void OgreGFX::UIMgr::clearSelectionsAndUpdateFEEngine | ( | ) |
After the game has detected which GFXNodes have been unselected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as unselected.
Definition at line 657 of file uiMgr.cpp.
References currentSelections, OgreGFX::GraphicsInteractionManager::engine, OgreGFX::GFXMgr::gfx, FastEcslent::Engine::selectionMgr, and selectionUpdateLock.
Referenced by doVolumeSelection(), handleSingleSelection(), and OgreGFX::ControlGroupsHandler::selectControlGroup().
void OgreGFX::UIMgr::printCurrentSelections | ( | ) |
Used for debugging, prints the list of entity IDs currently selected to the terminal.
Definition at line 617 of file uiMgr.cpp.
References currentSelections, and DEBUG.
Referenced by OgreGFX::ControlGroupsHandler::createControlGroup(), and OgreGFX::ControlGroupsHandler::selectControlGroup().
void OgreGFX::UIMgr::handleSingleSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines if a mouse click should select a single GFXNode or no GFXNode, and tells the engine to mark the corresponding entity object as selected.
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
Definition at line 559 of file uiMgr.cpp.
References buttonActive, clearSelectionsAndUpdateFEEngine(), entIndexUnderMouse(), OgreGFX::FEButton::handleMouseEvent(), selectEntity(), shiftDown, updateFEEngineWithSelections(), and volumeSelectingNow.
Referenced by mousePressed().
void OgreGFX::UIMgr::handleVolumeSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines the selection area defined by a mouse being clicked-and-dragged
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
Definition at line 606 of file uiMgr.cpp.
References ms, selectingNow, selectionBox, startPos, and stopPos.
Referenced by mousePressed().
void OgreGFX::UIMgr::doVolumeSelection | ( | const Ogre::Vector2 & | first, | |
const Ogre::Vector2 & | second | |||
) |
On a mouse up event, if handleSingleSelect was called in mouse down, marks GFXNodes within the marked selection as selected, and tells the engine to updated the corresponding entities as selected.
first | The start position of the mass-selection mouse click-and-drag. | |
second | The stop position of the mass-selection mouse click-and-drag. |
Definition at line 676 of file uiMgr.cpp.
References camera, clearSelectionsAndUpdateFEEngine(), DEBUG, OgreGFX::GFXMgr::gfx, OgreGFX::GraphicsInteractionManager::sceneNodeToEntIdMap, selectEntity(), swap(), updateFEEngineWithSelections(), and volQuery.
Referenced by mouseReleased().
void OgreGFX::UIMgr::selectEntity | ( | int | index | ) |
Adds the GFXNode at the given index to the list of selected GFX nodes
index | Index of the selected GFXNode. |
Definition at line 552 of file uiMgr.cpp.
References currentSelections, OgreGFX::GFXMgr::gfx, and OgreGFX::GraphicsInteractionManager::gfxNodes.
Referenced by doVolumeSelection(), and handleSingleSelection().
void OgreGFX::UIMgr::decorateSelectedEntities | ( | ) |
Handles the drawing of healthbars and selection circles, according to which GFXNodes are in the selected list.
Definition at line 409 of file uiMgr.cpp.
References bars, currentSelections, DEBUG, FastEcslent::Entity::desiredHeading, FastEcslent::Entity::desiredSpeed, HealthBar::Draw(), OgreGFX::DebugDrawer::drawAngleLine(), OgreGFX::DebugDrawer::drawCircle(), OgreGFX::DebugDrawer::drawLine(), OgreGFX::GraphicsInteractionManager::engine, FastEcslent::Entity::entityClass, FastEcslent::Engine::entityMgr, FastEcslent::Entity::entityType, OgreGFX::DebugDrawer::getSingleton(), OgreGFX::GFXMgr::gfx, FastEcslent::Entity::heading, FastEcslent::healthLineLength, FastEcslent::Entity::hitpoints, FastEcslent::Entity::length, FastEcslent::NCircleSegments, HealthBar::percent, FastEcslent::Entity::pos, FastEcslent::Entity::speed, FastEcslent::Entity::speedRange, FastEcslent::STATIC, and FastEcslent::Engine::weaponMgr.
Referenced by frameStarted().
void OgreGFX::UIMgr::drawSelectionCircles | ( | ) |
Handles the drawing selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawUnderMouseCircle | ( | ) |
Handles the drawing mouse-hover circles, according to which GFXNodes beneath the mouse cursor position.
Definition at line 469 of file uiMgr.cpp.
References DEBUG, OgreGFX::DebugDrawer::drawCircle(), OgreGFX::GraphicsInteractionManager::engine, entIndexUnderMouse(), FastEcslent::Engine::entityMgr, OgreGFX::DebugDrawer::getSingleton(), OgreGFX::GFXMgr::gfx, OgreGFX::GraphicsInteractionManager::gfxNodes, OgreGFX::GFXNode::id, FastEcslent::NCircleSegments, and OgreGFX::GraphicsInteractionManager::nGFXNodes.
Referenced by frameStarted().
std::pair< int, Ogre::Vector3 > OgreGFX::UIMgr::entIndexUnderMouse | ( | ) |
Definition at line 488 of file uiMgr.cpp.
Referenced by drawUnderMouseCircle(), entIndexUnderMouse(), handleCommand(), OgreGFX::FEButton::handleMouseEvent(), handleSingleSelection(), and mouseMoved().
std::pair< int, Ogre::Vector3 > OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseEvent & | arg | ) |
std::pair< int, Ogre::Vector3 > OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseState & | arg | ) |
Definition at line 517 of file uiMgr.cpp.
References camera, getMouseWorldPos(), OgreGFX::GFXMgr::gfx, OgreGFX::GraphicsInteractionManager::gfxNodes, ms, OgreGFX::GraphicsInteractionManager::nGFXNodes, OgreGFX::GFXNode::node, OgreGFX::GraphicsInteractionManager::oceanSurface, posUnderMouse, OgreGFX::GFXNode::selectable, and selectionDistanceSquaredThreshold.
void OgreGFX::UIMgr::handleCommand | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Definition at line 809 of file uiMgr.cpp.
References CommandGatherOrPFMove(), CommandMaintainAttack(), CommandPotentialFieldsMove(), DEBUG, OgreGFX::GraphicsInteractionManager::engine, entIndexUnderMouse(), FastEcslent::Engine::entityMgr, getMouseWorldPos(), OgreGFX::GFXMgr::gfx, FastEcslent::MINERALS, and FastEcslent::REFINERY.
Referenced by mousePressed().
void OgreGFX::UIMgr::CommandMaintainAttack | ( | int | index | ) |
Definition at line 725 of file uiMgr.cpp.
References DEBUG, OgreGFX::GraphicsInteractionManager::engine, FastEcslent::Engine::entityMgr, and OgreGFX::GFXMgr::gfx.
Referenced by handleCommand().
void OgreGFX::UIMgr::CommandGatherOrPFMove | ( | int | index | ) |
Definition at line 730 of file uiMgr.cpp.
References FastEcslent::Refinery::associatedOilField, currentSelections, DEBUG, OgreGFX::GraphicsInteractionManager::engine, FastEcslent::Entity::entityClass, FastEcslent::Engine::entityMgr, FastEcslent::Entity::entityType, OgreGFX::GFXMgr::gfx, FastEcslent::REFINERY, FastEcslent::SCV, FastEcslent::setGatherForEnt(), FastEcslent::setPotentialMoveForEnt(), shiftDown, and FastEcslent::STATIC.
Referenced by handleCommand().
void OgreGFX::UIMgr::CommandMove | ( | Ogre::Vector3 | pos | ) |
Definition at line 768 of file uiMgr.cpp.
References FastEcslent::Group::addAspect(), FastEcslent::addMoveForEnt(), currentSelections, DEBUG, OgreGFX::GraphicsInteractionManager::engine, FastEcslent::Engine::entityMgr, OgreGFX::GFXMgr::gfx, FastEcslent::GROUPAI, groupFromSelections(), FastEcslent::Group::members, FastEcslent::Group::nEntitiesInGroup, selectionUpdateLock, FastEcslent::Group::setLeaderByIndex(), FastEcslent::setMoveForEnt(), FastEcslent::setPotentialMoveForEnt(), shiftDown, and FastEcslent::GroupTarget::target.
void OgreGFX::UIMgr::CommandPotentialFieldsMove | ( | Ogre::Vector3 | pos | ) |
Definition at line 753 of file uiMgr.cpp.
References currentSelections, DEBUG, OgreGFX::GraphicsInteractionManager::engine, FastEcslent::Entity::entityClass, FastEcslent::Engine::entityMgr, OgreGFX::GFXMgr::gfx, FastEcslent::setPotentialMoveForEnt(), shiftDown, and FastEcslent::STATIC.
Referenced by handleCommand().
FastEcslent::Group * OgreGFX::UIMgr::groupFromSelections | ( | ) |
Definition at line 591 of file uiMgr.cpp.
References currentSelections, OgreGFX::GraphicsInteractionManager::engine, FastEcslent::Engine::entityMgr, OgreGFX::GFXMgr::gfx, FastEcslent::Engine::groupMgr, and FastEcslent::MaxEnts.
Referenced by CommandMove().
void OgreGFX::UIMgr::initialize | ( | ) | [virtual] |
Reimplemented from OgreGFX::GFXMgr.
Definition at line 65 of file uiMgr.cpp.
References controlGroupsHandler, DEBUG, OgreGFX::GFXMgr::gfx, keyboard, minimap, mouse, and registerMouseHandler().
Referenced by OgreGFX::GraphicsInteractionManager::initGFXManagers(), and OgreGFX::GraphicsInteractionManager::initManagers().
void OgreGFX::UIMgr::checkSetModifiers | ( | const OIS::KeyEvent & | arg, | |
bool | value | |||
) | [private] |
Definition at line 312 of file uiMgr.cpp.
References altDown, ctrlDown, and shiftDown.
Referenced by keyPressed(), and keyReleased().
void OgreGFX::UIMgr::clearModifiersDown | ( | ) | [private] |
std::pair< bool, Ogre::Vector3 > OgreGFX::UIMgr::getMouseWorldPos | ( | const OIS::MouseState & | arg | ) | [private] |
Definition at line 502 of file uiMgr.cpp.
References camera, OgreGFX::GFXMgr::gfx, ms, and OgreGFX::GraphicsInteractionManager::oceanSurface.
Referenced by entIndexUnderMouse(), handleCommand(), and mouseMoved().
std::set< OIS::KeyCode > * OgreGFX::UIMgr::makeModifiersSet | ( | ) | [private] |
Definition at line 891 of file uiMgr.cpp.
References altDown, ctrlDown, and shiftDown.
Referenced by modifierKeyHash(), and modifierKeyMouseHash().
std::string OgreGFX::UIMgr::modifierKeyHash | ( | const OIS::KeyCode | keyCode | ) | [private] |
Definition at line 903 of file uiMgr.cpp.
References makeModifiersSet(), and OgreGFX::KeySet::toString().
Referenced by callKeyHandlers().
std::string OgreGFX::UIMgr::modifierKeyMouseHash | ( | const OIS::MouseButtonID | id | ) | [private] |
Definition at line 911 of file uiMgr.cpp.
References makeModifiersSet(), and OgreGFX::MouseButtonKeySet::toString().
Referenced by callMouseHandlers().
void OgreGFX::UIMgr::createInputSystem | ( | ) |
Minimap object showing a miniature, to-scale map of the current level the unit positions
Setups up window, mouse and keyboard for handling input. Some configuration information is platform dependant, and currently only detects information for linux.
void OgreGFX::UIMgr::windowResized | ( | Ogre::RenderWindow * | win | ) |
Updates the mouse state so the mouse is aware of the new clickable area in the window.
win | Pointer to the window to that was resized. |
void OgreGFX::UIMgr::windowClosed | ( | Ogre::RenderWindow * | win | ) |
Starts the cleanup processes for closing a window.
win | Pointer to the window to that was closed. |
virtual bool OgreGFX::UIMgr::frameRenderingQueued | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when a frame event is queued, during this time the game captures the state of the mouse and keyboard inputs.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameStarted | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when its time for the frame to be drawn. Handles the drawing of entity decorations such has circle when mouseover and filled circle around entity when selected.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameEnded | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called after a frame as been drawn. Cleans up and deletes all the entity decorations that were drawn in the previous frame, so the next frame can set up what to draw.
evt | Reference to the current frame event. |
void OgreGFX::UIMgr::DebugDrawTest | ( | ) |
Used for testing the Debug Drawer, currently not in use.
virtual bool OgreGFX::UIMgr::keyPressed | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is pressed down. Passes the event onto the camera manager as well to handle camera movements. All the keyhandlers registered will be checked against the event for matching key configurations to the current keys down. Functions with matching key configurations will be called.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::keyReleased | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is released. Passes the event onto the camera manager as well to handle camera movements. Updates variables that store modifier keys to reflect which keys are no longer being held down.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::mouseMoved | ( | const OIS::MouseEvent & | arg | ) | [virtual] |
OIS::MouseListener, called when the mouse is moved. Passes the event to the Tray manager for build-in OGRE buttons and the camera manager for camera movement. Implements the functionality for updating the size of a click-drag selection box.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mousePressed | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons and the widget manager to detect if the event occurred in the unit command box, to prevent the click from passing to game entities. Calls functions for selecting single/multiple entities or movement/attack, depending on button.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mouseReleased | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons. Checks all mouse handler functions for a mouse configuration that matches the current mouse state. Functions that match the current mouse state will be called.
arg | Reference to the mouse event. |
bool OgreGFX::UIMgr::registerKeyHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::KeyCode | arg, | |||
OgreGFX::KeyHandler * | handler | |||
) |
Registers a KeyHandler function with the KeyLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the KeyHandler function to be called. | |
arg | The keyboard key that must be pressed to trigger the KeyHandler function to be called. | |
handler | A pointer to a KeyHandler function |
bool OgreGFX::UIMgr::registerMouseHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::MouseButtonID | arg, | |||
OgreGFX::MouseHandler * | handler | |||
) |
Registers a MouseHandler function with the MouseLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the MouseHandler function to be called. | |
arg | The mouse button that must be pressed to trigger the MouseHandler function to be called. | |
handler | A pointer to a MouseHandler function |
bool OgreGFX::UIMgr::callKeyHandlers | ( | const OIS::KeyEvent & | arg | ) |
Calls all registered key handlers that match the current key event and modifiers
arg | The key event that occurred in the last frame. |
bool OgreGFX::UIMgr::callMouseHandlers | ( | const OIS::MouseEvent & | arg, | |
const OIS::MouseButtonID | id | |||
) |
Calls all registered mouse handlers that match the current mouse event and modifiers
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::kill | ( | ) |
Destroys and cleans up all the Mgr objects used. Called when the game is exiting.
void OgreGFX::UIMgr::updateFEEngineWithSelections | ( | ) |
After the game has detected which GFXNodes have been selected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as selected.
void OgreGFX::UIMgr::clearSelectionsAndUpdateFEEngine | ( | ) |
After the game has detected which GFXNodes have been unselected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as unselected.
void OgreGFX::UIMgr::printCurrentSelections | ( | ) |
Used for debugging, prints the list of entity IDs currently selected to the terminal.
void OgreGFX::UIMgr::handleSingleSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines if a mouse click should select a single GFXNode or no GFXNode, and tells the engine to mark the corresponding entity object as selected.
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::handleVolumeSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines the selection area defined by a mouse being clicked-and-dragged
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::doVolumeSelection | ( | const Ogre::Vector2 & | first, | |
const Ogre::Vector2 & | second | |||
) |
On a mouse up event, if handleSingleSelect was called in mouse down, marks GFXNodes within the marked selection as selected, and tells the engine to updated the corresponding entities as selected.
first | The start position of the mass-selection mouse click-and-drag. | |
second | The stop position of the mass-selection mouse click-and-drag. |
void OgreGFX::UIMgr::selectEntity | ( | int | index | ) |
void OgreGFX::UIMgr::decorateSelectedEntities | ( | ) |
Handles the drawing of healthbars and selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawSelectionCircles | ( | ) |
Handles the drawing selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawUnderMouseCircle | ( | ) |
Handles the drawing mouse-hover circles, according to which GFXNodes beneath the mouse cursor position.
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseEvent & | arg | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseState & | arg | ) |
void OgreGFX::UIMgr::handleCommand | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
void OgreGFX::UIMgr::CommandMaintainAttack | ( | int | index | ) |
void OgreGFX::UIMgr::CommandGatherOrPFMove | ( | int | index | ) |
void OgreGFX::UIMgr::CommandMove | ( | Ogre::Vector3 | pos | ) |
void OgreGFX::UIMgr::CommandPotentialFieldsMove | ( | Ogre::Vector3 | pos | ) |
FastEcslent::Group* OgreGFX::UIMgr::groupFromSelections | ( | ) |
virtual void OgreGFX::UIMgr::initialize | ( | ) | [virtual] |
Reimplemented from OgreGFX::GFXMgr.
void OgreGFX::UIMgr::checkSetModifiers | ( | const OIS::KeyEvent & | arg, | |
bool | value | |||
) | [private] |
void OgreGFX::UIMgr::clearModifiersDown | ( | ) | [private] |
std::pair<bool, Ogre::Vector3> OgreGFX::UIMgr::getMouseWorldPos | ( | const OIS::MouseState & | arg | ) | [private] |
std::set<OIS::KeyCode>* OgreGFX::UIMgr::makeModifiersSet | ( | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyHash | ( | const OIS::KeyCode | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyMouseHash | ( | const OIS::MouseButtonID | ) | [private] |
void OgreGFX::UIMgr::createInputSystem | ( | ) |
Minimap object showing a miniature, to-scale map of the current level the unit positions
Setups up window, mouse and keyboard for handling input. Some configuration information is platform dependant, and currently only detects information for linux.
void OgreGFX::UIMgr::windowResized | ( | Ogre::RenderWindow * | win | ) |
Updates the mouse state so the mouse is aware of the new clickable area in the window.
win | Pointer to the window to that was resized. |
void OgreGFX::UIMgr::windowClosed | ( | Ogre::RenderWindow * | win | ) |
Starts the cleanup processes for closing a window.
win | Pointer to the window to that was closed. |
virtual bool OgreGFX::UIMgr::frameRenderingQueued | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when a frame event is queued, during this time the game captures the state of the mouse and keyboard inputs.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameStarted | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when its time for the frame to be drawn. Handles the drawing of entity decorations such has circle when mouseover and filled circle around entity when selected.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameEnded | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called after a frame as been drawn. Cleans up and deletes all the entity decorations that were drawn in the previous frame, so the next frame can set up what to draw.
evt | Reference to the current frame event. |
void OgreGFX::UIMgr::DebugDrawTest | ( | ) |
Used for testing the Debug Drawer, currently not in use.
virtual bool OgreGFX::UIMgr::keyPressed | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is pressed down. Passes the event onto the camera manager as well to handle camera movements. All the keyhandlers registered will be checked against the event for matching key configurations to the current keys down. Functions with matching key configurations will be called.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::keyReleased | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is released. Passes the event onto the camera manager as well to handle camera movements. Updates variables that store modifier keys to reflect which keys are no longer being held down.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::mouseMoved | ( | const OIS::MouseEvent & | arg | ) | [virtual] |
OIS::MouseListener, called when the mouse is moved. Passes the event to the Tray manager for build-in OGRE buttons and the camera manager for camera movement. Implements the functionality for updating the size of a click-drag selection box.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mousePressed | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons and the widget manager to detect if the event occurred in the unit command box, to prevent the click from passing to game entities. Calls functions for selecting single/multiple entities or movement/attack, depending on button.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mouseReleased | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons. Checks all mouse handler functions for a mouse configuration that matches the current mouse state. Functions that match the current mouse state will be called.
arg | Reference to the mouse event. |
bool OgreGFX::UIMgr::registerKeyHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::KeyCode | arg, | |||
OgreGFX::KeyHandler * | handler | |||
) |
Registers a KeyHandler function with the KeyLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the KeyHandler function to be called. | |
arg | The keyboard key that must be pressed to trigger the KeyHandler function to be called. | |
handler | A pointer to a KeyHandler function |
bool OgreGFX::UIMgr::registerMouseHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::MouseButtonID | arg, | |||
OgreGFX::MouseHandler * | handler | |||
) |
Registers a MouseHandler function with the MouseLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the MouseHandler function to be called. | |
arg | The mouse button that must be pressed to trigger the MouseHandler function to be called. | |
handler | A pointer to a MouseHandler function |
bool OgreGFX::UIMgr::callKeyHandlers | ( | const OIS::KeyEvent & | arg | ) |
Calls all registered key handlers that match the current key event and modifiers
arg | The key event that occurred in the last frame. |
bool OgreGFX::UIMgr::callMouseHandlers | ( | const OIS::MouseEvent & | arg, | |
const OIS::MouseButtonID | id | |||
) |
Calls all registered mouse handlers that match the current mouse event and modifiers
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::kill | ( | ) |
Destroys and cleans up all the Mgr objects used. Called when the game is exiting.
void OgreGFX::UIMgr::updateFEEngineWithSelections | ( | ) |
After the game has detected which GFXNodes have been selected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as selected.
void OgreGFX::UIMgr::clearSelectionsAndUpdateFEEngine | ( | ) |
After the game has detected which GFXNodes have been unselected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as unselected.
void OgreGFX::UIMgr::printCurrentSelections | ( | ) |
Used for debugging, prints the list of entity IDs currently selected to the terminal.
void OgreGFX::UIMgr::handleSingleSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines if a mouse click should select a single GFXNode or no GFXNode, and tells the engine to mark the corresponding entity object as selected.
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::handleVolumeSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines the selection area defined by a mouse being clicked-and-dragged
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::doVolumeSelection | ( | const Ogre::Vector2 & | first, | |
const Ogre::Vector2 & | second | |||
) |
On a mouse up event, if handleSingleSelect was called in mouse down, marks GFXNodes within the marked selection as selected, and tells the engine to updated the corresponding entities as selected.
first | The start position of the mass-selection mouse click-and-drag. | |
second | The stop position of the mass-selection mouse click-and-drag. |
void OgreGFX::UIMgr::selectEntity | ( | int | index | ) |
void OgreGFX::UIMgr::decorateSelectedEntities | ( | ) |
Handles the drawing of healthbars and selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawSelectionCircles | ( | ) |
Handles the drawing selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawUnderMouseCircle | ( | ) |
Handles the drawing mouse-hover circles, according to which GFXNodes beneath the mouse cursor position.
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseEvent & | arg | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseState & | arg | ) |
void OgreGFX::UIMgr::handleCommand | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
void OgreGFX::UIMgr::CommandMaintainAttack | ( | int | index | ) |
void OgreGFX::UIMgr::CommandGatherOrPFMove | ( | int | index | ) |
void OgreGFX::UIMgr::CommandMove | ( | Ogre::Vector3 | pos | ) |
void OgreGFX::UIMgr::CommandPotentialFieldsMove | ( | Ogre::Vector3 | pos | ) |
FastEcslent::Group* OgreGFX::UIMgr::groupFromSelections | ( | ) |
virtual void OgreGFX::UIMgr::initialize | ( | ) | [virtual] |
Reimplemented from OgreGFX::GFXMgr.
void OgreGFX::UIMgr::checkSetModifiers | ( | const OIS::KeyEvent & | arg, | |
bool | value | |||
) | [private] |
void OgreGFX::UIMgr::clearModifiersDown | ( | ) | [private] |
std::pair<bool, Ogre::Vector3> OgreGFX::UIMgr::getMouseWorldPos | ( | const OIS::MouseState & | arg | ) | [private] |
std::set<OIS::KeyCode>* OgreGFX::UIMgr::makeModifiersSet | ( | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyHash | ( | const OIS::KeyCode | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyMouseHash | ( | const OIS::MouseButtonID | ) | [private] |
void OgreGFX::UIMgr::createInputSystem | ( | ) |
Minimap object showing a miniature, to-scale map of the current level the unit positions
Setups up window, mouse and keyboard for handling input. Some configuration information is platform dependant, and currently only detects information for linux.
void OgreGFX::UIMgr::windowResized | ( | Ogre::RenderWindow * | win | ) |
Updates the mouse state so the mouse is aware of the new clickable area in the window.
win | Pointer to the window to that was resized. |
void OgreGFX::UIMgr::windowClosed | ( | Ogre::RenderWindow * | win | ) |
Starts the cleanup processes for closing a window.
win | Pointer to the window to that was closed. |
virtual bool OgreGFX::UIMgr::frameRenderingQueued | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when a frame event is queued, during this time the game captures the state of the mouse and keyboard inputs.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameStarted | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when its time for the frame to be drawn. Handles the drawing of entity decorations such has circle when mouseover and filled circle around entity when selected.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameEnded | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called after a frame as been drawn. Cleans up and deletes all the entity decorations that were drawn in the previous frame, so the next frame can set up what to draw.
evt | Reference to the current frame event. |
void OgreGFX::UIMgr::DebugDrawTest | ( | ) |
Used for testing the Debug Drawer, currently not in use.
virtual bool OgreGFX::UIMgr::keyPressed | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is pressed down. Passes the event onto the camera manager as well to handle camera movements. All the keyhandlers registered will be checked against the event for matching key configurations to the current keys down. Functions with matching key configurations will be called.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::keyReleased | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is released. Passes the event onto the camera manager as well to handle camera movements. Updates variables that store modifier keys to reflect which keys are no longer being held down.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::mouseMoved | ( | const OIS::MouseEvent & | arg | ) | [virtual] |
OIS::MouseListener, called when the mouse is moved. Passes the event to the Tray manager for build-in OGRE buttons and the camera manager for camera movement. Implements the functionality for updating the size of a click-drag selection box.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mousePressed | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons and the widget manager to detect if the event occurred in the unit command box, to prevent the click from passing to game entities. Calls functions for selecting single/multiple entities or movement/attack, depending on button.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mouseReleased | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons. Checks all mouse handler functions for a mouse configuration that matches the current mouse state. Functions that match the current mouse state will be called.
arg | Reference to the mouse event. |
bool OgreGFX::UIMgr::registerKeyHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::KeyCode | arg, | |||
OgreGFX::KeyHandler * | handler | |||
) |
Registers a KeyHandler function with the KeyLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the KeyHandler function to be called. | |
arg | The keyboard key that must be pressed to trigger the KeyHandler function to be called. | |
handler | A pointer to a KeyHandler function |
bool OgreGFX::UIMgr::registerMouseHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::MouseButtonID | arg, | |||
OgreGFX::MouseHandler * | handler | |||
) |
Registers a MouseHandler function with the MouseLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the MouseHandler function to be called. | |
arg | The mouse button that must be pressed to trigger the MouseHandler function to be called. | |
handler | A pointer to a MouseHandler function |
bool OgreGFX::UIMgr::callKeyHandlers | ( | const OIS::KeyEvent & | arg | ) |
Calls all registered key handlers that match the current key event and modifiers
arg | The key event that occurred in the last frame. |
bool OgreGFX::UIMgr::callMouseHandlers | ( | const OIS::MouseEvent & | arg, | |
const OIS::MouseButtonID | id | |||
) |
Calls all registered mouse handlers that match the current mouse event and modifiers
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::kill | ( | ) |
Destroys and cleans up all the Mgr objects used. Called when the game is exiting.
void OgreGFX::UIMgr::updateFEEngineWithSelections | ( | ) |
After the game has detected which GFXNodes have been selected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as selected.
void OgreGFX::UIMgr::clearSelectionsAndUpdateFEEngine | ( | ) |
After the game has detected which GFXNodes have been unselected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as unselected.
void OgreGFX::UIMgr::printCurrentSelections | ( | ) |
Used for debugging, prints the list of entity IDs currently selected to the terminal.
void OgreGFX::UIMgr::handleSingleSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines if a mouse click should select a single GFXNode or no GFXNode, and tells the engine to mark the corresponding entity object as selected.
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::handleVolumeSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines the selection area defined by a mouse being clicked-and-dragged
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::doVolumeSelection | ( | const Ogre::Vector2 & | first, | |
const Ogre::Vector2 & | second | |||
) |
On a mouse up event, if handleSingleSelect was called in mouse down, marks GFXNodes within the marked selection as selected, and tells the engine to updated the corresponding entities as selected.
first | The start position of the mass-selection mouse click-and-drag. | |
second | The stop position of the mass-selection mouse click-and-drag. |
void OgreGFX::UIMgr::selectEntity | ( | int | index | ) |
void OgreGFX::UIMgr::decorateSelectedEntities | ( | ) |
Handles the drawing of healthbars and selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawSelectionCircles | ( | ) |
Handles the drawing selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawUnderMouseCircle | ( | ) |
Handles the drawing mouse-hover circles, according to which GFXNodes beneath the mouse cursor position.
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseEvent & | arg | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseState & | arg | ) |
void OgreGFX::UIMgr::handleCommand | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
void OgreGFX::UIMgr::CommandMaintainAttack | ( | int | index | ) |
void OgreGFX::UIMgr::CommandGatherOrPFMove | ( | int | index | ) |
void OgreGFX::UIMgr::CommandMove | ( | Ogre::Vector3 | pos | ) |
void OgreGFX::UIMgr::CommandPotentialFieldsMove | ( | Ogre::Vector3 | pos | ) |
FastEcslent::Group* OgreGFX::UIMgr::groupFromSelections | ( | ) |
virtual void OgreGFX::UIMgr::initialize | ( | ) | [virtual] |
Reimplemented from OgreGFX::GFXMgr.
void OgreGFX::UIMgr::checkSetModifiers | ( | const OIS::KeyEvent & | arg, | |
bool | value | |||
) | [private] |
void OgreGFX::UIMgr::clearModifiersDown | ( | ) | [private] |
std::pair<bool, Ogre::Vector3> OgreGFX::UIMgr::getMouseWorldPos | ( | const OIS::MouseState & | arg | ) | [private] |
std::set<OIS::KeyCode>* OgreGFX::UIMgr::makeModifiersSet | ( | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyHash | ( | const OIS::KeyCode | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyMouseHash | ( | const OIS::MouseButtonID | ) | [private] |
void OgreGFX::UIMgr::createInputSystem | ( | ) |
Minimap object showing a miniature, to-scale map of the current level the unit positions
Setups up window, mouse and keyboard for handling input. Some configuration information is platform dependant, and currently only detects information for linux.
void OgreGFX::UIMgr::windowResized | ( | Ogre::RenderWindow * | win | ) |
Updates the mouse state so the mouse is aware of the new clickable area in the window.
win | Pointer to the window to that was resized. |
void OgreGFX::UIMgr::windowClosed | ( | Ogre::RenderWindow * | win | ) |
Starts the cleanup processes for closing a window.
win | Pointer to the window to that was closed. |
virtual bool OgreGFX::UIMgr::frameRenderingQueued | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when a frame event is queued, during this time the game captures the state of the mouse and keyboard inputs.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameStarted | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called when its time for the frame to be drawn. Handles the drawing of entity decorations such has circle when mouseover and filled circle around entity when selected.
evt | Reference to the current frame event. |
virtual bool OgreGFX::UIMgr::frameEnded | ( | const Ogre::FrameEvent & | evt | ) | [virtual] |
Called after a frame as been drawn. Cleans up and deletes all the entity decorations that were drawn in the previous frame, so the next frame can set up what to draw.
evt | Reference to the current frame event. |
void OgreGFX::UIMgr::DebugDrawTest | ( | ) |
Used for testing the Debug Drawer, currently not in use.
virtual bool OgreGFX::UIMgr::keyPressed | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is pressed down. Passes the event onto the camera manager as well to handle camera movements. All the keyhandlers registered will be checked against the event for matching key configurations to the current keys down. Functions with matching key configurations will be called.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::keyReleased | ( | const OIS::KeyEvent & | arg | ) | [virtual] |
OIS::KeyListener, called when a keyboard key is released. Passes the event onto the camera manager as well to handle camera movements. Updates variables that store modifier keys to reflect which keys are no longer being held down.
arg | Reference to the keyboard event. |
virtual bool OgreGFX::UIMgr::mouseMoved | ( | const OIS::MouseEvent & | arg | ) | [virtual] |
OIS::MouseListener, called when the mouse is moved. Passes the event to the Tray manager for build-in OGRE buttons and the camera manager for camera movement. Implements the functionality for updating the size of a click-drag selection box.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mousePressed | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons and the widget manager to detect if the event occurred in the unit command box, to prevent the click from passing to game entities. Calls functions for selecting single/multiple entities or movement/attack, depending on button.
arg | Reference to the mouse event. |
virtual bool OgreGFX::UIMgr::mouseReleased | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) | [virtual] |
OIS::MouseListener, called when the mouse is pressed. Passes the event to the Tray manager for build-in OGRE buttons. Checks all mouse handler functions for a mouse configuration that matches the current mouse state. Functions that match the current mouse state will be called.
arg | Reference to the mouse event. |
bool OgreGFX::UIMgr::registerKeyHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::KeyCode | arg, | |||
OgreGFX::KeyHandler * | handler | |||
) |
Registers a KeyHandler function with the KeyLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the KeyHandler function to be called. | |
arg | The keyboard key that must be pressed to trigger the KeyHandler function to be called. | |
handler | A pointer to a KeyHandler function |
bool OgreGFX::UIMgr::registerMouseHandler | ( | const std::set< OIS::KeyCode > * | modifiers, | |
const OIS::MouseButtonID | arg, | |||
OgreGFX::MouseHandler * | handler | |||
) |
Registers a MouseHandler function with the MouseLister to be called when the modifier and arg parameters in a key event match
modifiers | A pointer to a list of modifier keys that need to be pressed for the MouseHandler function to be called. | |
arg | The mouse button that must be pressed to trigger the MouseHandler function to be called. | |
handler | A pointer to a MouseHandler function |
bool OgreGFX::UIMgr::callKeyHandlers | ( | const OIS::KeyEvent & | arg | ) |
Calls all registered key handlers that match the current key event and modifiers
arg | The key event that occurred in the last frame. |
bool OgreGFX::UIMgr::callMouseHandlers | ( | const OIS::MouseEvent & | arg, | |
const OIS::MouseButtonID | id | |||
) |
Calls all registered mouse handlers that match the current mouse event and modifiers
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::kill | ( | ) |
Destroys and cleans up all the Mgr objects used. Called when the game is exiting.
void OgreGFX::UIMgr::updateFEEngineWithSelections | ( | ) |
After the game has detected which GFXNodes have been selected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as selected.
void OgreGFX::UIMgr::clearSelectionsAndUpdateFEEngine | ( | ) |
After the game has detected which GFXNodes have been unselected, updates the engine by letting the engine know that the corresponding entity objects should also be marked as unselected.
void OgreGFX::UIMgr::printCurrentSelections | ( | ) |
Used for debugging, prints the list of entity IDs currently selected to the terminal.
void OgreGFX::UIMgr::handleSingleSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines if a mouse click should select a single GFXNode or no GFXNode, and tells the engine to mark the corresponding entity object as selected.
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::handleVolumeSelection | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
Determines the selection area defined by a mouse being clicked-and-dragged
arg | The mouse event that occurred in the last frame. | |
id | The ID of the mouse button pressed. |
void OgreGFX::UIMgr::doVolumeSelection | ( | const Ogre::Vector2 & | first, | |
const Ogre::Vector2 & | second | |||
) |
On a mouse up event, if handleSingleSelect was called in mouse down, marks GFXNodes within the marked selection as selected, and tells the engine to updated the corresponding entities as selected.
first | The start position of the mass-selection mouse click-and-drag. | |
second | The stop position of the mass-selection mouse click-and-drag. |
void OgreGFX::UIMgr::selectEntity | ( | int | index | ) |
void OgreGFX::UIMgr::decorateSelectedEntities | ( | ) |
Handles the drawing of healthbars and selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawSelectionCircles | ( | ) |
Handles the drawing selection circles, according to which GFXNodes are in the selected list.
void OgreGFX::UIMgr::drawUnderMouseCircle | ( | ) |
Handles the drawing mouse-hover circles, according to which GFXNodes beneath the mouse cursor position.
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseEvent & | arg | ) |
std::pair<int, Ogre::Vector3> OgreGFX::UIMgr::entIndexUnderMouse | ( | const OIS::MouseState & | arg | ) |
void OgreGFX::UIMgr::handleCommand | ( | const OIS::MouseEvent & | arg, | |
OIS::MouseButtonID | id | |||
) |
void OgreGFX::UIMgr::CommandMaintainAttack | ( | int | index | ) |
void OgreGFX::UIMgr::CommandGatherOrPFMove | ( | int | index | ) |
void OgreGFX::UIMgr::CommandMove | ( | Ogre::Vector3 | pos | ) |
void OgreGFX::UIMgr::CommandPotentialFieldsMove | ( | Ogre::Vector3 | pos | ) |
FastEcslent::Group* OgreGFX::UIMgr::groupFromSelections | ( | ) |
virtual void OgreGFX::UIMgr::initialize | ( | ) | [virtual] |
Reimplemented from OgreGFX::GFXMgr.
void OgreGFX::UIMgr::checkSetModifiers | ( | const OIS::KeyEvent & | arg, | |
bool | value | |||
) | [private] |
void OgreGFX::UIMgr::clearModifiersDown | ( | ) | [private] |
std::pair<bool, Ogre::Vector3> OgreGFX::UIMgr::getMouseWorldPos | ( | const OIS::MouseState & | arg | ) | [private] |
std::set<OIS::KeyCode>* OgreGFX::UIMgr::makeModifiersSet | ( | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyHash | ( | const OIS::KeyCode | ) | [private] |
std::string OgreGFX::UIMgr::modifierKeyMouseHash | ( | const OIS::MouseButtonID | ) | [private] |
Definition at line 59 of file uiMgr.h.
Referenced by decorateSelectedEntities(), frameEnded(), and UIMgr().
Ogre::RenderWindow* OgreGFX::UIMgr::renderWindow |
The set of health bars to display over units
Definition at line 61 of file uiMgr.h.
Referenced by createInputSystem(), frameRenderingQueued(), frameStarted(), kill(), UIMgr(), and windowClosed().
Ogre::SceneManager* OgreGFX::UIMgr::sceneManager |
Ogre::Root* OgreGFX::UIMgr::ogreRoot |
Ogre::Camera* OgreGFX::UIMgr::camera |
Definition at line 64 of file uiMgr.h.
Referenced by doVolumeSelection(), entIndexUnderMouse(), getMouseWorldPos(), and UIMgr().
Pointer to camera object, in uiMgr used for getting camera information needed to calculate mouses position in world space.
Definition at line 66 of file uiMgr.h.
Referenced by frameRenderingQueued(), keyPressed(), keyReleased(), kill(), mouseMoved(), and UIMgr().
OIS::InputManager* OgreGFX::UIMgr::inputManager |
Pointer to camera manager, used for handling camera movement and view
Definition at line 68 of file uiMgr.h.
Referenced by createInputSystem(), and kill().
OIS::Mouse* OgreGFX::UIMgr::mouse |
Used for creating and managing input devices, i.e. the mouse and keyboard
Definition at line 69 of file uiMgr.h.
Referenced by createInputSystem(), OgreGFX::GraphicsInteractionManager::createLobbyMgr(), entIndexUnderMouse(), frameRenderingQueued(), initialize(), kill(), mouseMoved(), windowResized(), and OgreGFX::GraphicsInteractionManager::windowResized().
OIS::Keyboard* OgreGFX::UIMgr::keyboard |
Used for getting current information about the mouse state (Buttons up/down, position)
Definition at line 70 of file uiMgr.h.
Referenced by createInputSystem(), OgreGFX::GraphicsInteractionManager::createLobbyMgr(), frameRenderingQueued(), initialize(), and kill().
Used for getting current information about the keyboard state (Buttons up/down)
Definition at line 73 of file uiMgr.h.
Referenced by checkSetModifiers(), clearModifiersDown(), keyPressed(), and makeModifiersSet().
stores if the ctrl button was pressed since the last frame
Definition at line 74 of file uiMgr.h.
Referenced by checkSetModifiers(), clearModifiersDown(), CommandGatherOrPFMove(), CommandMove(), CommandPotentialFieldsMove(), handleSingleSelection(), and makeModifiersSet().
stores if the shift button was pressed since the last frame
Definition at line 75 of file uiMgr.h.
Referenced by checkSetModifiers(), clearModifiersDown(), and makeModifiersSet().
OIS::MouseState OgreGFX::UIMgr::ms |
stores if the alt button was pressed since the last frame
Definition at line 76 of file uiMgr.h.
Referenced by createInputSystem(), entIndexUnderMouse(), getMouseWorldPos(), handleVolumeSelection(), mouseMoved(), and windowResized().
Ogre::Vector3 OgreGFX::UIMgr::posUnderMouse |
Stores the mouse state obtained from mouse since previous frame.
Definition at line 77 of file uiMgr.h.
Referenced by entIndexUnderMouse(), and UIMgr().
Definition at line 78 of file uiMgr.h.
Referenced by handleSingleSelection(), OgreGFX::FEButton::processButtonFirstEvent(), and OgreGFX::FEButton::processButtonSecondEvent().
The button that has been pressed and is waiting for a target location/entity from a mouse-click
Definition at line 80 of file uiMgr.h.
Referenced by OgreGFX::GraphicsInteractionManager::frameRenderingQueued(), keyPressed(), and UIMgr().
Ogre::RaySceneQuery* OgreGFX::UIMgr::raySceneQuery |
std::list<OgreGFX::GFXNode*> OgreGFX::UIMgr::currentSelections |
Distance limit for detecting if a mouse event should select a nearby unit
Definition at line 84 of file uiMgr.h.
Referenced by clearSelectionsAndUpdateFEEngine(), CommandGatherOrPFMove(), CommandMove(), CommandPotentialFieldsMove(), OgreGFX::ControlGroupsHandler::createControlGroup(), decorateSelectedEntities(), groupFromSelections(), printCurrentSelections(), OgreGFX::ControlGroupsHandler::selectControlGroup(), selectEntity(), and updateFEEngineWithSelections().
boost::mutex OgreGFX::UIMgr::selectionUpdateLock |
List of GFXNodes corresponding to currently selected entities
Definition at line 85 of file uiMgr.h.
Referenced by clearSelectionsAndUpdateFEEngine(), CommandMove(), and updateFEEngineWithSelections().
Definition at line 87 of file uiMgr.h.
Referenced by handleVolumeSelection(), kill(), mouseMoved(), mouseReleased(), and UIMgr().
Ogre::Vector2 OgreGFX::UIMgr::startPos |
Selection box that is visible when user clicks and drags the mouse
Definition at line 88 of file uiMgr.h.
Referenced by handleVolumeSelection(), mouseMoved(), and mouseReleased().
Ogre::Vector2 OgreGFX::UIMgr::stopPos |
Definition at line 88 of file uiMgr.h.
Referenced by handleVolumeSelection(), mouseMoved(), and mouseReleased().
Ogre::PlaneBoundedVolumeListSceneQuery* OgreGFX::UIMgr::volQuery |
Starting and stopping positions for the selection box
Definition at line 89 of file uiMgr.h.
Referenced by doVolumeSelection(), and UIMgr().
Involved in mouse-drag unit selection somehow, unclear.
Definition at line 90 of file uiMgr.h.
Referenced by handleVolumeSelection(), mouseMoved(), mouseReleased(), and UIMgr().
Definition at line 91 of file uiMgr.h.
Referenced by handleSingleSelection(), mouseMoved(), mouseReleased(), and UIMgr().
Handles macro for selecting groups of entities
Definition at line 94 of file uiMgr.h.
Referenced by initialize().
Ogre::SceneNode* OgreGFX::UIMgr::ghostUnderMouse |
Minimap object showing a miniature, to-scale map of the current level the unit positions
Definition at line 96 of file uiMgr.h.
Referenced by CreateGhostUnderMouse(), frameRenderingQueued(), GetGhostTextureRBGA(), mouseMoved(), and OgreGFX::FEButton::processButtonSecondEvent().
std::list<std::pair<std::deque<FastEcslent::Command*>, Ogre::SceneNode*> > OgreGFX::UIMgr::waitingGhosts |
Definition at line 97 of file uiMgr.h.
Referenced by frameRenderingQueued(), and OgreGFX::FEButton::processButtonSecondEvent().
std::map<std::string, std::list<OgreGFX::KeyHandler *> > OgreGFX::UIMgr::keyHandlers |
std::map<std::string, std::list<OgreGFX::MouseHandler *> > OgreGFX::UIMgr::mouseHandlers |
The list of key handler functions that have been registered
Definition at line 261 of file uiMgr.h.
Referenced by callMouseHandlers(), and registerMouseHandler().
Ogre::RenderWindow* OgreGFX::UIMgr::renderWindow |
Ogre::SceneManager* OgreGFX::UIMgr::sceneManager |
Ogre::Root* OgreGFX::UIMgr::ogreRoot |
Ogre::Camera* OgreGFX::UIMgr::camera |
OIS::InputManager* OgreGFX::UIMgr::inputManager |
OIS::Mouse* OgreGFX::UIMgr::mouse |
OIS::Keyboard* OgreGFX::UIMgr::keyboard |
Ogre::RaySceneQuery* OgreGFX::UIMgr::raySceneQuery |
std::list<OgreGFX::GFXNode*> OgreGFX::UIMgr::currentSelections |
Ogre::PlaneBoundedVolumeListSceneQuery* OgreGFX::UIMgr::volQuery |
std::map<std::string, std::list<OgreGFX::KeyHandler *> > OgreGFX::UIMgr::keyHandlers |
std::map<std::string, std::list<OgreGFX::MouseHandler *> > OgreGFX::UIMgr::mouseHandlers |
Ogre::RenderWindow* OgreGFX::UIMgr::renderWindow |
Ogre::SceneManager* OgreGFX::UIMgr::sceneManager |
Ogre::Root* OgreGFX::UIMgr::ogreRoot |
Ogre::Camera* OgreGFX::UIMgr::camera |
OIS::InputManager* OgreGFX::UIMgr::inputManager |
OIS::Mouse* OgreGFX::UIMgr::mouse |
OIS::Keyboard* OgreGFX::UIMgr::keyboard |
Ogre::RaySceneQuery* OgreGFX::UIMgr::raySceneQuery |
std::list<OgreGFX::GFXNode*> OgreGFX::UIMgr::currentSelections |
Ogre::PlaneBoundedVolumeListSceneQuery* OgreGFX::UIMgr::volQuery |
std::map<std::string, std::list<OgreGFX::KeyHandler *> > OgreGFX::UIMgr::keyHandlers |
std::map<std::string, std::list<OgreGFX::MouseHandler *> > OgreGFX::UIMgr::mouseHandlers |
Ogre::RenderWindow* OgreGFX::UIMgr::renderWindow |
Ogre::SceneManager* OgreGFX::UIMgr::sceneManager |
Ogre::Root* OgreGFX::UIMgr::ogreRoot |
Ogre::Camera* OgreGFX::UIMgr::camera |
OIS::InputManager* OgreGFX::UIMgr::inputManager |
OIS::Mouse* OgreGFX::UIMgr::mouse |
OIS::Keyboard* OgreGFX::UIMgr::keyboard |
Ogre::RaySceneQuery* OgreGFX::UIMgr::raySceneQuery |
std::list<OgreGFX::GFXNode*> OgreGFX::UIMgr::currentSelections |
Ogre::PlaneBoundedVolumeListSceneQuery* OgreGFX::UIMgr::volQuery |
std::map<std::string, std::list<OgreGFX::KeyHandler *> > OgreGFX::UIMgr::keyHandlers |
std::map<std::string, std::list<OgreGFX::MouseHandler *> > OgreGFX::UIMgr::mouseHandlers |
Ogre::RenderWindow* OgreGFX::UIMgr::renderWindow |
Ogre::SceneManager* OgreGFX::UIMgr::sceneManager |
Ogre::Root* OgreGFX::UIMgr::ogreRoot |
Ogre::Camera* OgreGFX::UIMgr::camera |
OIS::InputManager* OgreGFX::UIMgr::inputManager |
OIS::Mouse* OgreGFX::UIMgr::mouse |
OIS::Keyboard* OgreGFX::UIMgr::keyboard |
Ogre::RaySceneQuery* OgreGFX::UIMgr::raySceneQuery |
std::list<OgreGFX::GFXNode*> OgreGFX::UIMgr::currentSelections |
Ogre::PlaneBoundedVolumeListSceneQuery* OgreGFX::UIMgr::volQuery |
std::map<std::string, std::list<OgreGFX::KeyHandler *> > OgreGFX::UIMgr::keyHandlers |
std::map<std::string, std::list<OgreGFX::MouseHandler *> > OgreGFX::UIMgr::mouseHandlers |