Revision: 2724 http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2724&view=rev Author: ulteq Date: 2012-05-27 04:02:35 +0000 (Sun, 27 May 2012) Log Message: ----------- style++
Modified Paths: -------------- trunk/source/main/gameplay/RoRFrameListener.cpp trunk/source/main/gui/GUIFriction.h trunk/source/main/gui/GUIInputManager.h trunk/source/main/gui/GUIManager.h trunk/source/main/gui/GUIMenu.h trunk/source/main/gui/GUIMp.h trunk/source/main/gui/LoadingWindow.h Modified: trunk/source/main/gameplay/RoRFrameListener.cpp =================================================================== --- trunk/source/main/gameplay/RoRFrameListener.cpp 2012-05-27 03:29:49 UTC (rev 2723) +++ trunk/source/main/gameplay/RoRFrameListener.cpp 2012-05-27 04:02:35 UTC (rev 2724) @@ -3144,7 +3144,9 @@ if (dt>1.0/20.0) dt=1.0/20.0; rtime+=dt; //real time if (globalEnvironment->ogreRenderWindow->isClosed()) + { return false; + } // update GUI INPUTENGINE.Capture(); @@ -3154,12 +3156,11 @@ // exit frame started method when just displaying the GUI #ifdef USE_MYGUI if (LoadingWindow::getSingleton().getFrameForced()) + { return true; + } #endif //MYGUI - if (shutdownall) - return false; - if (shutdownall) // shortcut: press ESC in credits { parentState->exit(); @@ -3168,8 +3169,9 @@ // update OutProtocol if (OutProtocol::getSingletonPtr()) + { OutProtocol::getSingleton().update(dt); - + } // the truck we use got deleted D: //if (current_truck != -1 && trucks[current_truck] == 0) // BeamFactory::getSingleton().setCurrentTruck(-1); @@ -3283,16 +3285,21 @@ char tmp[256]; Real distance = 0; if (curr_truck && curr_truck->state == ACTIVATED) + { distance = curr_truck->getPosition().distance(dirArrowPointed); - else + } else + { distance = person->getPosition().distance(dirArrowPointed); + } sprintf(tmp,"%0.1f meter", distance); ow->directionArrowDistance->setCaption(tmp); } // one of the input modes is immediate, so setup what is needed for immediate mouse/key movement if (mTimeUntilNextToggle >= 0) + { mTimeUntilNextToggle -= dt; + } // one of the input modes is immediate, so update the movement vector if (loading_state==ALL_LOADED || loading_state == TERRAIN_EDITOR) Modified: trunk/source/main/gui/GUIFriction.h =================================================================== --- trunk/source/main/gui/GUIFriction.h 2012-05-27 03:29:49 UTC (rev 2723) +++ trunk/source/main/gui/GUIFriction.h 2012-05-27 04:02:35 UTC (rev 2724) @@ -19,8 +19,8 @@ */ // created by Thomas Fischer thomas{AT}thomasfischer{DOT}biz, 7th of September 2009 #ifdef USE_MYGUI -#ifndef __GUI_FRICTION_H_ -#define __GUI_FRICTION_H_ +#ifndef __GUI_Friction_H_ +#define __GUI_Friction_H_ #include "RoRPrerequisites.h" #include "Singleton.h" @@ -43,6 +43,7 @@ void setActiveCol(ground_model_t *gm); private: + MyGUI::WindowPtr win; MyGUI::WindowPtr msgwin; Collisions *col; @@ -64,5 +65,5 @@ void showHelp(Ogre::UTFString title, Ogre::UTFString msg, int x, int y); }; -#endif // __GUI_FRICTION_H_ +#endif // __GUI_Friction_H_ #endif // USE_MYGUI Modified: trunk/source/main/gui/GUIInputManager.h =================================================================== --- trunk/source/main/gui/GUIInputManager.h 2012-05-27 03:29:49 UTC (rev 2723) +++ trunk/source/main/gui/GUIInputManager.h 2012-05-27 04:02:35 UTC (rev 2724) @@ -18,8 +18,8 @@ along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>. */ #ifdef USE_MYGUI -#ifndef __GUI_INPUTMANAGER_H_ -#define __GUI_INPUTMANAGER_H_ +#ifndef __GUI_InputManager_H_ +#define __GUI_InputManager_H_ #include "RoRPrerequisites.h" @@ -29,7 +29,9 @@ class GUIInputManager { friend class InputEngine; + public: + GUIInputManager(); virtual ~GUIInputManager(); @@ -40,6 +42,7 @@ float getLastMouseMoveTime() { return lastMouseMoveTime->getMilliseconds(); }; protected: + 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); @@ -49,10 +52,11 @@ void checkPosition(); private: + int mCursorX, mCursorY, width, height; Ogre::Timer *lastMouseMoveTime; void activateGUI(); }; -#endif // __GUI_INPUTMANAGER_H_ +#endif // __GUI_InputManager_H_ #endif // USE_MYGUI Modified: trunk/source/main/gui/GUIManager.h =================================================================== --- trunk/source/main/gui/GUIManager.h 2012-05-27 03:29:49 UTC (rev 2723) +++ trunk/source/main/gui/GUIManager.h 2012-05-27 04:02:35 UTC (rev 2724) @@ -18,7 +18,6 @@ along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>. */ #ifdef USE_MYGUI - #ifndef __GUI_Manager_H_ #define __GUI_Manager_H_ @@ -67,17 +66,11 @@ void eventRequestTag(const MyGUI::UString& _tag, MyGUI::UString& _result); - -private: - MyGUI::Gui* mGUI; MyGUI::OgrePlatform* mPlatform; - - bool mExit; - Ogre::String mResourceFileName; + bool mExit; }; #endif // __GUI_Manager_H_ - #endif // USE_MYGUI Modified: trunk/source/main/gui/GUIMenu.h =================================================================== --- trunk/source/main/gui/GUIMenu.h 2012-05-27 03:29:49 UTC (rev 2723) +++ trunk/source/main/gui/GUIMenu.h 2012-05-27 04:02:35 UTC (rev 2724) @@ -66,5 +66,4 @@ }; #endif // _GUI_Menu_H_ - #endif // USE_MYGUI Modified: trunk/source/main/gui/GUIMp.h =================================================================== --- trunk/source/main/gui/GUIMp.h 2012-05-27 03:29:49 UTC (rev 2723) +++ trunk/source/main/gui/GUIMp.h 2012-05-27 04:02:35 UTC (rev 2724) @@ -20,10 +20,9 @@ // created by Thomas Fischer thomas{AT}thomasfischer{DOT}biz, 18th of July 2010 #ifdef USE_MYGUI #ifdef USE_SOCKETW +#ifndef __GUI_Mp_H_ +#define __GUI_Mp_H_ -#ifndef __GUI_MP_H_ -#define __GUI_MP_H_ - #include "RoRPrerequisites.h" #include "rornet.h" @@ -75,7 +74,6 @@ static const int sidebarWidth = 250; }; -#endif // __GUI_MP_H_ - +#endif // __GUI_Mp_H_ #endif // USE_SOCKETW #endif // USE_MYGUI Modified: trunk/source/main/gui/LoadingWindow.h =================================================================== --- trunk/source/main/gui/LoadingWindow.h 2012-05-27 03:29:49 UTC (rev 2723) +++ trunk/source/main/gui/LoadingWindow.h 2012-05-27 04:02:35 UTC (rev 2724) @@ -18,10 +18,9 @@ along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>. */ #ifdef USE_MYGUI +#ifndef __LoadingWindow_H_ +#define __LoadingWindow_H_ -#ifndef __LOADPROGRESS_H__ -#define __LOADPROGRESS_H__ - #include "RoRPrerequisites.h" #include "Singleton.h" #include "mygui/BaseLayout.h" @@ -33,9 +32,11 @@ public RoRSingleton<LoadingWindow> { friend class RoRSingleton<LoadingWindow>; + +public: + LoadingWindow(); ~LoadingWindow(); -public: void setProgress(int _percent, const Ogre::UTFString& _text = "", bool _updateRenderFrame = true); void setAutotrack(const Ogre::UTFString& _text = "", bool _updateRenderFrame = true); @@ -43,19 +44,21 @@ void hide(); bool getFrameForced(); + private: + void renderOneFrame(bool force = false); - Ogre::Timer *t; -private: + + ATTRIBUTE_FIELD_WIDGET_NAME(LoadingWindow, mBarProgress, "Bar"); MyGUI::ProgressBar* mBarProgress; ATTRIBUTE_FIELD_WIDGET_NAME(LoadingWindow, mInfoStaticText, "Info"); MyGUI::TextBox* mInfoStaticText; bool mFrameForced; + Ogre::Timer *t; }; -#endif // __LOADPROGRESS_H__ +#endif // __LoadingWindow_H_ -#endif //MYGUI - +#endif // USE_MYGUI This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Rigsofrods-devel mailing list Rigsofrods-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel