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::Entity* ent);
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; 
00153     Ogre::Vector2 MID_PANEL_SIZE;
00154     Ogre::Vector2 MID_PANEL_POS;
00155 
00156             int WIDTH;
00157             int HEIGHT;
00158             int LABEL_X_OFFSET;
00159             int LABEL_Y_OFFSET;
00160 
00161     Ogre::ColourValue LABEL_TEXT_COLOR; 
00162     Ogre::ColourValue BUTTON_OFF_TEXT_COLOR; 
00163     Ogre::ColourValue BUTTON_ON_TEXT_COLOR; 
00164             Ogre::ColourValue MENU_DEFAULT_TEXT_COLOR;
00165             Ogre::ColourValue MENU_SELECTED_TEXT_COLOR;
00166 
00167 
00168     std::string PANEL_MATERIAL; 
00169     std::string LINE_SEP_MATERIAL ;
00170     std::string MENU_MATERIAL; 
00172     bool first; 
00173     UIOutline *uiBase; 
00174     FELabel *testLabel; 
00175     FELabel *testLabel2; 
00176     FELineWrapLabel *buttonDesc; 
00177     FEPanel *testPanel; 
00178     FEPanel *buildProgressPanel; 
00179     FEPanel *buttonInfo; 
00180     FEPanel *scvMenu; 
00181     FEPanel *cmdcMenu; 
00182     FEPanel *barracksMenu; 
00183     FEPanel *factoryMenu; 
00184     FEPanel *multiMenu; 
00185     FEPanel *currMenu; 
00186     FELabelPair *testLabelPair; 
00187     FELabelPair *testLabelPair2; 
00188     FEButton *scvAtk; 
00189     FEButton *scvBuildBarracks; 
00190     FEButton *scvBuildFactory; 
00191     FEButton *scvBuildRefinery; 
00192     FEButton *scvMove; 
00193     FEButton *scvGather; 
00194     FEButton *cmdcBuildSCV; 
00195     FEButton *multiAtk; 
00196     FEButton *multiMove; 
00197     FEButton *barracksMarine; 
00198     FEButton *factoryBuildVulture; 
00199     FEButton *selectedUnit; 
00200     FELabel *unitName; 
00201     FELabel *unitHealth; 
00202     FEProgressBar* buildProgressEmpty; 
00203     FEButton *buildQueueItem1; 
00204     FEButton *buildQueueItem2; 
00205     FEButton *buildQueueItem3; 
00206     FEButton *buildQueueItem4; 
00207     FEButton *buildQueueItem5; 
00208     std::vector<FEButton*> buildQueueItems;
00209     
00210     //FEButton *buildSCV; /*! New Button to build SCVs in CommandCenter menu  */
00211         };
00212 
00213 }
00214 
00215 #endif /* WIDGETMGR_H_ */

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