display map author if available in map header
This commit is contained in:
parent
e50e4f3007
commit
aec1e6d416
|
@ -313,6 +313,8 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
|
||||
labelMapInfo.registerGraphicComponent(containerName,"labelMapInfo");
|
||||
labelMapInfo.init(xoffset+100, mapPos-labelOffset-10, 200, 40);
|
||||
labelMapInfo.setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||
labelMapInfo.setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||
labelMapInfo.setText("?");
|
||||
|
||||
labelMap.registerGraphicComponent(containerName,"labelMap");
|
||||
|
|
|
@ -284,6 +284,8 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
|
||||
labelMapInfo.registerGraphicComponent(containerName,"labelMapInfo");
|
||||
labelMapInfo.init(xoffset+100, mapPos-labelOffset-10, 200, 40);
|
||||
labelMapInfo.setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||
labelMapInfo.setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||
|
||||
labelTileset.registerGraphicComponent(containerName,"labelTileset");
|
||||
labelTileset.init(xoffset+500, mapHeadPos);
|
||||
|
|
|
@ -1108,7 +1108,12 @@ bool MapPreview::loadMapInfo(string file, MapInfo *mapInfo, string i18nMaxMapPla
|
|||
mapInfo->players= header.maxFactions;
|
||||
|
||||
mapInfo->desc = i18nMaxMapPlayersTitle + ": " + intToStr(mapInfo->players) + "\n";
|
||||
mapInfo->desc += i18nMapSizeTitle + ": " + intToStr(mapInfo->size.x) + " x " + intToStr(mapInfo->size.y);
|
||||
mapInfo->desc += i18nMapSizeTitle + ": " + intToStr(mapInfo->size.x) + " x " + intToStr(mapInfo->size.y)+"\n";
|
||||
string author=header.author;
|
||||
if( author.length()>35){
|
||||
author=author.substr(0,35)+"...";
|
||||
}
|
||||
mapInfo->desc +=author;
|
||||
|
||||
validMap = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue