forked from teamnwah/openmw-tes3coop
		
	Added version and revision number to mainmenu
This commit is contained in:
		
							parent
							
								
									6eaa7553f8
								
							
						
					
					
						commit
						06e02ed77f
					
				
					 3 changed files with 16 additions and 1 deletions
				
			
		|  | @ -1,5 +1,7 @@ | |||
| #include "mainmenu.hpp" | ||||
| 
 | ||||
| #include <components/version/version.hpp> | ||||
| 
 | ||||
| #include "../mwbase/environment.hpp" | ||||
| #include "../mwbase/windowmanager.hpp" | ||||
| #include "../mwbase/soundmanager.hpp" | ||||
|  | @ -20,6 +22,14 @@ namespace MWGui | |||
|         , mButtonBox(0), mWidth (w), mHeight (h) | ||||
|         , mSaveGameDialog(NULL) | ||||
|     { | ||||
|         getWidget(mVersionText, "VersionText"); | ||||
|         std::string rev =  OPENMW_VERSION_COMMITHASH; | ||||
|         rev = rev.substr(0,10); | ||||
|         std::stringstream sstream; | ||||
|         sstream << "OpenMW version: " << OPENMW_VERSION << "\nrevision: " <<  rev; | ||||
|         std::string output = sstream.str(); | ||||
|         mVersionText->setCaptionWithReplacing(output); | ||||
| 
 | ||||
|         updateMenu(); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -24,6 +24,7 @@ namespace MWGui | |||
|         private: | ||||
| 
 | ||||
|             MyGUI::Widget* mButtonBox; | ||||
| 	    MyGUI::TextBox* mVersionText; | ||||
| 
 | ||||
|             std::map<std::string, MWGui::ImageButton*> mButtons; | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,5 +2,9 @@ | |||
| 
 | ||||
| <MyGUI type="Layout"> | ||||
|     <!-- The entire screen --> | ||||
|     <Widget type="Widget" layer="Windows" position="0 0 300 300" name="_Main" /> | ||||
|     <Widget type="Widget" layer="Windows" position="0 0 300 300" name="_Main" > | ||||
|         <Widget type="TextBox" skin="SandText" position="0 250 300 50" align="Bottom" name="VersionText"> | ||||
|             <Property key="TextAlign" value="Center"/> | ||||
|         </Widget> | ||||
|     </Widget>	 | ||||
| </MyGUI> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue