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:
commit
2fdf80bcbf
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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 New Issue
Block a user