1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00

Merge remote-tracking branch 'gsedej/master'

This commit is contained in:
Marc Zinnschlag 2014-03-15 13:53:05 +01:00
commit 2fdf80bcbf
3 changed files with 24 additions and 1 deletions

View File

@ -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,22 @@ namespace MWGui
, mButtonBox(0), mWidth (w), mHeight (h)
, 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();
}

View File

@ -24,6 +24,7 @@ namespace MWGui
private:
MyGUI::Widget* mButtonBox;
MyGUI::TextBox* mVersionText;
std::map<std::string, MWGui::ImageButton*> mButtons;

View File

@ -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>