mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 04:01:47 +02:00
- added local mg version label to custom game menu
This commit is contained in:
@@ -178,8 +178,11 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||||||
int networkPos=networkHeadPos-labelOffset;
|
int networkPos=networkHeadPos-labelOffset;
|
||||||
int xoffset=10;
|
int xoffset=10;
|
||||||
|
|
||||||
|
labelLocalGameVersion.registerGraphicComponent(containerName,"labelLocalGameVersion");
|
||||||
|
labelLocalGameVersion.init(10, networkHeadPos+labelOffset);
|
||||||
|
|
||||||
labelLocalIP.registerGraphicComponent(containerName,"labelLocalIP");
|
labelLocalIP.registerGraphicComponent(containerName,"labelLocalIP");
|
||||||
labelLocalIP.init(210, networkHeadPos+labelOffset);
|
labelLocalIP.init(360, networkHeadPos+labelOffset);
|
||||||
|
|
||||||
string ipText = "none";
|
string ipText = "none";
|
||||||
std::vector<std::string> ipList = Socket::getLocalIPAddressList();
|
std::vector<std::string> ipList = Socket::getLocalIPAddressList();
|
||||||
@@ -198,6 +201,13 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||||||
labelLocalIP.setText(lang.get("LanIP") + ipText + " ( "+serverPort+" / "+externalPort+" )");
|
labelLocalIP.setText(lang.get("LanIP") + ipText + " ( "+serverPort+" / "+externalPort+" )");
|
||||||
ServerSocket::setExternalPort(strToInt(externalPort));
|
ServerSocket::setExternalPort(strToInt(externalPort));
|
||||||
|
|
||||||
|
if(EndsWith(glestVersionString, "-dev") == false){
|
||||||
|
labelLocalGameVersion.setText(glestVersionString);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
labelLocalGameVersion.setText(glestVersionString + " [" + getCompileDateTime() + ", " + getSVNRevisionString() + "]");
|
||||||
|
}
|
||||||
|
|
||||||
xoffset=70;
|
xoffset=70;
|
||||||
// MapFilter
|
// MapFilter
|
||||||
labelMapFilter.registerGraphicComponent(containerName,"labelMapFilter");
|
labelMapFilter.registerGraphicComponent(containerName,"labelMapFilter");
|
||||||
@@ -677,6 +687,14 @@ void MenuStateCustomGame::reloadUI() {
|
|||||||
console.resetFonts();
|
console.resetFonts();
|
||||||
mainMessageBox.init(lang.get("Ok"));
|
mainMessageBox.init(lang.get("Ok"));
|
||||||
|
|
||||||
|
|
||||||
|
if(EndsWith(glestVersionString, "-dev") == false){
|
||||||
|
labelLocalGameVersion.setText(glestVersionString);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
labelLocalGameVersion.setText(glestVersionString + " [" + getCompileDateTime() + ", " + getSVNRevisionString() + "]");
|
||||||
|
}
|
||||||
|
|
||||||
vector<string> teamItems, controlItems, results , rMultiplier;
|
vector<string> teamItems, controlItems, results , rMultiplier;
|
||||||
|
|
||||||
string ipText = "none";
|
string ipText = "none";
|
||||||
@@ -1836,6 +1854,8 @@ void MenuStateCustomGame::render() {
|
|||||||
renderer.renderLabel(&labelNetStatus[i]);
|
renderer.renderLabel(&labelNetStatus[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderer.renderLabel(&labelLocalGameVersion);
|
||||||
renderer.renderLabel(&labelLocalIP);
|
renderer.renderLabel(&labelLocalIP);
|
||||||
renderer.renderLabel(&labelMap);
|
renderer.renderLabel(&labelMap);
|
||||||
|
|
||||||
|
@@ -51,6 +51,7 @@ private:
|
|||||||
GraphicLabel labelMapInfo;
|
GraphicLabel labelMapInfo;
|
||||||
//GraphicLabel labelEnableObserverMode;
|
//GraphicLabel labelEnableObserverMode;
|
||||||
//GraphicLabel labelEnableServerControlledAI;
|
//GraphicLabel labelEnableServerControlledAI;
|
||||||
|
GraphicLabel labelLocalGameVersion;
|
||||||
GraphicLabel labelLocalIP;
|
GraphicLabel labelLocalIP;
|
||||||
GraphicLabel labelGameName;
|
GraphicLabel labelGameName;
|
||||||
GraphicLabel labelGameNameLabel;
|
GraphicLabel labelGameNameLabel;
|
||||||
|
@@ -2013,11 +2013,6 @@ void Faction::loadGame(const XmlNode *rootNode, int factionIndex,GameSettings *s
|
|||||||
|
|
||||||
// Allies allies;
|
// Allies allies;
|
||||||
allies.clear();
|
allies.clear();
|
||||||
// for(unsigned int i = 0; i < allies.size(); ++i) {
|
|
||||||
// Faction *ally = allies[i];
|
|
||||||
// XmlNode *allyNode = factionNode->addChild("Ally");
|
|
||||||
// allyNode->addAttribute("allyFactionIndex",intToStr(ally->getIndex()), mapTagReplacements);
|
|
||||||
// }
|
|
||||||
vector<XmlNode *> allyNodeList = factionNode->getChildList("Ally");
|
vector<XmlNode *> allyNodeList = factionNode->getChildList("Ally");
|
||||||
for(unsigned int i = 0; i < allyNodeList.size(); ++i) {
|
for(unsigned int i = 0; i < allyNodeList.size(); ++i) {
|
||||||
XmlNode *allyNode = allyNodeList[i];
|
XmlNode *allyNode = allyNodeList[i];
|
||||||
|
Reference in New Issue
Block a user