mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-26 14:56:39 +00:00 
			
		
		
		
	Merge remote-tracking branch 'gsedej/master'
This commit is contained in:
		
						commit
						2fdf80bcbf
					
				
					 3 changed files with 24 additions and 1 deletions
				
			
		|  | @ -1,5 +1,7 @@ | ||||||
| #include "mainmenu.hpp" | #include "mainmenu.hpp" | ||||||
| 
 | 
 | ||||||
|  | #include <components/version/version.hpp> | ||||||
|  | 
 | ||||||
| #include "../mwbase/environment.hpp" | #include "../mwbase/environment.hpp" | ||||||
| #include "../mwbase/windowmanager.hpp" | #include "../mwbase/windowmanager.hpp" | ||||||
| #include "../mwbase/soundmanager.hpp" | #include "../mwbase/soundmanager.hpp" | ||||||
|  | @ -20,6 +22,22 @@ namespace MWGui | ||||||
|         , mButtonBox(0), mWidth (w), mHeight (h) |         , mButtonBox(0), mWidth (w), mHeight (h) | ||||||
|         , mSaveGameDialog(NULL) |         , mSaveGameDialog(NULL) | ||||||
|     { |     { | ||||||
|  |         getWidget(mVersionText, "VersionText"); | ||||||
|  |         std::stringstream sstream; | ||||||
|  |         sstream << "OpenMW version: " << OPENMW_VERSION; | ||||||
|  | 
 | ||||||
|  |         // adding info about git hash if availible
 | ||||||
|  |         std::string rev = OPENMW_VERSION_COMMITHASH; | ||||||
|  |         std::string tag = OPENMW_VERSION_TAGHASH; | ||||||
|  |         if (!rev.empty() && !tag.empty()) | ||||||
|  |         { | ||||||
|  |                 rev = rev.substr(0,10); | ||||||
|  |                 sstream << "\nrevision: " <<  rev; | ||||||
|  |         } | ||||||
|  |          | ||||||
|  |         std::string output = sstream.str(); | ||||||
|  |         mVersionText->setCaption(output); | ||||||
|  | 
 | ||||||
|         updateMenu(); |         updateMenu(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -24,6 +24,7 @@ namespace MWGui | ||||||
|         private: |         private: | ||||||
| 
 | 
 | ||||||
|             MyGUI::Widget* mButtonBox; |             MyGUI::Widget* mButtonBox; | ||||||
|  |             MyGUI::TextBox* mVersionText; | ||||||
| 
 | 
 | ||||||
|             std::map<std::string, MWGui::ImageButton*> mButtons; |             std::map<std::string, MWGui::ImageButton*> mButtons; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2,5 +2,9 @@ | ||||||
| 
 | 
 | ||||||
| <MyGUI type="Layout"> | <MyGUI type="Layout"> | ||||||
|     <!-- The entire screen --> |     <!-- 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> | </MyGUI> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue