widgetMgr.h

Go to the documentation of this file.
00001 /*
00002  * widgetMgr.h
00003  *
00004  *  Created on: Jan 7, 2013
00005  *      Author: sushil
00006  */
00007 
00008 #ifndef WIDGETMGR_H_
00009 #define WIDGETMGR_H_
00010 
00011 #include <OgreFrameListener.h>
00012 #include <OgreWindowEventUtilities.h>
00013 #include <OgreVector2.h>
00014 #include <OgreColourValue.h>
00015 
00016 #include <OISEvents.h>
00017 #include <OISInputManager.h>
00018 #include <OISKeyboard.h>
00019 #include <OISMouse.h>
00020 
00021 #include <gfxMgr.h>
00022 #include <widgets.h>
00023 #include "enums.h"
00024 
00025 namespace OgreGFX
00026 {
00027 
00028         class GraphicsInteractionManager;
00029 
00034 class WidgetMgr : public GFXMgr, public Ogre::FrameListener, public Ogre::WindowEventListener, public OIS::KeyListener, public OIS::MouseListener
00035 {
00036         public:
00042                 WidgetMgr(GraphicsInteractionManager *gim);
00043                 ~WidgetMgr();
00044 
00045 
00052             virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);
00058             virtual bool frameStarted(const Ogre::FrameEvent& evt);
00064             virtual bool frameEnded(const Ogre::FrameEvent& evt);
00065 
00066 
00067             // OIS::KeyListener
00073     virtual bool keyPressed(const OIS::KeyEvent &arg);
00074     // OIS::KeyListener
00080     virtual bool keyReleased(const OIS::KeyEvent &arg);
00081             // OIS::MouseListener
00087     virtual bool mouseMoved(const OIS::MouseEvent &arg);
00094     virtual bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
00101     virtual bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
00107     virtual void activateMenu(FastEcslent::EntityType type);
00112     virtual void deactivateMenu();
00118     virtual bool mouseOverOverlay(const OIS::MouseEvent &arg);
00124     virtual bool mouseOverButton(const OIS::MouseEvent &arg);
00125 
00126     int nextId; 
00127             //std::stringstream idStream; // no need to allocated it every time getNextId is called
00128 
00134             std::string getNextId(std::string base);
00135 
00136 
00142     virtual void initialize(); // in gfxMgr;
00143 
00144 
00145             //Defaults
00146     Ogre::Vector2 POS; 
00147     Ogre::Vector2 LABEL_SIZE; 
00148     Ogre::Vector2 PANEL_SIZE; 
00149     Ogre::Vector2 MENU_ITEM_SIZE; 
00150     Ogre::Vector2 BUTTON_SIZE; 
00151     Ogre::Vector2 COMMANDPANEL_POS; 
00152     Ogre::Vector2 MENU_SIZE; 
00154             int WIDTH;
00155             int HEIGHT;
00156             int LABEL_X_OFFSET;
00157             int LABEL_Y_OFFSET;
00158 
00159     Ogre::ColourValue LABEL_TEXT_COLOR; 
00160     Ogre::ColourValue BUTTON_OFF_TEXT_COLOR; 
00161     Ogre::ColourValue BUTTON_ON_TEXT_COLOR; 
00162             Ogre::ColourValue MENU_DEFAULT_TEXT_COLOR;
00163             Ogre::ColourValue MENU_SELECTED_TEXT_COLOR;
00164 
00165 
00166     std::string PANEL_MATERIAL; 
00167     std::string LINE_SEP_MATERIAL ;
00168     std::string MENU_MATERIAL; 
00170     bool first; 
00171     UIOutline *uiBase; 
00172     FELabel *testLabel; 
00173     FELabel *testLabel2; 
00174     FELabel *buttonDesc; 
00175     FEPanel *testPanel; 
00176     FEPanel *buttonInfo; 
00177     FEPanel *scvMenu; 
00178     FEPanel *cmdcMenu; 
00179     FEPanel *barracksMenu; 
00180     FEPanel *multiMenu; 
00181     FEPanel *currMenu; 
00182     FELabelPair *testLabelPair; 
00183     FELabelPair *testLabelPair2; 
00184     FEButton *scvAtk; 
00185     FEButton *scvMove; 
00186     FEButton *scvGather; 
00187     FESCVButton *cmdcBuildSCV; 
00188     FEButton *multiAtk; 
00189     FEButton *multiMove; 
00190     FEMarineButton *barracksMarine; 
00191         };
00192 
00193 }
00194 
00195 #endif /* WIDGETMGR_H_ */

Generated on Fri Dec 13 14:54:16 2013 for FastECSLent by  doxygen 1.5.4