File DialogBuild.h
CEGUI build dialog - header
Welcome to the new Ogre Wiki!
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
DialogBuild.h
#ifndef __DialogBuild_H__ #define __DialogBuild_H__ #include "OgreConfigFile.h" #ifndef _CEGUI_fix_h_ #define _CEGUI_fix_h_ #pragma warning (push) #pragma warning( disable : 4267 ) #include <OgreNoMemoryMacros.h> #include <CEGUI/CEGUI.h> #include <OgreCEGUIRenderer.h> #include <OgreCEGUIResourceProvider.h> #include <OgreCEGUITexture.h> #include <OgreMemoryMacros.h> #pragma warning (pop) #endif // Number of columns of buttons on the dialog. #define DIALOG_BUTTON_COLUMNS 2 // Number of rows of buttons on the dialog. #define DIALOG_BUTTON_ROWS 3 // Total number of Entity buttons on the dialog box #define DIALOG_BUTTON_COUNT (DIALOG_BUTTON_ROWS * DIALOG_BUTTON_COLUMNS) class DialogBuild : public Ogre::RenderTargetListener { public: DialogBuild(); ~DialogBuild(); void show(void); void hide(void); void toggleVisibility(); bool isVisible() const; void FrameStarted(Ogre::Real timeElapsed); protected: virtual void preRenderTargetUpdate(const Ogre::RenderTargetEvent& evt); virtual void postRenderTargetUpdate(const Ogre::RenderTargetEvent& evt); void InitializeForItemType(void); void PopulateButtons(void); private: // these must match the IDs assigned in the layout static const unsigned int buttonCancelID; static const unsigned int buttonStructuresID; static const unsigned int buttonBioUnitsID; static const unsigned int buttonMechsID; static const unsigned int buttonVehiclesID; static const unsigned int scrollBarID; static const unsigned int buttonID[DIALOG_BUTTON_COUNT]; static const unsigned int buttonLabelID[DIALOG_BUTTON_COUNT]; static const unsigned int buttonTextID[DIALOG_BUTTON_COUNT]; bool isShown; int itemTypeToDisplay; int scrollOffset; Ogre::RenderTexture* rttTex[DIALOG_BUTTON_COUNT]; Ogre::Camera * rttCam[DIALOG_BUTTON_COUNT]; Ogre::SceneNode * rttNode[DIALOG_BUTTON_COUNT]; Ogre::Entity * displayedEntity[DIALOG_BUTTON_COUNT]; Ogre::Light * spotLight[DIALOG_BUTTON_COUNT]; EntityType displayedEntityType[DIALOG_BUTTON_COUNT]; CEGUI::Scrollbar * scrollbar; Ogre::SceneNode * hideObjectsNode; CEGUI::Window * rootWindow; CEGUI::OgreCEGUITexture * ceguiTex; bool HandleKeyDownEvents(const CEGUI::EventArgs& args); bool handleScrollChanged(const CEGUI::EventArgs& args); bool handleButtonCancel(const CEGUI::EventArgs& args); bool handleButtonStructures(const CEGUI::EventArgs& args); bool handleButtonBioUnits(const CEGUI::EventArgs& args); bool handleButtonMechs(const CEGUI::EventArgs& args); bool handleButtonVehicles(const CEGUI::EventArgs& args); bool handleButton00(const CEGUI::EventArgs& args); bool handleButton01(const CEGUI::EventArgs& args); bool handleButton02(const CEGUI::EventArgs& args); bool handleButton03(const CEGUI::EventArgs& args); bool handleButton04(const CEGUI::EventArgs& args); bool handleButton05(const CEGUI::EventArgs& args); }; #endif // #ifndef __DialogBuild_H__
Contributors to this page: jacmoe
and
OgreWikiBot
.
Page last modified on Saturday 02 of January, 2010 21:22:38 UTC by jacmoe
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.
Sidebar
Search box
Online users
39
online users

