Merge pull request #55 from filux/feature/nicer-appearance-after-translations
game more friendly for other than english languages 2/2
This commit is contained in:
commit
e94ddee69c
|
@ -191,7 +191,7 @@ string getNetworkVersionString() {
|
|||
string getNetworkVersionGITString() {
|
||||
static string version = "";
|
||||
if(version == "") {
|
||||
version = glestVersionString + "-" + getCompilerNameString() + "-" + getGITRevisionString();
|
||||
version = glestVersionString + "-" + getGITRevisionString() + "-" + getCompilerNameString();
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ void Logger::renderLoadingScreen() {
|
|||
metrics.getVirtualW() / 4,
|
||||
59 * metrics.getVirtualH() / 100,
|
||||
coreData.getDisplayFontSmall3D(),
|
||||
350,""); // no string here, because it has to be language specific and does not give much information
|
||||
500,""); // no string here, because it has to be language specific and does not give much information
|
||||
}
|
||||
else {
|
||||
renderer.renderProgressBar(
|
||||
|
@ -229,7 +229,7 @@ void Logger::renderLoadingScreen() {
|
|||
metrics.getVirtualW() / 4,
|
||||
59 * metrics.getVirtualH() / 100,
|
||||
coreData.getDisplayFontSmall(),
|
||||
350,""); // no string here, because it has to be language specific and does not give much information
|
||||
500,""); // no string here, because it has to be language specific and does not give much information
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ void Logger::renderLoadingScreen() {
|
|||
}
|
||||
//Show next Hint
|
||||
if(buttonNextHint.getEnabled() == false) {
|
||||
buttonNextHint.init((metrics.getVirtualW() / 2) - (300 / 2), 90 * metrics.getVirtualH() / 100 + 20,175);
|
||||
buttonNextHint.init((metrics.getVirtualW() / 2) - (175 / 2), 90 * metrics.getVirtualH() / 100 + 20, 175);
|
||||
buttonNextHint.setText(lang.getString("ShowNextHint","",true));
|
||||
buttonNextHint.setEnabled(true);
|
||||
buttonNextHint.setVisible(true);
|
||||
|
|
|
@ -39,9 +39,9 @@ ChatManager::ChatManager() {
|
|||
teamMode= false;
|
||||
thisTeamIndex= -1;
|
||||
disableTeamMode = false;
|
||||
xPos=300;
|
||||
yPos=150;
|
||||
maxTextLenght=64;
|
||||
xPos=75;
|
||||
yPos=155;
|
||||
maxTextLenght=90;
|
||||
textCharLength.clear();
|
||||
text="";
|
||||
font=CoreData::getInstance().getConsoleFont();
|
||||
|
|
|
@ -1691,37 +1691,37 @@ void Game::setupPopupMenus(bool checkClientAdminOverrideOnly) {
|
|||
}
|
||||
//PopupMenu popupMenu;
|
||||
std::vector<string> menuItems;
|
||||
menuItems.push_back(lang.getString("ExitGameMenu?"));
|
||||
menuItems.push_back(" " + lang.getString("ExitGameMenu") + " ");
|
||||
exitGamePopupMenuIndex = (int)menuItems.size()-1;
|
||||
|
||||
if((gameSettings.getFlagTypes1() & ft1_allow_team_switching) == ft1_allow_team_switching &&
|
||||
world.getThisFaction() != NULL && world.getThisFaction()->getPersonalityType() != fpt_Observer) {
|
||||
menuItems.push_back(lang.getString("JoinOtherTeam"));
|
||||
menuItems.push_back(" " + lang.getString("JoinOtherTeam") + " ");
|
||||
joinTeamPopupMenuIndex = (int)menuItems.size()-1;
|
||||
}
|
||||
|
||||
if(allowAdminMenuItems == true){
|
||||
menuItems.push_back(lang.getString("PauseResumeGame"));
|
||||
menuItems.push_back(" " + lang.getString("PauseResumeGame") + " ");
|
||||
pauseGamePopupMenuIndex= (int)menuItems.size() - 1;
|
||||
|
||||
if(gameSettings.isNetworkGame() == false || gameSettings.getScenario() != "") {
|
||||
menuItems.push_back(lang.getString("SaveGame"));
|
||||
menuItems.push_back(" " + lang.getString("SaveGame") + " ");
|
||||
saveGamePopupMenuIndex= (int)menuItems.size() - 1;
|
||||
}
|
||||
|
||||
if(gameSettings.isNetworkGame() == true) {
|
||||
menuItems.push_back(lang.getString("DisconnectNetorkPlayer"));
|
||||
menuItems.push_back(" " + lang.getString("DisconnectNetorkPlayer") + " ");
|
||||
disconnectPlayerPopupMenuIndex= (int)menuItems.size() - 1;
|
||||
}
|
||||
}
|
||||
menuItems.push_back(lang.getString("Keyboardsetup"));
|
||||
menuItems.push_back(" " + lang.getString("KeyboardsetupL") + " ");
|
||||
keyboardSetupPopupMenuIndex = (int)menuItems.size()-1;
|
||||
|
||||
menuItems.push_back(lang.getString("Cancel"));
|
||||
menuItems.push_back(" " + lang.getString("Cancel") + " ");
|
||||
|
||||
popupMenu.setW(100);
|
||||
popupMenu.setH(100);
|
||||
popupMenu.init(lang.getString("GameMenuTitle"),menuItems);
|
||||
popupMenu.init(" " + lang.getString("GameMenuTitle") + " ",menuItems);
|
||||
popupMenu.setEnabled(false);
|
||||
popupMenu.setVisible(false);
|
||||
|
||||
|
@ -3717,7 +3717,7 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
|
||||
// Exit game
|
||||
if(result.first == exitGamePopupMenuIndex) {
|
||||
showMessageBox(Lang::getInstance().getString("ExitGameMenu?"), "", true);
|
||||
showMessageBox(Lang::getInstance().getString("ExitBattleQuestion"), "", true);
|
||||
}
|
||||
else if(result.first == joinTeamPopupMenuIndex) {
|
||||
|
||||
|
@ -3738,10 +3738,10 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
world.getThisFaction()->getTeam() != faction->getTeam()) {
|
||||
char szBuf[8096]="";
|
||||
if(lang.hasString("JoinPlayerTeam") == true) {
|
||||
snprintf(szBuf,8096,lang.getString("JoinPlayerTeam").c_str(),faction->getIndex(),this->gameSettings.getNetworkPlayerName(i).c_str(),faction->getTeam());
|
||||
snprintf(szBuf,8096,(" " + lang.getString("JoinPlayerTeam") + " ").c_str(),faction->getIndex(),this->gameSettings.getNetworkPlayerName(i).c_str(),faction->getTeam());
|
||||
}
|
||||
else {
|
||||
snprintf(szBuf,8096,"Join player #%d - %s on Team: %d",faction->getIndex(),this->gameSettings.getNetworkPlayerName(i).c_str(),faction->getTeam());
|
||||
snprintf(szBuf,8096," Join player #%d - %s on Team: %d ",faction->getIndex(),this->gameSettings.getNetworkPlayerName(i).c_str(),faction->getTeam());
|
||||
}
|
||||
|
||||
menuItems.push_back(szBuf);
|
||||
|
@ -3751,15 +3751,15 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
}
|
||||
|
||||
if((int)uniqueTeamNumbersUsed.size() < 8) {
|
||||
menuItems.push_back(lang.getString("CreateNewTeam"));
|
||||
menuItems.push_back(" " + lang.getString("CreateNewTeam") + " ");
|
||||
switchTeamIndexMap[(int)menuItems.size()-1] = CREATE_NEW_TEAM;
|
||||
}
|
||||
menuItems.push_back(lang.getString("Cancel"));
|
||||
menuItems.push_back(" " + lang.getString("Cancel") + " ");
|
||||
switchTeamIndexMap[(int)menuItems.size()-1] = CANCEL_SWITCH_TEAM;
|
||||
|
||||
popupMenuSwitchTeams.setW(100);
|
||||
popupMenuSwitchTeams.setH(100);
|
||||
popupMenuSwitchTeams.init(lang.getString("SwitchTeams"),menuItems);
|
||||
popupMenuSwitchTeams.init(" " + lang.getString("SwitchTeams") + " ",menuItems);
|
||||
popupMenuSwitchTeams.setEnabled(true);
|
||||
popupMenuSwitchTeams.setVisible(true);
|
||||
}
|
||||
|
@ -3801,10 +3801,10 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
|
||||
char szBuf[8096]="";
|
||||
if(lang.hasString("DisconnectNetorkPlayerIndex") == true) {
|
||||
snprintf(szBuf,8096,lang.getString("DisconnectNetorkPlayerIndex").c_str(),faction->getIndex()+1,this->gameSettings.getNetworkPlayerName(i).c_str());
|
||||
snprintf(szBuf,8096,(" " + lang.getString("DisconnectNetorkPlayerIndex") + " ").c_str(),faction->getIndex()+1,this->gameSettings.getNetworkPlayerName(i).c_str());
|
||||
}
|
||||
else {
|
||||
snprintf(szBuf,8096,"Disconnect player #%d - %s:",faction->getIndex()+1,this->gameSettings.getNetworkPlayerName(i).c_str());
|
||||
snprintf(szBuf,8096," Disconnect player #%d - %s: ",faction->getIndex()+1,this->gameSettings.getNetworkPlayerName(i).c_str());
|
||||
}
|
||||
|
||||
menuItems.push_back(szBuf);
|
||||
|
@ -3814,12 +3814,12 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
}
|
||||
}
|
||||
|
||||
menuItems.push_back(lang.getString("Cancel"));
|
||||
menuItems.push_back(" " + lang.getString("Cancel") + " ");
|
||||
disconnectPlayerIndexMap[(int)menuItems.size()-1] = CANCEL_DISCONNECT_PLAYER;
|
||||
|
||||
popupMenuDisconnectPlayer.setW(100);
|
||||
popupMenuDisconnectPlayer.setH(100);
|
||||
popupMenuDisconnectPlayer.init(lang.getString("DisconnectNetorkPlayer"),menuItems);
|
||||
popupMenuDisconnectPlayer.init(" " + lang.getString("DisconnectNetorkPlayer") + " ",menuItems);
|
||||
popupMenuDisconnectPlayer.setEnabled(true);
|
||||
popupMenuDisconnectPlayer.setVisible(true);
|
||||
}
|
||||
|
@ -3942,10 +3942,10 @@ void Game::mouseDownLeft(int x, int y) {
|
|||
|
||||
char szBuf[8096]="";
|
||||
if(lang.hasString("DisconnectNetorkPlayerIndexConfirm") == true) {
|
||||
snprintf(szBuf,8096,lang.getString("DisconnectNetorkPlayerIndexConfirm").c_str(),factionIndex+1,settings->getNetworkPlayerName(factionIndex).c_str());
|
||||
snprintf(szBuf,8096,(" " + lang.getString("DisconnectNetorkPlayerIndexConfirm") + " ").c_str(),factionIndex+1,settings->getNetworkPlayerName(factionIndex).c_str());
|
||||
}
|
||||
else {
|
||||
snprintf(szBuf,8096,"Confirm disconnection for player #%d - %s?",factionIndex+1,settings->getNetworkPlayerName(factionIndex).c_str());
|
||||
snprintf(szBuf,8096," Confirm disconnection for player #%d - %s? ",factionIndex+1,settings->getNetworkPlayerName(factionIndex).c_str());
|
||||
}
|
||||
|
||||
disconnectPlayerConfirmMessageBox.setText(szBuf);
|
||||
|
@ -6225,10 +6225,10 @@ void Game::showLoseMessageBox() {
|
|||
|
||||
NetworkManager &networkManager= NetworkManager::getInstance();
|
||||
if(networkManager.isNetworkGame() == true && networkManager.getNetworkRole() == nrServer) {
|
||||
showMessageBox(lang.getString("YouLose")+" "+lang.getString("ExitGameServer?"), lang.getString("BattleOver"), false);
|
||||
showMessageBox(lang.getString("YouLose")+" "+lang.getString("ExitBattleServerQuestion"), lang.getString("BattleOver"), false);
|
||||
}
|
||||
else {
|
||||
showMessageBox(lang.getString("YouLose")+" "+lang.getString("ExitGameMenu?"), lang.getString("BattleOver"), false);
|
||||
showMessageBox(lang.getString("YouLose")+" "+lang.getString("ExitBattleQuestion"), lang.getString("BattleOver"), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6236,10 +6236,10 @@ void Game::showWinMessageBox() {
|
|||
Lang &lang= Lang::getInstance();
|
||||
|
||||
if(this->masterserverMode == true || world.getThisFaction()->getPersonalityType() == fpt_Observer) {
|
||||
showMessageBox(lang.getString("GameOver")+" "+lang.getString("ExitGameMenu?"), lang.getString("BattleOver"), false);
|
||||
showMessageBox(lang.getString("GameOver")+" "+lang.getString("ExitBattleQuestion"), lang.getString("BattleOver"), false);
|
||||
}
|
||||
else {
|
||||
showMessageBox(lang.getString("YouWin")+" "+lang.getString("ExitGameMenu?"), lang.getString("BattleOver"), false);
|
||||
showMessageBox(lang.getString("YouWin")+" "+lang.getString("ExitBattleQuestion"), lang.getString("BattleOver"), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ void TimerTriggerEvent::loadGame(const XmlNode *rootNode) {
|
|||
// class ScriptManager
|
||||
// =====================================================
|
||||
ScriptManager* ScriptManager::thisScriptManager = NULL;
|
||||
const int ScriptManager::messageWrapCount = 30;
|
||||
const int ScriptManager::messageWrapCount = 35;
|
||||
const int ScriptManager::displayTextWrapCount = 64;
|
||||
|
||||
ScriptManager::ScriptManager() {
|
||||
|
|
|
@ -2248,7 +2248,7 @@ void Renderer::renderChatManager(const ChatManager *chatManager) {
|
|||
else
|
||||
{
|
||||
if (chatManager->getInMenu()) {
|
||||
string text = ">> "+lang.getString("PressEnterToChat")+" <<";
|
||||
string text = "\t\t\t\t\t>> "+lang.getString("PressEnterToChat")+" <<";
|
||||
fontColor = Vec4f(0.5f, 0.5f, 0.5f, 0.5f);
|
||||
|
||||
if(renderText3DEnabled == true) {
|
||||
|
@ -6588,7 +6588,7 @@ void Renderer::renderDisplay() {
|
|||
display->getProgressBar(),
|
||||
metrics.getDisplayX(),
|
||||
metrics.getDisplayY() + metrics.getDisplayH()-50,
|
||||
coreData.getDisplayFontSmall3D());
|
||||
coreData.getDisplayFontSmall3D(), 175);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -8927,7 +8927,7 @@ Renderer::Shadows Renderer::strToShadows(const string &s){
|
|||
string Renderer::shadowsToStr(Shadows shadows){
|
||||
switch(shadows){
|
||||
case sDisabled:
|
||||
return "Disabled";
|
||||
return "Disabled2";
|
||||
case sProjected:
|
||||
return "Projected";
|
||||
case sShadowMapping:
|
||||
|
|
|
@ -587,7 +587,7 @@ void BattleEnd::render() {
|
|||
|
||||
Vec3f color = stats.getPlayerColor(i);
|
||||
if(stats.getPlayerName(i) != "") {
|
||||
string textToRender=stats.getPlayerName(i);
|
||||
string textToRender=stats.getPlayerName(i).substr(0,11);
|
||||
if(stats.getPlayerLeftBeforeEnd(i)==true){
|
||||
textToRender+="\n("+getTimeDuationString(stats.getTimePlayerLeft(i),GameConstants::updateFps) + ")";
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ MenuStateAbout::MenuStateAbout(Program *program, MainMenu *mainMenu) :
|
|||
|
||||
//init
|
||||
buttonReturn.registerGraphicComponent(containerName, "buttonReturn");
|
||||
buttonReturn.init(460, 100, 125);
|
||||
buttonReturn.init(438, 100, 125);
|
||||
buttonReturn.setText(lang.getString("Return"));
|
||||
|
||||
labelAdditionalCredits.registerGraphicComponent(containerName, "labelAdditionalCredits");
|
||||
|
|
|
@ -198,37 +198,14 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
labelDataSynchInfo.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelDataSynchInfo.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
|
||||
// fog - o - war
|
||||
int xoffset=70;
|
||||
labelFogOfWar.registerGraphicComponent(containerName,"labelFogOfWar");
|
||||
labelFogOfWar.init(xoffset+100, aHeadPos, 130);
|
||||
labelFogOfWar.setText(lang.getString("FogOfWar"));
|
||||
|
||||
listBoxFogOfWar.registerGraphicComponent(containerName,"listBoxFogOfWar");
|
||||
listBoxFogOfWar.init(xoffset+100, aPos, 150);
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Enabled"));
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Explored"));
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Disabled"));
|
||||
listBoxFogOfWar.setSelectedItemIndex(0);
|
||||
listBoxFogOfWar.setEditable(false);
|
||||
|
||||
|
||||
labelAllowObservers.registerGraphicComponent(containerName,"labelAllowObservers");
|
||||
labelAllowObservers.init(xoffset+310, aHeadPos, 80);
|
||||
labelAllowObservers.setText(lang.getString("AllowObservers"));
|
||||
|
||||
checkBoxAllowObservers.registerGraphicComponent(containerName,"checkBoxAllowObservers");
|
||||
checkBoxAllowObservers.init(xoffset+310, aPos);
|
||||
checkBoxAllowObservers.setValue(false);
|
||||
checkBoxAllowObservers.setEditable(false);
|
||||
|
||||
int xoffset=90;
|
||||
labelAllowTeamUnitSharing.registerGraphicComponent(containerName,"labelAllowTeamUnitSharing");
|
||||
labelAllowTeamUnitSharing.init(xoffset+410, 670, 80);
|
||||
labelAllowTeamUnitSharing.setText(lang.getString("AllowTeamUnitSharing"));
|
||||
labelAllowTeamUnitSharing.setVisible(true);
|
||||
|
||||
checkBoxAllowTeamUnitSharing.registerGraphicComponent(containerName,"checkBoxAllowTeamUnitSharing");
|
||||
checkBoxAllowTeamUnitSharing.init(xoffset+600, 670);
|
||||
checkBoxAllowTeamUnitSharing.init(xoffset+612, 670);
|
||||
checkBoxAllowTeamUnitSharing.setValue(false);
|
||||
checkBoxAllowTeamUnitSharing.setVisible(true);
|
||||
checkBoxAllowTeamUnitSharing.setEditable(false);
|
||||
|
@ -239,41 +216,64 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
labelAllowTeamResourceSharing.setVisible(true);
|
||||
|
||||
checkBoxAllowTeamResourceSharing.registerGraphicComponent(containerName,"checkBoxAllowTeamResourceSharing");
|
||||
checkBoxAllowTeamResourceSharing.init(xoffset+600, 640);
|
||||
checkBoxAllowTeamResourceSharing.init(xoffset+612, 640);
|
||||
checkBoxAllowTeamResourceSharing.setValue(false);
|
||||
checkBoxAllowTeamResourceSharing.setVisible(true);
|
||||
checkBoxAllowTeamResourceSharing.setEditable(false);
|
||||
|
||||
// fog - o - war
|
||||
xoffset=65;
|
||||
labelFogOfWar.registerGraphicComponent(containerName,"labelFogOfWar");
|
||||
labelFogOfWar.init(xoffset+100, aHeadPos, 165);
|
||||
labelFogOfWar.setText(lang.getString("FogOfWar"));
|
||||
|
||||
listBoxFogOfWar.registerGraphicComponent(containerName,"listBoxFogOfWar");
|
||||
listBoxFogOfWar.init(xoffset+100, aPos, 165);
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Enabled"));
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Explored"));
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Disabled"));
|
||||
listBoxFogOfWar.setSelectedItemIndex(0);
|
||||
listBoxFogOfWar.setEditable(false);
|
||||
|
||||
labelAllowObservers.registerGraphicComponent(containerName,"labelAllowObservers");
|
||||
labelAllowObservers.init(xoffset+325, aHeadPos, 80);
|
||||
labelAllowObservers.setText(lang.getString("AllowObservers"));
|
||||
|
||||
checkBoxAllowObservers.registerGraphicComponent(containerName,"checkBoxAllowObservers");
|
||||
checkBoxAllowObservers.init(xoffset+325, aPos);
|
||||
checkBoxAllowObservers.setValue(false);
|
||||
checkBoxAllowObservers.setEditable(false);
|
||||
|
||||
for(int i=0; i<45; ++i){
|
||||
rMultiplier.push_back(floatToStr(0.5f+0.1f*i,1));
|
||||
}
|
||||
|
||||
labelFallbackCpuMultiplier.registerGraphicComponent(containerName,"labelFallbackCpuMultiplier");
|
||||
labelFallbackCpuMultiplier.init(xoffset+460, aHeadPos, 80);
|
||||
labelFallbackCpuMultiplier.init(xoffset+500, aHeadPos, 80);
|
||||
labelFallbackCpuMultiplier.setText(lang.getString("FallbackCpuMultiplier"));
|
||||
|
||||
listBoxFallbackCpuMultiplier.registerGraphicComponent(containerName,"listBoxFallbackCpuMultiplier");
|
||||
listBoxFallbackCpuMultiplier.init(xoffset+460, aPos, 80);
|
||||
listBoxFallbackCpuMultiplier.init(xoffset+500, aPos, 80);
|
||||
listBoxFallbackCpuMultiplier.setItems(rMultiplier);
|
||||
listBoxFallbackCpuMultiplier.setSelectedItem("1.0");
|
||||
|
||||
|
||||
// Allow Switch Team Mode
|
||||
labelEnableSwitchTeamMode.registerGraphicComponent(containerName,"labelEnableSwitchTeamMode");
|
||||
labelEnableSwitchTeamMode.init(xoffset+310, aHeadPos+45, 80);
|
||||
labelEnableSwitchTeamMode.init(xoffset+325, aHeadPos+45, 80);
|
||||
labelEnableSwitchTeamMode.setText(lang.getString("EnableSwitchTeamMode"));
|
||||
|
||||
checkBoxEnableSwitchTeamMode.registerGraphicComponent(containerName,"checkBoxEnableSwitchTeamMode");
|
||||
checkBoxEnableSwitchTeamMode.init(xoffset+310, aPos+45);
|
||||
checkBoxEnableSwitchTeamMode.init(xoffset+325, aPos+45);
|
||||
checkBoxEnableSwitchTeamMode.setValue(false);
|
||||
checkBoxEnableSwitchTeamMode.setEditable(false);
|
||||
|
||||
labelAISwitchTeamAcceptPercent.registerGraphicComponent(containerName,"labelAISwitchTeamAcceptPercent");
|
||||
labelAISwitchTeamAcceptPercent.init(xoffset+460, aHeadPos+45, 80);
|
||||
labelAISwitchTeamAcceptPercent.init(xoffset+500, aHeadPos+45, 80);
|
||||
labelAISwitchTeamAcceptPercent.setText(lang.getString("AISwitchTeamAcceptPercent"));
|
||||
|
||||
listBoxAISwitchTeamAcceptPercent.registerGraphicComponent(containerName,"listBoxAISwitchTeamAcceptPercent");
|
||||
listBoxAISwitchTeamAcceptPercent.init(xoffset+460, aPos+45, 80);
|
||||
listBoxAISwitchTeamAcceptPercent.init(xoffset+500, aPos+45, 80);
|
||||
for(int i = 0; i <= 100; i = i + 10) {
|
||||
listBoxAISwitchTeamAcceptPercent.pushBackItem(intToStr(i));
|
||||
}
|
||||
|
@ -286,12 +286,12 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
buttonCancelDownloads.setText(lang.getString("CancelDownloads"));
|
||||
|
||||
// Network Frame Period
|
||||
xoffset=70;
|
||||
xoffset=65;
|
||||
//map listBox
|
||||
// put them all in a set, to weed out duplicates (gbm & mgm with same name)
|
||||
// will also ensure they are alphabetically listed (rather than how the OS provides them)
|
||||
listBoxMap.registerGraphicComponent(containerName,"listBoxMap");
|
||||
listBoxMap.init(xoffset+100, mapPos, 200);
|
||||
listBoxMap.init(xoffset+100, mapPos, 220);
|
||||
listBoxMap.setEditable(false);
|
||||
|
||||
labelMapInfo.registerGraphicComponent(containerName,"labelMapInfo");
|
||||
|
@ -304,11 +304,11 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
|
||||
//tileset listBox
|
||||
listBoxTileset.registerGraphicComponent(containerName,"listBoxTileset");
|
||||
listBoxTileset.init(xoffset+460, mapPos, 150);
|
||||
listBoxTileset.init(xoffset+500, mapPos, 160);
|
||||
listBoxTileset.setEditable(false);
|
||||
|
||||
labelTileset.registerGraphicComponent(containerName,"labelTileset");
|
||||
labelTileset.init(xoffset+460, mapHeadPos);
|
||||
labelTileset.init(xoffset+500, mapHeadPos);
|
||||
labelTileset.setText(lang.getString("Tileset"));
|
||||
|
||||
|
||||
|
@ -316,79 +316,79 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
listBoxTechTree.setEditable(false);
|
||||
|
||||
listBoxTechTree.registerGraphicComponent(containerName,"listBoxTechTree");
|
||||
listBoxTechTree.init(xoffset+620, mapPos, 150);
|
||||
listBoxTechTree.init(xoffset+700, mapPos, 180);
|
||||
|
||||
labelTechTree.registerGraphicComponent(containerName,"labelTechTree");
|
||||
labelTechTree.init(xoffset+620, mapHeadPos);
|
||||
labelTechTree.init(xoffset+700, mapHeadPos);
|
||||
labelTechTree.setText(lang.getString("TechTree"));
|
||||
|
||||
labelAllowNativeLanguageTechtree.registerGraphicComponent(containerName,"labelAllowNativeLanguageTechtree");
|
||||
labelAllowNativeLanguageTechtree.init(xoffset+620, mapHeadPos-45);
|
||||
labelAllowNativeLanguageTechtree.init(xoffset+700, aHeadPos+45);
|
||||
labelAllowNativeLanguageTechtree.setText(lang.getString("AllowNativeLanguageTechtree"));
|
||||
|
||||
checkBoxAllowNativeLanguageTechtree.registerGraphicComponent(containerName,"checkBoxAllowNativeLanguageTechtree");
|
||||
checkBoxAllowNativeLanguageTechtree.init(xoffset+620, mapHeadPos-65);
|
||||
checkBoxAllowNativeLanguageTechtree.init(xoffset+700, aPos+45);
|
||||
checkBoxAllowNativeLanguageTechtree.setValue(false);
|
||||
checkBoxAllowNativeLanguageTechtree.setEditable(false);
|
||||
checkBoxAllowNativeLanguageTechtree.setEnabled(false);
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
|
||||
xoffset=30;
|
||||
xoffset=5;
|
||||
int rowHeight=27;
|
||||
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
||||
labelPlayers[i].registerGraphicComponent(containerName,"labelPlayers" + intToStr(i));
|
||||
labelPlayers[i].init(xoffset, setupPos-30-i*rowHeight+2);
|
||||
labelPlayers[i].setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelPlayers[i].setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
labelPlayers[i].init(xoffset-1, setupPos-30-i*rowHeight+2);
|
||||
labelPlayers[i].setFont(CoreData::getInstance().getMenuFontVeryBig());
|
||||
labelPlayers[i].setFont3D(CoreData::getInstance().getMenuFontVeryBig3D());
|
||||
labelPlayers[i].setEditable(false);
|
||||
|
||||
labelPlayerStatus[i].registerGraphicComponent(containerName,"labelPlayerStatus" + intToStr(i));
|
||||
labelPlayerStatus[i].init(xoffset+15, setupPos-30-i*rowHeight+2, 60);
|
||||
labelPlayerStatus[i].init(xoffset+14, setupPos-30-i*rowHeight+2);
|
||||
labelPlayerNames[i].registerGraphicComponent(containerName,"labelPlayerNames" + intToStr(i));
|
||||
labelPlayerNames[i].init(xoffset+30,setupPos-30-i*rowHeight);
|
||||
|
||||
listBoxControls[i].registerGraphicComponent(containerName,"listBoxControls" + intToStr(i));
|
||||
listBoxControls[i].init(xoffset+170, setupPos-30-i*rowHeight);
|
||||
listBoxControls[i].init(xoffset+160, setupPos-30-i*rowHeight, 174);
|
||||
listBoxControls[i].setEditable(false);
|
||||
|
||||
listBoxRMultiplier[i].registerGraphicComponent(containerName,"listBoxRMultiplier" + intToStr(i));
|
||||
listBoxRMultiplier[i].init(xoffset+310, setupPos-30-i*rowHeight,70);
|
||||
listBoxRMultiplier[i].init(xoffset+336, setupPos-30-i*rowHeight,70);
|
||||
listBoxRMultiplier[i].setEditable(false);
|
||||
|
||||
listBoxFactions[i].registerGraphicComponent(containerName,"listBoxFactions" + intToStr(i));
|
||||
listBoxFactions[i].init(xoffset+390, setupPos-30-i*rowHeight, 250);
|
||||
listBoxFactions[i].init(xoffset+411, setupPos-30-i*rowHeight, 247);
|
||||
listBoxFactions[i].setLeftControlled(true);
|
||||
listBoxFactions[i].setEditable(false);
|
||||
|
||||
listBoxTeams[i].registerGraphicComponent(containerName,"listBoxTeams" + intToStr(i));
|
||||
listBoxTeams[i].init(xoffset+650, setupPos-30-i*rowHeight, 60);
|
||||
listBoxTeams[i].init(xoffset+660, setupPos-30-i*rowHeight, 60);
|
||||
listBoxTeams[i].setEditable(false);
|
||||
listBoxTeams[i].setLighted(true);
|
||||
|
||||
labelNetStatus[i].registerGraphicComponent(containerName,"labelNetStatus" + intToStr(i));
|
||||
labelNetStatus[i].init(xoffset+715, setupPos-30-i*rowHeight, 60);
|
||||
labelNetStatus[i].init(xoffset+723, setupPos-30-i*rowHeight, 60);
|
||||
labelNetStatus[i].setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||
labelNetStatus[i].setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||
|
||||
grabSlotButton[i].registerGraphicComponent(containerName,"grabSlotButton" + intToStr(i));
|
||||
grabSlotButton[i].init(xoffset+720, setupPos-30-i*rowHeight, 30);
|
||||
grabSlotButton[i].init(xoffset+726, setupPos-30-i*rowHeight, 35, rowHeight-5);
|
||||
grabSlotButton[i].setText(">");
|
||||
}
|
||||
|
||||
labelControl.registerGraphicComponent(containerName,"labelControl");
|
||||
labelControl.init(xoffset+170, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelControl.init(xoffset+160, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelControl.setText(lang.getString("Control"));
|
||||
|
||||
labelRMultiplier.registerGraphicComponent(containerName,"labelRMultiplier");
|
||||
labelRMultiplier.init(xoffset+310, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelRMultiplier.init(xoffset+310, setupPos, 50, GraphicListBox::defH, true);
|
||||
|
||||
labelFaction.registerGraphicComponent(containerName,"labelFaction");
|
||||
labelFaction.init(xoffset+390, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelFaction.init(xoffset+411, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelFaction.setText(lang.getString("Faction"));
|
||||
|
||||
labelTeam.registerGraphicComponent(containerName,"labelTeam");
|
||||
labelTeam.init(xoffset+650, setupPos, 60, GraphicListBox::defH, true);
|
||||
labelTeam.init(xoffset+660, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelTeam.setText(lang.getString("Team"));
|
||||
|
||||
labelControl.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
|
@ -434,7 +434,7 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
labelPlayers[i].setText(intToStr(i+1));
|
||||
labelPlayerNames[i].setText("");
|
||||
labelPlayerNames[i].setMaxEditWidth(16);
|
||||
labelPlayerNames[i].setMaxEditRenderWidth(135);
|
||||
labelPlayerNames[i].setMaxEditRenderWidth(127);
|
||||
|
||||
listBoxTeams[i].setItems(teamItems);
|
||||
listBoxTeams[i].setSelectedItemIndex(i);
|
||||
|
@ -456,11 +456,11 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
setupMapList("");
|
||||
listBoxMap.setItems(formattedPlayerSortedMaps[0]);
|
||||
|
||||
int buttonx=170;
|
||||
int buttonx=165;
|
||||
int buttony=180;
|
||||
|
||||
listBoxPlayerStatus.registerGraphicComponent(containerName,"listBoxPlayerStatus");
|
||||
listBoxPlayerStatus.init(buttonx, buttony, 150);
|
||||
listBoxPlayerStatus.init(buttonx, buttony, 165);
|
||||
listBoxPlayerStatus.setTextColor(Vec3f(1.0f,0.f,0.f));
|
||||
listBoxPlayerStatus.setLighted(true);
|
||||
playerStatuses.push_back(lang.getString("PlayerStatusSetup"));
|
||||
|
@ -471,12 +471,12 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
|
||||
buttonDisconnect.registerGraphicComponent(containerName,"buttonDisconnect");
|
||||
buttonDisconnect.init(buttonx, buttony, 125);
|
||||
buttonx+=130;
|
||||
buttonx+=132;
|
||||
|
||||
buttonRestoreLastSettings.registerGraphicComponent(containerName,"buttonRestoreLastSettings");
|
||||
buttonRestoreLastSettings.init(buttonx, buttony, 220);
|
||||
buttonRestoreLastSettings.init(buttonx, buttony, 240);
|
||||
buttonRestoreLastSettings.setText(lang.getString("ReloadLastGameSettings"));
|
||||
buttonx+=225;
|
||||
buttonx+=247;
|
||||
|
||||
buttonPlayNow.registerGraphicComponent(containerName,"buttonPlayNow");
|
||||
buttonPlayNow.init(buttonx, buttony, 125);
|
||||
|
@ -498,15 +498,15 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
|||
int initialTechSelection = setupTechList("",true);
|
||||
listBoxTechTree.setSelectedItemIndex(initialTechSelection);
|
||||
|
||||
int scenarioX=810;
|
||||
int scenarioX=800;
|
||||
int scenarioY=140;
|
||||
labelScenario.registerGraphicComponent(containerName,"labelScenario");
|
||||
labelScenario.init(scenarioX, scenarioY);
|
||||
labelScenario.init(scenarioX+30, scenarioY);
|
||||
labelScenario.setText(lang.getString("Scenario"));
|
||||
listBoxScenario.registerGraphicComponent(containerName,"listBoxScenario");
|
||||
listBoxScenario.init(scenarioX, scenarioY-30,190);
|
||||
checkBoxScenario.registerGraphicComponent(containerName,"checkBoxScenario");
|
||||
checkBoxScenario.init(scenarioX+90, scenarioY);
|
||||
checkBoxScenario.init(scenarioX, scenarioY);
|
||||
checkBoxScenario.setValue(false);
|
||||
|
||||
//scenario listbox
|
||||
|
|
|
@ -194,12 +194,12 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
int xoffset=10;
|
||||
|
||||
//create
|
||||
int buttonx=170;
|
||||
int buttonx=165;
|
||||
int buttony=180;
|
||||
|
||||
// player status
|
||||
listBoxPlayerStatus.registerGraphicComponent(containerName,"listBoxPlayerStatus");
|
||||
listBoxPlayerStatus.init(buttonx, buttony, 150);
|
||||
listBoxPlayerStatus.init(buttonx, buttony, 165);
|
||||
vector<string> playerStatuses;
|
||||
playerStatuses.push_back(lang.getString("PlayerStatusSetup"));
|
||||
playerStatuses.push_back(lang.getString("PlayerStatusBeRightBack"));
|
||||
|
@ -213,11 +213,11 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
|
||||
buttonReturn.registerGraphicComponent(containerName,"buttonReturn");
|
||||
buttonReturn.init(buttonx, buttony, 125);
|
||||
buttonx+=130;
|
||||
buttonx+=132;
|
||||
|
||||
buttonRestoreLastSettings.registerGraphicComponent(containerName,"buttonRestoreLastSettings");
|
||||
buttonRestoreLastSettings.init(buttonx, buttony, 220);
|
||||
buttonx+=225;
|
||||
buttonRestoreLastSettings.init(buttonx, buttony, 240);
|
||||
buttonx+=247;
|
||||
|
||||
buttonPlayNow.registerGraphicComponent(containerName,"buttonPlayNow");
|
||||
buttonPlayNow.init(buttonx, buttony, 125);
|
||||
|
@ -252,14 +252,14 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
labelLocalGameVersion.setText(glestVersionString + " [" + getCompileDateTime() + ", " + getGITRevisionString() + "]");
|
||||
}
|
||||
|
||||
xoffset=70;
|
||||
xoffset=65;
|
||||
// MapFilter
|
||||
labelMapFilter.registerGraphicComponent(containerName,"labelMapFilter");
|
||||
labelMapFilter.init(xoffset+310, mapHeadPos);
|
||||
labelMapFilter.setText(lang.getString("MapFilter")+":");
|
||||
labelMapFilter.init(xoffset+325, mapHeadPos);
|
||||
labelMapFilter.setText(lang.getString("MapFilter"));
|
||||
|
||||
listBoxMapFilter.registerGraphicComponent(containerName,"listBoxMapFilter");
|
||||
listBoxMapFilter.init(xoffset+310, mapPos, 80);
|
||||
listBoxMapFilter.init(xoffset+325, mapPos, 80);
|
||||
listBoxMapFilter.pushBackItem("-");
|
||||
for(int i=1; i<GameConstants::maxPlayers+1; ++i){
|
||||
listBoxMapFilter.pushBackItem(intToStr(i));
|
||||
|
@ -269,11 +269,11 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
// Map
|
||||
labelMap.registerGraphicComponent(containerName,"labelMap");
|
||||
labelMap.init(xoffset+100, mapHeadPos);
|
||||
labelMap.setText(lang.getString("Map")+":");
|
||||
labelMap.setText(lang.getString("Map"));
|
||||
|
||||
//map listBox
|
||||
listBoxMap.registerGraphicComponent(containerName,"listBoxMap");
|
||||
listBoxMap.init(xoffset+100, mapPos, 200);
|
||||
listBoxMap.init(xoffset+100, mapPos, 220);
|
||||
// put them all in a set, to weed out duplicates (gbm & mgm with same name)
|
||||
// will also ensure they are alphabetically listed (rather than how the OS provides them)
|
||||
int initialMapSelection = setupMapList("");
|
||||
|
@ -284,12 +284,12 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
labelMapInfo.init(xoffset+100, mapPos-labelOffset-10, 200, 40);
|
||||
|
||||
labelTileset.registerGraphicComponent(containerName,"labelTileset");
|
||||
labelTileset.init(xoffset+460, mapHeadPos);
|
||||
labelTileset.init(xoffset+500, mapHeadPos);
|
||||
labelTileset.setText(lang.getString("Tileset"));
|
||||
|
||||
//tileset listBox
|
||||
listBoxTileset.registerGraphicComponent(containerName,"listBoxTileset");
|
||||
listBoxTileset.init(xoffset+460, mapPos, 150);
|
||||
listBoxTileset.init(xoffset+500, mapPos, 160);
|
||||
|
||||
setupTilesetList("");
|
||||
Chrono seed(true);
|
||||
|
@ -301,23 +301,23 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
int initialTechSelection = setupTechList("", true);
|
||||
|
||||
listBoxTechTree.registerGraphicComponent(containerName,"listBoxTechTree");
|
||||
listBoxTechTree.init(xoffset+650, mapPos, 150);
|
||||
listBoxTechTree.init(xoffset+700, mapPos, 180);
|
||||
if(listBoxTechTree.getItemCount() > 0) {
|
||||
listBoxTechTree.setSelectedItemIndex(initialTechSelection);
|
||||
}
|
||||
|
||||
labelTechTree.registerGraphicComponent(containerName,"labelTechTree");
|
||||
labelTechTree.init(xoffset+650, mapHeadPos);
|
||||
labelTechTree.init(xoffset+700, mapHeadPos);
|
||||
labelTechTree.setText(lang.getString("TechTree"));
|
||||
|
||||
// fog - o - war
|
||||
// @350 ? 300 ?
|
||||
labelFogOfWar.registerGraphicComponent(containerName,"labelFogOfWar");
|
||||
labelFogOfWar.init(xoffset+100, aHeadPos, 130);
|
||||
labelFogOfWar.init(xoffset+100, aHeadPos, 165);
|
||||
labelFogOfWar.setText(lang.getString("FogOfWar"));
|
||||
|
||||
listBoxFogOfWar.registerGraphicComponent(containerName,"listBoxFogOfWar");
|
||||
listBoxFogOfWar.init(xoffset+100, aPos, 130);
|
||||
listBoxFogOfWar.init(xoffset+100, aPos, 165);
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Enabled"));
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Explored"));
|
||||
listBoxFogOfWar.pushBackItem(lang.getString("Disabled"));
|
||||
|
@ -325,11 +325,11 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
|
||||
// Allow Observers
|
||||
labelAllowObservers.registerGraphicComponent(containerName,"labelAllowObservers");
|
||||
labelAllowObservers.init(xoffset+310, aHeadPos, 80);
|
||||
labelAllowObservers.init(xoffset+325, aHeadPos, 80);
|
||||
labelAllowObservers.setText(lang.getString("AllowObservers"));
|
||||
|
||||
checkBoxAllowObservers.registerGraphicComponent(containerName,"checkBoxAllowObservers");
|
||||
checkBoxAllowObservers.init(xoffset+310, aPos);
|
||||
checkBoxAllowObservers.init(xoffset+325, aPos);
|
||||
checkBoxAllowObservers.setValue(false);
|
||||
|
||||
vector<string> rMultiplier;
|
||||
|
@ -338,52 +338,52 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
}
|
||||
|
||||
labelFallbackCpuMultiplier.registerGraphicComponent(containerName,"labelFallbackCpuMultiplier");
|
||||
labelFallbackCpuMultiplier.init(xoffset+460, aHeadPos, 80);
|
||||
labelFallbackCpuMultiplier.init(xoffset+500, aHeadPos, 80);
|
||||
labelFallbackCpuMultiplier.setText(lang.getString("FallbackCpuMultiplier"));
|
||||
|
||||
listBoxFallbackCpuMultiplier.registerGraphicComponent(containerName,"listBoxFallbackCpuMultiplier");
|
||||
listBoxFallbackCpuMultiplier.init(xoffset+460, aPos, 80);
|
||||
listBoxFallbackCpuMultiplier.init(xoffset+500, aPos, 80);
|
||||
listBoxFallbackCpuMultiplier.setItems(rMultiplier);
|
||||
listBoxFallbackCpuMultiplier.setSelectedItem("1.0");
|
||||
|
||||
// Allow Switch Team Mode
|
||||
labelEnableSwitchTeamMode.registerGraphicComponent(containerName,"labelEnableSwitchTeamMode");
|
||||
labelEnableSwitchTeamMode.init(xoffset+310, aHeadPos+45, 80);
|
||||
labelEnableSwitchTeamMode.init(xoffset+325, aHeadPos+45, 80);
|
||||
labelEnableSwitchTeamMode.setText(lang.getString("EnableSwitchTeamMode"));
|
||||
|
||||
checkBoxEnableSwitchTeamMode.registerGraphicComponent(containerName,"checkBoxEnableSwitchTeamMode");
|
||||
checkBoxEnableSwitchTeamMode.init(xoffset+310, aPos+45);
|
||||
checkBoxEnableSwitchTeamMode.init(xoffset+325, aPos+45);
|
||||
checkBoxEnableSwitchTeamMode.setValue(false);
|
||||
|
||||
labelAISwitchTeamAcceptPercent.registerGraphicComponent(containerName,"labelAISwitchTeamAcceptPercent");
|
||||
labelAISwitchTeamAcceptPercent.init(xoffset+460, aHeadPos+45, 80);
|
||||
labelAISwitchTeamAcceptPercent.init(xoffset+500, aHeadPos+45, 80);
|
||||
labelAISwitchTeamAcceptPercent.setText(lang.getString("AISwitchTeamAcceptPercent"));
|
||||
|
||||
listBoxAISwitchTeamAcceptPercent.registerGraphicComponent(containerName,"listBoxAISwitchTeamAcceptPercent");
|
||||
listBoxAISwitchTeamAcceptPercent.init(xoffset+460, aPos+45, 80);
|
||||
listBoxAISwitchTeamAcceptPercent.init(xoffset+500, aPos+45, 80);
|
||||
for(int i = 0; i <= 100; i = i + 10) {
|
||||
listBoxAISwitchTeamAcceptPercent.pushBackItem(intToStr(i));
|
||||
}
|
||||
listBoxAISwitchTeamAcceptPercent.setSelectedItem(intToStr(30));
|
||||
|
||||
labelAllowNativeLanguageTechtree.registerGraphicComponent(containerName,"labelAllowNativeLanguageTechtree");
|
||||
labelAllowNativeLanguageTechtree.init(xoffset+650, mapHeadPos-50);
|
||||
labelAllowNativeLanguageTechtree.init(xoffset+700, aHeadPos+45);
|
||||
labelAllowNativeLanguageTechtree.setText(lang.getString("AllowNativeLanguageTechtree"));
|
||||
|
||||
checkBoxAllowNativeLanguageTechtree.registerGraphicComponent(containerName,"checkBoxAllowNativeLanguageTechtree");
|
||||
checkBoxAllowNativeLanguageTechtree.init(xoffset+650, mapHeadPos-70);
|
||||
checkBoxAllowNativeLanguageTechtree.init(xoffset+700, aPos+45);
|
||||
checkBoxAllowNativeLanguageTechtree.setValue(false);
|
||||
|
||||
// Network Scenario
|
||||
int scenarioX=810;
|
||||
int scenarioX=800;
|
||||
int scenarioY=140;
|
||||
labelScenario.registerGraphicComponent(containerName,"labelScenario");
|
||||
labelScenario.init(scenarioX, scenarioY);
|
||||
labelScenario.init(scenarioX+30, scenarioY);
|
||||
labelScenario.setText(lang.getString("Scenario"));
|
||||
listBoxScenario.registerGraphicComponent(containerName,"listBoxScenario");
|
||||
listBoxScenario.init(scenarioX, scenarioY-30,190);
|
||||
checkBoxScenario.registerGraphicComponent(containerName,"checkBoxScenario");
|
||||
checkBoxScenario.init(scenarioX+90, scenarioY);
|
||||
checkBoxScenario.init(scenarioX, scenarioY);
|
||||
checkBoxScenario.setValue(false);
|
||||
|
||||
//scenario listbox
|
||||
|
@ -431,11 +431,11 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
}
|
||||
// Advanced Options
|
||||
labelAdvanced.registerGraphicComponent(containerName,"labelAdvanced");
|
||||
labelAdvanced.init(810, 80, 80);
|
||||
labelAdvanced.init(scenarioX, 80, 80);
|
||||
labelAdvanced.setText(lang.getString("AdvancedGameOptions"));
|
||||
|
||||
checkBoxAdvanced.registerGraphicComponent(containerName,"checkBoxAdvanced");
|
||||
checkBoxAdvanced.init(810, 80-labelOffset);
|
||||
checkBoxAdvanced.init(scenarioX, 80-labelOffset);
|
||||
checkBoxAdvanced.setValue(false);
|
||||
|
||||
// network things
|
||||
|
@ -443,11 +443,11 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
xoffset=90;
|
||||
|
||||
labelPublishServer.registerGraphicComponent(containerName,"labelPublishServer");
|
||||
labelPublishServer.init(50, networkHeadPos, 100);
|
||||
labelPublishServer.init(20, networkHeadPos, 100);
|
||||
labelPublishServer.setText(lang.getString("PublishServer"));
|
||||
|
||||
checkBoxPublishServer.registerGraphicComponent(containerName,"checkBoxPublishServer");
|
||||
checkBoxPublishServer.init(50, networkPos);
|
||||
checkBoxPublishServer.init(20, networkPos);
|
||||
|
||||
checkBoxPublishServer.setValue(false);
|
||||
if((this->headlessServerMode == true ||
|
||||
|
@ -457,7 +457,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
}
|
||||
|
||||
labelGameName.registerGraphicComponent(containerName,"labelGameName");
|
||||
labelGameName.init(50+checkBoxPublishServer.getW()+2, networkPos,200);
|
||||
labelGameName.init(20+checkBoxPublishServer.getW()+5, networkPos,200);
|
||||
labelGameName.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelGameName.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
if(this->headlessServerMode == false) {
|
||||
|
@ -478,7 +478,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
labelAllowInGameJoinPlayer.setVisible(allowInProgressJoin);
|
||||
|
||||
checkBoxAllowInGameJoinPlayer.registerGraphicComponent(containerName,"checkBoxAllowInGameJoinPlayer");
|
||||
checkBoxAllowInGameJoinPlayer.init(xoffset+600, 670);
|
||||
checkBoxAllowInGameJoinPlayer.init(xoffset+612, 670);
|
||||
checkBoxAllowInGameJoinPlayer.setValue(false);
|
||||
checkBoxAllowInGameJoinPlayer.setVisible(allowInProgressJoin);
|
||||
|
||||
|
@ -489,7 +489,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
labelAllowTeamUnitSharing.setVisible(true);
|
||||
|
||||
checkBoxAllowTeamUnitSharing.registerGraphicComponent(containerName,"checkBoxAllowTeamUnitSharing");
|
||||
checkBoxAllowTeamUnitSharing.init(xoffset+600, 670);
|
||||
checkBoxAllowTeamUnitSharing.init(xoffset+612, 670);
|
||||
checkBoxAllowTeamUnitSharing.setValue(false);
|
||||
checkBoxAllowTeamUnitSharing.setVisible(true);
|
||||
|
||||
|
@ -499,7 +499,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
labelAllowTeamResourceSharing.setVisible(true);
|
||||
|
||||
checkBoxAllowTeamResourceSharing.registerGraphicComponent(containerName,"checkBoxAllowTeamResourceSharing");
|
||||
checkBoxAllowTeamResourceSharing.init(xoffset+600, 640);
|
||||
checkBoxAllowTeamResourceSharing.init(xoffset+612, 640);
|
||||
checkBoxAllowTeamResourceSharing.setValue(false);
|
||||
checkBoxAllowTeamResourceSharing.setVisible(true);
|
||||
|
||||
|
@ -514,63 +514,63 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
checkBoxNetworkPauseGameForLaggedClients.setValue(true);
|
||||
|
||||
//list boxes
|
||||
xoffset=30;
|
||||
xoffset=5;
|
||||
int rowHeight=27;
|
||||
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
||||
|
||||
labelPlayers[i].registerGraphicComponent(containerName,"labelPlayers" + intToStr(i));
|
||||
labelPlayers[i].init(xoffset, setupPos-30-i*rowHeight+2);
|
||||
labelPlayers[i].setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelPlayers[i].setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
labelPlayers[i].init(xoffset-1, setupPos-30-i*rowHeight+2);
|
||||
labelPlayers[i].setFont(CoreData::getInstance().getMenuFontVeryBig());
|
||||
labelPlayers[i].setFont3D(CoreData::getInstance().getMenuFontVeryBig3D());
|
||||
|
||||
labelPlayerStatus[i].registerGraphicComponent(containerName,"labelPlayerStatus" + intToStr(i));
|
||||
labelPlayerStatus[i].init(xoffset+15, setupPos-30-i*rowHeight+2, 60);
|
||||
labelPlayerStatus[i].init(xoffset+14, setupPos-30-i*rowHeight+2);
|
||||
labelPlayerNames[i].registerGraphicComponent(containerName,"labelPlayerNames" + intToStr(i));
|
||||
labelPlayerNames[i].init(xoffset+30,setupPos-30-i*rowHeight);
|
||||
|
||||
listBoxControls[i].registerGraphicComponent(containerName,"listBoxControls" + intToStr(i));
|
||||
listBoxControls[i].init(xoffset+170, setupPos-30-i*rowHeight);
|
||||
listBoxControls[i].init(xoffset+160, setupPos-30-i*rowHeight, 174);
|
||||
|
||||
buttonBlockPlayers[i].registerGraphicComponent(containerName,"buttonBlockPlayers" + intToStr(i));
|
||||
//buttonBlockPlayers[i].init(xoffset+355, setupPos-30-i*rowHeight, 70);
|
||||
buttonBlockPlayers[i].init(xoffset+210, setupPos-30-i*rowHeight, 70);
|
||||
buttonBlockPlayers[i].init(xoffset+185, setupPos-30-i*rowHeight, 124);
|
||||
buttonBlockPlayers[i].setText(lang.getString("BlockPlayer"));
|
||||
buttonBlockPlayers[i].setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||
buttonBlockPlayers[i].setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||
|
||||
listBoxRMultiplier[i].registerGraphicComponent(containerName,"listBoxRMultiplier" + intToStr(i));
|
||||
listBoxRMultiplier[i].init(xoffset+310, setupPos-30-i*rowHeight,70);
|
||||
listBoxRMultiplier[i].init(xoffset+336, setupPos-30-i*rowHeight,70);
|
||||
|
||||
listBoxFactions[i].registerGraphicComponent(containerName,"listBoxFactions" + intToStr(i));
|
||||
listBoxFactions[i].init(xoffset+390, setupPos-30-i*rowHeight, 250);
|
||||
listBoxFactions[i].init(xoffset+411, setupPos-30-i*rowHeight, 247);
|
||||
listBoxFactions[i].setLeftControlled(true);
|
||||
|
||||
listBoxTeams[i].registerGraphicComponent(containerName,"listBoxTeams" + intToStr(i));
|
||||
listBoxTeams[i].init(xoffset+650, setupPos-30-i*rowHeight, 60);
|
||||
listBoxTeams[i].init(xoffset+660, setupPos-30-i*rowHeight, 60);
|
||||
listBoxTeams[i].setLighted(true);
|
||||
|
||||
labelNetStatus[i].registerGraphicComponent(containerName,"labelNetStatus" + intToStr(i));
|
||||
labelNetStatus[i].init(xoffset+715, setupPos-30-i*rowHeight, 60);
|
||||
labelNetStatus[i].init(xoffset+726, setupPos-30-i*rowHeight, 60);
|
||||
labelNetStatus[i].setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||
labelNetStatus[i].setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||
}
|
||||
|
||||
buttonClearBlockedPlayers.registerGraphicComponent(containerName,"buttonClearBlockedPlayers");
|
||||
buttonClearBlockedPlayers.init(xoffset+170, setupPos-30-8*rowHeight, 140);
|
||||
buttonClearBlockedPlayers.init(xoffset+160, setupPos-30-8*rowHeight, 174+2+70);
|
||||
|
||||
labelControl.registerGraphicComponent(containerName,"labelControl");
|
||||
labelControl.init(xoffset+170, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelControl.init(xoffset+160, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelControl.setText(lang.getString("Control"));
|
||||
|
||||
labelRMultiplier.registerGraphicComponent(containerName,"labelRMultiplier");
|
||||
labelRMultiplier.init(xoffset+310, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelRMultiplier.init(xoffset+310, setupPos, 50, GraphicListBox::defH, true);
|
||||
|
||||
labelFaction.registerGraphicComponent(containerName,"labelFaction");
|
||||
labelFaction.init(xoffset+390, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelFaction.init(xoffset+411, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelFaction.setText(lang.getString("Faction"));
|
||||
|
||||
labelTeam.registerGraphicComponent(containerName,"labelTeam");
|
||||
labelTeam.init(xoffset+650, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelTeam.init(xoffset+660, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelTeam.setText(lang.getString("Team"));
|
||||
|
||||
labelControl.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
|
@ -632,7 +632,7 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||
labelPlayers[i].setText(intToStr(i+1));
|
||||
labelPlayerNames[i].setText("*");
|
||||
labelPlayerNames[i].setMaxEditWidth(16);
|
||||
labelPlayerNames[i].setMaxEditRenderWidth(135);
|
||||
labelPlayerNames[i].setMaxEditRenderWidth(127);
|
||||
|
||||
listBoxTeams[i].setItems(teamItems);
|
||||
listBoxTeams[i].setSelectedItemIndex(i);
|
||||
|
@ -768,9 +768,9 @@ void MenuStateCustomGame::reloadUI() {
|
|||
|
||||
labelLocalIP.setText(lang.getString("LanIP") + ipText + " ( "+serverPort+" / "+externalPort+" )");
|
||||
|
||||
labelMap.setText(lang.getString("Map")+":");
|
||||
labelMap.setText(lang.getString("Map"));
|
||||
|
||||
labelMapFilter.setText(lang.getString("MapFilter")+":");
|
||||
labelMapFilter.setText(lang.getString("MapFilter"));
|
||||
|
||||
labelTileset.setText(lang.getString("Tileset"));
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ MenuStateGraphicInfo::MenuStateGraphicInfo(Program *program, MainMenu *mainMenu)
|
|||
|
||||
containerName = "GraphicInfo";
|
||||
buttonReturn.registerGraphicComponent(containerName,"buttonReturn");
|
||||
buttonReturn.init(100, 540, 125);
|
||||
buttonReturn.init(650, 575, 125);
|
||||
|
||||
buttonReturn.setText(lang.getString("Return"));
|
||||
|
||||
|
@ -40,7 +40,7 @@ MenuStateGraphicInfo::MenuStateGraphicInfo(Program *program, MainMenu *mainMenu)
|
|||
labelInfo.init(0, 730);
|
||||
|
||||
labelMoreInfo.registerGraphicComponent(containerName,"labelMoreInfo");
|
||||
labelMoreInfo.init(0, 520);
|
||||
labelMoreInfo.init(0, 555);
|
||||
labelMoreInfo.setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||
labelMoreInfo.setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||
|
||||
|
|
|
@ -104,64 +104,67 @@ void MenuStateJoinGame::CommonInit(bool connect, Ip serverIp,int portNumberOverr
|
|||
|
||||
//buttons
|
||||
buttonReturn.registerGraphicComponent(containerName,"buttonReturn");
|
||||
buttonReturn.init(300, 300, 125);
|
||||
buttonReturn.init(250, 300, 150);
|
||||
buttonReturn.setText(lang.getString("Return"));
|
||||
|
||||
buttonConnect.registerGraphicComponent(containerName,"buttonConnect");
|
||||
buttonConnect.init(450, 300, 125);
|
||||
buttonConnect.init(425, 300, 150);
|
||||
buttonConnect.setText(lang.getString("Connect"));
|
||||
|
||||
buttonCreateGame.registerGraphicComponent(containerName,"buttonCreateGame");
|
||||
buttonCreateGame.init(450, 250, 125);
|
||||
buttonCreateGame.init(600, 300, 150);
|
||||
buttonCreateGame.setText(lang.getString("HostGame"));
|
||||
|
||||
buttonAutoFindServers.registerGraphicComponent(containerName,"buttonAutoFindServers");
|
||||
buttonAutoFindServers.init(595, 300, 225);
|
||||
buttonAutoFindServers.init(360, 250, 280);
|
||||
buttonAutoFindServers.setText(lang.getString("FindLANGames"));
|
||||
buttonAutoFindServers.setEnabled(true);
|
||||
|
||||
int labelXleft = 300;
|
||||
int labelXright = 480;
|
||||
|
||||
//server type label
|
||||
labelServerType.registerGraphicComponent(containerName,"labelServerType");
|
||||
labelServerType.init(330, 490);
|
||||
labelServerType.setText(lang.getString("ServerType") + ":");
|
||||
labelServerType.init(labelXleft, 490);
|
||||
labelServerType.setText(lang.getString("ServerType"));
|
||||
|
||||
//server type list box
|
||||
listBoxServerType.registerGraphicComponent(containerName,"listBoxServerType");
|
||||
listBoxServerType.init(465, 490);
|
||||
listBoxServerType.init(labelXright, 490, 210);
|
||||
listBoxServerType.pushBackItem(lang.getString("ServerTypeNew"));
|
||||
listBoxServerType.pushBackItem(lang.getString("ServerTypePrevious"));
|
||||
listBoxServerType.pushBackItem(lang.getString("ServerTypeFound"));
|
||||
|
||||
//server label
|
||||
labelServer.registerGraphicComponent(containerName,"labelServer");
|
||||
labelServer.init(330, 460);
|
||||
labelServer.setText(lang.getString("Server") + ": ");
|
||||
labelServer.init(labelXleft, 460);
|
||||
labelServer.setText(lang.getString("Server"));
|
||||
|
||||
//server listbox
|
||||
listBoxServers.registerGraphicComponent(containerName,"listBoxServers");
|
||||
listBoxServers.init(465, 460);
|
||||
listBoxServers.init(labelXright, 460, 210);
|
||||
for(int i= 0; i<servers.getPropertyCount(); ++i){
|
||||
listBoxServers.pushBackItem(servers.getKey(i));
|
||||
}
|
||||
|
||||
// found servers listbox
|
||||
listBoxFoundServers.registerGraphicComponent(containerName,"listBoxFoundServers");
|
||||
listBoxFoundServers.init(465, 460);
|
||||
listBoxFoundServers.init(labelXright, 460, 210);
|
||||
|
||||
//server ip
|
||||
labelServerIp.registerGraphicComponent(containerName,"labelServerIp");
|
||||
labelServerIp.setEditable(true);
|
||||
labelServerIp.setMaxEditWidth(15);
|
||||
labelServerIp.setMaxEditRenderWidth(220);
|
||||
labelServerIp.init(465, 460);
|
||||
labelServerIp.setMaxEditWidth(20);
|
||||
labelServerIp.setMaxEditRenderWidth(210);
|
||||
labelServerIp.init(labelXright, 460);
|
||||
|
||||
// server port
|
||||
labelServerPortLabel.registerGraphicComponent(containerName,"labelServerPortLabel");
|
||||
labelServerPortLabel.init(330,430);
|
||||
labelServerPortLabel.init(labelXleft,430);
|
||||
labelServerPortLabel.setText(lang.getString("ServerPort"));
|
||||
|
||||
labelServerPort.registerGraphicComponent(containerName,"labelServerPort");
|
||||
labelServerPort.init(465,430);
|
||||
labelServerPort.init(labelXright,430);
|
||||
|
||||
string host = labelServerIp.getText();
|
||||
int portNumber = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||
|
@ -177,11 +180,11 @@ void MenuStateJoinGame::CommonInit(bool connect, Ip serverIp,int portNumberOverr
|
|||
labelServerPort.setText(port);
|
||||
|
||||
labelStatus.registerGraphicComponent(containerName,"labelStatus");
|
||||
labelStatus.init(330, 400);
|
||||
labelStatus.init(labelXleft, 400);
|
||||
labelStatus.setText("");
|
||||
|
||||
labelInfo.registerGraphicComponent(containerName,"labelInfo");
|
||||
labelInfo.init(330, 370);
|
||||
labelInfo.init(labelXleft, 370);
|
||||
labelInfo.setText("");
|
||||
|
||||
connected= false;
|
||||
|
@ -235,7 +238,7 @@ void MenuStateJoinGame::reloadUI() {
|
|||
buttonConnect.setText(lang.getString("Connect"));
|
||||
buttonCreateGame.setText(lang.getString("HostGame"));
|
||||
buttonAutoFindServers.setText(lang.getString("FindLANGames"));
|
||||
labelServerType.setText(lang.getString("ServerType") + ":");
|
||||
labelServerType.setText(lang.getString("ServerType"));
|
||||
|
||||
std::vector<string> listboxData;
|
||||
listboxData.push_back(lang.getString("ServerTypeNew"));
|
||||
|
@ -243,7 +246,7 @@ void MenuStateJoinGame::reloadUI() {
|
|||
listboxData.push_back(lang.getString("ServerTypeFound"));
|
||||
listBoxServerType.setItems(listboxData);
|
||||
|
||||
labelServer.setText(lang.getString("Server") + ": ");
|
||||
labelServer.setText(lang.getString("Server"));
|
||||
|
||||
labelServerPortLabel.setText(lang.getString("ServerPort"));
|
||||
|
||||
|
|
|
@ -39,6 +39,14 @@ MenuStateKeysetup::MenuStateKeysetup(Program *program, MainMenu *mainMenu,
|
|||
MenuState(program, mainMenu, "config")
|
||||
{
|
||||
try {
|
||||
keyButtonsLineHeight=30;
|
||||
keyButtonsHeight=25;
|
||||
keyButtonsWidth=400;
|
||||
keyButtonsXBase=200;
|
||||
keyButtonsYBase=200+400-keyButtonsLineHeight;
|
||||
keyButtonsToRender=400/keyButtonsLineHeight;
|
||||
int labelWidth=100;
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
containerName = "KeySetup";
|
||||
|
||||
|
@ -48,7 +56,8 @@ MenuStateKeysetup::MenuStateKeysetup(Program *program, MainMenu *mainMenu,
|
|||
hotkeyChar = SDLK_UNKNOWN;
|
||||
|
||||
Lang &lang= Lang::getInstance();
|
||||
int buttonRowPos=80;
|
||||
int buttonStartPos=170;
|
||||
int buttonRowPos=50;
|
||||
if(this->parentUI==NULL){
|
||||
int tabButtonWidth=200;
|
||||
int tabButtonHeight=30;
|
||||
|
@ -87,21 +96,23 @@ MenuStateKeysetup::MenuStateKeysetup(Program *program, MainMenu *mainMenu,
|
|||
}
|
||||
// header
|
||||
labelTitle.registerGraphicComponent(containerName,"labelTitle");
|
||||
labelTitle.init(360,670);
|
||||
labelTitle.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelTitle.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
labelTitle.setText(lang.getString("Keyboardsetup"));
|
||||
labelTitle.init(375,650);
|
||||
labelTitle.setFont(CoreData::getInstance().getMenuFontVeryBig());
|
||||
labelTitle.setFont3D(CoreData::getInstance().getMenuFontVeryBig3D());
|
||||
labelTitle.setText(lang.getString("KeyboardsetupL"));
|
||||
|
||||
labelTestTitle.registerGraphicComponent(containerName,"labelTestTitle");
|
||||
labelTestTitle.init(50,170);
|
||||
labelTestTitle.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelTestTitle.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
labelTestTitle.init(keyButtonsXBase,155);
|
||||
labelTestTitle.setFont(CoreData::getInstance().getMenuFontNormal());
|
||||
labelTestTitle.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||
labelTestTitle.setText(lang.getString("KeyboardsetupTest"));
|
||||
|
||||
labelTestValue.registerGraphicComponent(containerName,"labelTestValue");
|
||||
labelTestValue.init(50,140);
|
||||
labelTestValue.init(keyButtonsXBase,155-28);
|
||||
labelTestValue.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelTestValue.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
labelTestValue.setRenderBackground(true);
|
||||
labelTestValue.setMaxEditRenderWidth(keyButtonsWidth);
|
||||
labelTestValue.setText("");
|
||||
|
||||
// mainMassegeBox
|
||||
|
@ -116,27 +127,18 @@ MenuStateKeysetup::MenuStateKeysetup(Program *program, MainMenu *mainMenu,
|
|||
keyScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
keyScrollBar.setVisibleStart(0);
|
||||
|
||||
|
||||
// buttons
|
||||
buttonOk.registerGraphicComponent(containerName,"buttonOk");
|
||||
buttonOk.init(200, buttonRowPos, 100);
|
||||
buttonOk.init(buttonStartPos, buttonRowPos, 100);
|
||||
buttonOk.setText(lang.getString("Save"));
|
||||
|
||||
buttonDefaults.registerGraphicComponent(containerName,"buttonDefaults");
|
||||
buttonDefaults.init(310, buttonRowPos, 100);
|
||||
buttonDefaults.setText(lang.getString("Defaults"));
|
||||
|
||||
buttonReturn.registerGraphicComponent(containerName,"buttonReturn");
|
||||
buttonReturn.init(420, buttonRowPos, 100);
|
||||
buttonReturn.init(buttonStartPos+110, buttonRowPos, 100);
|
||||
buttonReturn.setText(lang.getString("Return"));
|
||||
|
||||
keyButtonsLineHeight=30;
|
||||
keyButtonsHeight=25;
|
||||
keyButtonsWidth=400;
|
||||
keyButtonsXBase=200;
|
||||
keyButtonsYBase=200+400-keyButtonsLineHeight;
|
||||
keyButtonsToRender=400/keyButtonsLineHeight;
|
||||
int labelWidth=100;
|
||||
buttonDefaults.registerGraphicComponent(containerName,"buttonDefaults");
|
||||
buttonDefaults.init(buttonStartPos+230, buttonRowPos, 125);
|
||||
buttonDefaults.setText(lang.getString("Defaults"));
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
|
@ -177,8 +179,10 @@ MenuStateKeysetup::MenuStateKeysetup(Program *program, MainMenu *mainMenu,
|
|||
button->setText(mergedProperties[i].first);
|
||||
keyButtons.push_back(button);
|
||||
GraphicLabel *label=new GraphicLabel();
|
||||
label->init(keyButtonsXBase+keyButtonsWidth+10,keyButtonsYBase,labelWidth,20);
|
||||
label->setText(keyName);
|
||||
label->init(keyButtonsXBase+keyButtonsWidth+5,keyButtonsYBase,labelWidth,20);
|
||||
label->setRenderBackground(true);
|
||||
label->setMaxEditRenderWidth(105);
|
||||
label->setText(" " + keyName);
|
||||
labels.push_back(label);
|
||||
}
|
||||
|
||||
|
@ -207,7 +211,7 @@ void MenuStateKeysetup::reloadUI() {
|
|||
console.resetFonts();
|
||||
labelTitle.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelTitle.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
labelTitle.setText(lang.getString("Keyboardsetup"));
|
||||
labelTitle.setText(lang.getString("KeyboardsetupL"));
|
||||
|
||||
labelTestTitle.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelTestTitle.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
|
@ -518,7 +522,7 @@ void MenuStateKeysetup::keyDown(SDL_KeyboardEvent key) {
|
|||
char *utfStr = ConvertToUTF8(&szCharText[0]);
|
||||
|
||||
char szBuf[8096] = "";
|
||||
snprintf(szBuf,8096,"%s [%s][%d][%d][%d][%d]",keyName.c_str(),utfStr,key.keysym.sym,hotkeyChar,key.keysym.unicode,key.keysym.mod);
|
||||
snprintf(szBuf,8096," %s [%s][%d][%d][%d][%d]",keyName.c_str(),utfStr,key.keysym.sym,hotkeyChar,key.keysym.unicode,key.keysym.mod);
|
||||
labelTestValue.setText(szBuf);
|
||||
|
||||
delete [] utfStr;
|
||||
|
|
|
@ -74,13 +74,13 @@ MenuStateLoadGame::MenuStateLoadGame(Program *program, MainMenu *mainMenu):
|
|||
noSavedGamesLabel.setText(lang.getString("NoSavedGames"));
|
||||
|
||||
savedGamesLabel.registerGraphicComponent(containerName,"savedGamesLabel");
|
||||
savedGamesLabel.init(120, slotLinesYBase+slotsLineHeight+10);
|
||||
savedGamesLabel.init(150, slotLinesYBase+slotsLineHeight+10);
|
||||
savedGamesLabel.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
savedGamesLabel.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
savedGamesLabel.setText(lang.getString("SavedGames"));
|
||||
|
||||
infoHeaderLabel.registerGraphicComponent(containerName,"infoHeaderLabel");
|
||||
infoHeaderLabel.init(650, slotLinesYBase+slotsLineHeight+10);
|
||||
infoHeaderLabel.init(600, slotLinesYBase+slotsLineHeight+10);
|
||||
infoHeaderLabel.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
infoHeaderLabel.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
infoHeaderLabel.setText(lang.getString("SavegameInfo"));
|
||||
|
@ -100,9 +100,9 @@ MenuStateLoadGame::MenuStateLoadGame(Program *program, MainMenu *mainMenu):
|
|||
abortButton.setText(lang.getString("Abort"));
|
||||
xPos+=buttonWidth+xSpacing;
|
||||
loadButton.registerGraphicComponent(containerName,"loadButton");
|
||||
loadButton.init(xPos, yPos, buttonWidth);
|
||||
loadButton.init(xPos, yPos, buttonWidth+80);
|
||||
loadButton.setText(lang.getString("LoadGame"));
|
||||
xPos+=buttonWidth+xSpacing;
|
||||
xPos+=buttonWidth+80+xSpacing;
|
||||
deleteButton.registerGraphicComponent(containerName,"deleteButton");
|
||||
deleteButton.init(xPos, yPos, buttonWidth);
|
||||
deleteButton.setText(lang.getString("Delete"));
|
||||
|
@ -149,9 +149,9 @@ void MenuStateLoadGame::clearSlots() {
|
|||
}
|
||||
|
||||
void MenuStateLoadGame::listFiles() {
|
||||
int keyButtonsXBase = 20;
|
||||
int keyButtonsXBase = 2;
|
||||
int keyButtonsYBase = slotLinesYBase;
|
||||
int keyButtonsWidth = 460;
|
||||
int keyButtonsWidth = 476;
|
||||
int keyButtonsHeight = slotsLineHeight;
|
||||
|
||||
clearSlots();
|
||||
|
|
|
@ -117,7 +117,7 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
|
||||
// header
|
||||
labelTitle.registerGraphicComponent(containerName,"labelTitle");
|
||||
labelTitle.init(330, serverLinesYBase+40);
|
||||
labelTitle.init(410, serverLinesYBase+45);
|
||||
labelTitle.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelTitle.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
labelTitle.setText(lang.getString("AvailableServers"));
|
||||
|
@ -132,7 +132,7 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
// Titles for current games - START
|
||||
int lineIndex = 0;
|
||||
int lineOffset=25*lineIndex;
|
||||
int i=7;
|
||||
int i=5;
|
||||
int startOffset=serverLinesYBase+23;
|
||||
|
||||
//general info:
|
||||
|
@ -141,9 +141,9 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
glestVersionLabel.init(i,startOffset-lineOffset);
|
||||
glestVersionLabel.setText(lang.getString("MGVersion"));
|
||||
|
||||
i+=70;
|
||||
i+=80;
|
||||
platformLabel.registerGraphicComponent(containerName,"platformLabel");
|
||||
platformLabel.init(i,startOffset-lineOffset);
|
||||
platformLabel.init(i+15,startOffset-lineOffset);
|
||||
platformLabel.setText(lang.getString("MGPlatform"));
|
||||
|
||||
// i+=50;
|
||||
|
@ -152,17 +152,17 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
// binaryCompileDateLabel.setText(lang.getString("MGBuildDateTime"));
|
||||
|
||||
//game info:
|
||||
i+=130;
|
||||
i+=120;
|
||||
serverTitleLabel.registerGraphicComponent(containerName,"serverTitleLabel");
|
||||
serverTitleLabel.init(i,startOffset-lineOffset);
|
||||
serverTitleLabel.setText(lang.getString("MGGameTitle"));
|
||||
|
||||
i+=150;
|
||||
i+=170;
|
||||
countryLabel.registerGraphicComponent(containerName,"countryLabel");
|
||||
countryLabel.init(i,startOffset-lineOffset);
|
||||
countryLabel.init(i-10,startOffset-lineOffset);
|
||||
countryLabel.setText(lang.getString("MGGameCountry"));
|
||||
|
||||
i+=65;
|
||||
i+=60;
|
||||
|
||||
// ipAddressLabel.registerGraphicComponent(containerName,"ipAddressLabel");
|
||||
// ipAddressLabel.init(i,startOffset-lineOffset);
|
||||
|
@ -174,12 +174,12 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
techLabel.init(i,startOffset-lineOffset);
|
||||
techLabel.setText(lang.getString("TechTree"));
|
||||
|
||||
i+=120;
|
||||
i+=165;
|
||||
mapLabel.registerGraphicComponent(containerName,"mapLabel");
|
||||
mapLabel.init(i,startOffset-lineOffset);
|
||||
mapLabel.setText(lang.getString("Map"));
|
||||
|
||||
i+=120;
|
||||
i+=95;
|
||||
// tilesetLabel.registerGraphicComponent(containerName,"tilesetLabel");
|
||||
// tilesetLabel.init(i,startOffset-lineOffset);
|
||||
// tilesetLabel.setText(lang.getString("Tileset"));
|
||||
|
@ -190,18 +190,18 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
activeSlotsLabel.setText(lang.getString("MGGameSlots"));
|
||||
|
||||
i+=50;
|
||||
externalConnectPort.registerGraphicComponent(containerName,"externalConnectPort");
|
||||
externalConnectPort.init(i,startOffset-lineOffset);
|
||||
externalConnectPort.setText(lang.getString("Port"));
|
||||
//externalConnectPort.registerGraphicComponent(containerName,"externalConnectPort");
|
||||
//externalConnectPort.init(i,startOffset-lineOffset);
|
||||
//externalConnectPort.setText(lang.getString("Port"));
|
||||
|
||||
i+=60;
|
||||
i+=30;
|
||||
statusLabel.registerGraphicComponent(containerName,"statusLabel");
|
||||
statusLabel.init(i,startOffset-lineOffset);
|
||||
statusLabel.init(i+5,startOffset-lineOffset);
|
||||
statusLabel.setText(lang.getString("MGGameStatus"));
|
||||
|
||||
i+=130;
|
||||
selectButton.registerGraphicComponent(containerName,"selectButton");
|
||||
selectButton.init(i, startOffset-lineOffset);
|
||||
selectButton.init(i-5, startOffset-lineOffset);
|
||||
selectButton.setText(lang.getString("MGJoinGameSlots"));
|
||||
|
||||
// Titles for current games - END
|
||||
|
@ -210,10 +210,10 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
buttonReturn.init(50, buttonPos, 150);
|
||||
|
||||
buttonCreateGame.registerGraphicComponent(containerName,"buttonCreateGame");
|
||||
buttonCreateGame.init(300, buttonPos, 150);
|
||||
buttonCreateGame.init(275, buttonPos, 150);
|
||||
|
||||
buttonRefresh.registerGraphicComponent(containerName,"buttonRefresh");
|
||||
buttonRefresh.init(550, buttonPos, 150);
|
||||
buttonRefresh.init(500, buttonPos, 150);
|
||||
|
||||
buttonRefresh.setText(lang.getString("RefreshList"));
|
||||
buttonReturn.setText(lang.getString("Return"));
|
||||
|
@ -221,15 +221,15 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
|||
labelAutoRefresh.setText(lang.getString("AutoRefreshRate"));
|
||||
|
||||
labelAutoRefresh.registerGraphicComponent(containerName,"labelAutoRefresh");
|
||||
labelAutoRefresh.init(800,buttonPos+30);
|
||||
labelAutoRefresh.init(750,buttonPos+30);
|
||||
|
||||
listBoxAutoRefresh.registerGraphicComponent(containerName,"listBoxAutoRefresh");
|
||||
listBoxAutoRefresh.init(800,buttonPos);
|
||||
listBoxAutoRefresh.init(750,buttonPos);
|
||||
listBoxAutoRefresh.pushBackItem(lang.getString("Off"));
|
||||
listBoxAutoRefresh.pushBackItem("10 s");
|
||||
listBoxAutoRefresh.pushBackItem("20 s");
|
||||
listBoxAutoRefresh.pushBackItem("30 s");
|
||||
listBoxAutoRefresh.setSelectedItemIndex(1);
|
||||
listBoxAutoRefresh.setSelectedItemIndex(2);
|
||||
autoRefreshTime=10*listBoxAutoRefresh.getSelectedItemIndex();
|
||||
|
||||
ircOnlinePeopleLabel.registerGraphicComponent(containerName,"ircOnlinePeopleLabel");
|
||||
|
@ -383,7 +383,7 @@ void MenuStateMasterserver::reloadUI() {
|
|||
|
||||
activeSlotsLabel.setText(lang.getString("MGGameSlots"));
|
||||
|
||||
externalConnectPort.setText(lang.getString("Port"));
|
||||
//externalConnectPort.setText(lang.getString("Port"));
|
||||
|
||||
statusLabel.setText(lang.getString("MGGameStatus"));
|
||||
|
||||
|
@ -732,7 +732,7 @@ void MenuStateMasterserver::render(){
|
|||
renderer.renderLabel(&mapLabel,&titleLabelColor);
|
||||
//renderer.renderLabel(&tilesetLabel,&titleLabelColor);
|
||||
renderer.renderLabel(&activeSlotsLabel,&titleLabelColor);
|
||||
renderer.renderLabel(&externalConnectPort,&titleLabelColor);
|
||||
//renderer.renderLabel(&externalConnectPort,&titleLabelColor);
|
||||
renderer.renderLabel(&selectButton,&titleLabelColor);
|
||||
|
||||
Lang &lang= Lang::getInstance();
|
||||
|
|
|
@ -78,6 +78,10 @@ MenuStateMods::MenuStateMods(Program *program, MainMenu *mainMenu) :
|
|||
keyButtonsLineHeight = 20;
|
||||
keyButtonsHeight = 20;
|
||||
keyButtonsWidth = 200;
|
||||
keyButtonsWidthTech = keyButtonsWidth;
|
||||
keyButtonsWidthMap = keyButtonsWidth + 15;
|
||||
keyButtonsWidthTil = keyButtonsWidth - 5;
|
||||
keyButtonsWidthScen = keyButtonsWidth + 20;
|
||||
scrollListsYPos = 700;
|
||||
listBoxLength = 200;
|
||||
keyButtonsYBase = scrollListsYPos;
|
||||
|
@ -95,41 +99,41 @@ MenuStateMods::MenuStateMods(Program *program, MainMenu *mainMenu) :
|
|||
mapPreviewTexture=NULL;
|
||||
|
||||
//create
|
||||
techInfoXPos = 10;
|
||||
techInfoXPos = 5;
|
||||
keyTechScrollBarTitle1.registerGraphicComponent(containerName,"keyTechScrollBarTitle1");
|
||||
keyTechScrollBarTitle1.init(techInfoXPos,scrollListsYPos + 25,labelWidth,20);
|
||||
keyTechScrollBarTitle1.init(techInfoXPos + 5,scrollListsYPos + 30,labelWidth,20);
|
||||
keyTechScrollBarTitle1.setText(lang.getString("TechTitle1"));
|
||||
keyTechScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
keyTechScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
keyTechScrollBarTitle2.registerGraphicComponent(containerName,"keyTechScrollBarTitle2");
|
||||
keyTechScrollBarTitle2.init(techInfoXPos + 200,scrollListsYPos + 25,labelWidth,20);
|
||||
keyTechScrollBarTitle2.init(techInfoXPos - 10 + keyButtonsWidthTech,scrollListsYPos + 17,labelWidth,20);
|
||||
keyTechScrollBarTitle2.setText(lang.getString("TechTitle2"));
|
||||
keyTechScrollBarTitle2.setFont(CoreData::getInstance().getMenuFontNormal());
|
||||
keyTechScrollBarTitle2.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||
|
||||
mapInfoXPos = 270;
|
||||
mapInfoXPos = 260;
|
||||
keyMapScrollBarTitle1.registerGraphicComponent(containerName,"keyMapScrollBarTitle1");
|
||||
keyMapScrollBarTitle1.init(mapInfoXPos,scrollListsYPos + 25,labelWidth,20);
|
||||
keyMapScrollBarTitle1.init(mapInfoXPos + 5,scrollListsYPos + 30,labelWidth,20);
|
||||
keyMapScrollBarTitle1.setText(lang.getString("MapTitle1"));
|
||||
keyMapScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
keyMapScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
keyMapScrollBarTitle2.registerGraphicComponent(containerName,"keyMapScrollBarTitle2");
|
||||
keyMapScrollBarTitle2.init(mapInfoXPos + 200,scrollListsYPos + 25,labelWidth,20);
|
||||
keyMapScrollBarTitle2.init(mapInfoXPos - 10 + keyButtonsWidthMap,scrollListsYPos + 17,labelWidth,20);
|
||||
keyMapScrollBarTitle2.setText(lang.getString("MapTitle2"));
|
||||
keyMapScrollBarTitle2.setFont(CoreData::getInstance().getMenuFontNormal());
|
||||
keyMapScrollBarTitle2.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||
|
||||
tilesetInfoXPos = 530;
|
||||
keyTilesetScrollBarTitle1.registerGraphicComponent(containerName,"keyTilesetScrollBarTitle1");
|
||||
keyTilesetScrollBarTitle1.init(tilesetInfoXPos,scrollListsYPos + 25,labelWidth,20);
|
||||
keyTilesetScrollBarTitle1.init(tilesetInfoXPos + 5,scrollListsYPos + 30,labelWidth,20);
|
||||
keyTilesetScrollBarTitle1.setText(lang.getString("TilesetTitle1"));
|
||||
keyTilesetScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
keyTilesetScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
|
||||
|
||||
scenarioInfoXPos = 760;
|
||||
scenarioInfoXPos = 755;
|
||||
keyScenarioScrollBarTitle1.registerGraphicComponent(containerName,"keyScenarioScrollBarTitle1");
|
||||
keyScenarioScrollBarTitle1.init(scenarioInfoXPos,scrollListsYPos + 25,labelWidth,20);
|
||||
keyScenarioScrollBarTitle1.init(scenarioInfoXPos,scrollListsYPos + 30,labelWidth,20);
|
||||
keyScenarioScrollBarTitle1.setText(lang.getString("ScenarioTitle1"));
|
||||
keyScenarioScrollBarTitle1.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
keyScenarioScrollBarTitle1.setFont3D(CoreData::getInstance().getMenuFontBig3D());
|
||||
|
@ -145,7 +149,7 @@ MenuStateMods::MenuStateMods(Program *program, MainMenu *mainMenu) :
|
|||
lineReturn.init(0, returnLineY);
|
||||
|
||||
modDescrLabel.registerGraphicComponent(containerName,"modDescrLabel");
|
||||
modDescrLabel.init(50,installButtonYPos-60 - 20,450,20);
|
||||
modDescrLabel.init(15,installButtonYPos-60 - 20,450,20);
|
||||
modDescrLabel.setWordWrap(true);
|
||||
modDescrLabel.setText("description is empty");
|
||||
|
||||
|
@ -167,80 +171,80 @@ MenuStateMods::MenuStateMods(Program *program, MainMenu *mainMenu) :
|
|||
|
||||
int legendButtonY= buttonLineDownY-30;
|
||||
buttonInstalled.registerGraphicComponent(containerName,"buttonInstalled");
|
||||
buttonInstalled.init(techInfoXPos, legendButtonY, 200);
|
||||
buttonInstalled.setText(lang.getString("ModInstalled"));
|
||||
buttonInstalled.init(5, legendButtonY, 240);
|
||||
buttonInstalled.setText(" " + lang.getString("ModInstalled"));
|
||||
buttonInstalled.setUseCustomTexture(true);
|
||||
buttonInstalled.setCustomTexture(CoreData::getInstance().getOnServerInstalledTexture());
|
||||
buttonInstalled.setEnabled(false);
|
||||
|
||||
buttonAvailable.registerGraphicComponent(containerName,"buttonAvailable");
|
||||
buttonAvailable.init(tilesetInfoXPos, legendButtonY, 200);
|
||||
buttonAvailable.init(255, legendButtonY, 240);
|
||||
buttonAvailable.setUseCustomTexture(true);
|
||||
buttonAvailable.setCustomTexture(CoreData::getInstance().getOnServerTexture());
|
||||
buttonAvailable.setText(lang.getString("ModAvailable"));
|
||||
buttonAvailable.setText(" " + lang.getString("ModAvailable"));
|
||||
|
||||
buttonOnlyLocal.registerGraphicComponent(containerName,"buttonOnlyLocal");
|
||||
buttonOnlyLocal.init(mapInfoXPos, legendButtonY, 200);
|
||||
buttonOnlyLocal.init(505, legendButtonY, 240);
|
||||
buttonOnlyLocal.setUseCustomTexture(true);
|
||||
buttonOnlyLocal.setCustomTexture(CoreData::getInstance().getNotOnServerTexture());
|
||||
buttonOnlyLocal.setText(lang.getString("ModOnlyLocal"));
|
||||
buttonOnlyLocal.setText(" " + lang.getString("ModOnlyLocal"));
|
||||
|
||||
buttonConflict.registerGraphicComponent(containerName,"buttonConflict");
|
||||
buttonConflict.init(scenarioInfoXPos, legendButtonY, 200);
|
||||
buttonConflict.init(755, legendButtonY, 240);
|
||||
buttonConflict.setUseCustomTexture(true);
|
||||
buttonConflict.setCustomTexture(CoreData::getInstance().getOnServerDifferentTexture());
|
||||
buttonConflict.setText(lang.getString("ModHasConflict"));
|
||||
buttonConflict.setText(" " + lang.getString("ModHasConflict"));
|
||||
|
||||
|
||||
buttonInstallTech.registerGraphicComponent(containerName,"buttonInstallTech");
|
||||
buttonInstallTech.init(techInfoXPos + 40, buttonLineUpY, 125);
|
||||
buttonInstallTech.init(techInfoXPos + 45, buttonLineUpY, 125);
|
||||
buttonInstallTech.setText(lang.getString("Install"));
|
||||
buttonRemoveTech.registerGraphicComponent(containerName,"buttonRemoveTech");
|
||||
buttonRemoveTech.init(techInfoXPos + 40, buttonLineDownY, 125);
|
||||
buttonRemoveTech.init(techInfoXPos + 45, buttonLineDownY, 125);
|
||||
buttonRemoveTech.setText(lang.getString("Remove"));
|
||||
|
||||
buttonInstallTileset.registerGraphicComponent(containerName,"buttonInstallTileset");
|
||||
buttonInstallTileset.init(tilesetInfoXPos + 20, buttonLineUpY, 125);
|
||||
buttonInstallTileset.init(tilesetInfoXPos + 30, buttonLineUpY, 125);
|
||||
buttonInstallTileset.setText(lang.getString("Install"));
|
||||
buttonRemoveTileset.registerGraphicComponent(containerName,"buttonRemoveTileset");
|
||||
buttonRemoveTileset.init(tilesetInfoXPos + 20, buttonLineDownY, 125);
|
||||
buttonRemoveTileset.init(tilesetInfoXPos + 30, buttonLineDownY, 125);
|
||||
buttonRemoveTileset.setText(lang.getString("Remove"));
|
||||
|
||||
buttonInstallMap.registerGraphicComponent(containerName,"buttonInstallMap");
|
||||
buttonInstallMap.init(mapInfoXPos + 40, buttonLineUpY, 125);
|
||||
buttonInstallMap.init(mapInfoXPos + 50, buttonLineUpY, 125);
|
||||
buttonInstallMap.setText(lang.getString("Install"));
|
||||
buttonRemoveMap.registerGraphicComponent(containerName,"buttonRemoveMap");
|
||||
buttonRemoveMap.init(mapInfoXPos + 40, buttonLineDownY, 125);
|
||||
buttonRemoveMap.init(mapInfoXPos + 50, buttonLineDownY, 125);
|
||||
buttonRemoveMap.setText(lang.getString("Remove"));
|
||||
|
||||
buttonInstallScenario.registerGraphicComponent(containerName,"buttonInstallScenario");
|
||||
buttonInstallScenario.init(scenarioInfoXPos + 20, buttonLineUpY, 125);
|
||||
buttonInstallScenario.init(scenarioInfoXPos + 45, buttonLineUpY, 125);
|
||||
buttonInstallScenario.setText(lang.getString("Install"));
|
||||
buttonRemoveScenario.registerGraphicComponent(containerName,"buttonRemoveScenario");
|
||||
buttonRemoveScenario.init(scenarioInfoXPos + 20, buttonLineDownY, 125);
|
||||
buttonRemoveScenario.init(scenarioInfoXPos + 45, buttonLineDownY, 125);
|
||||
buttonRemoveScenario.setText(lang.getString("Remove"));
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
keyTilesetScrollBar.init(tilesetInfoXPos + keyButtonsWidth,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTilesetScrollBar.init(tilesetInfoXPos + keyButtonsWidthTil,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTilesetScrollBar.setLength(listBoxLength);
|
||||
keyTilesetScrollBar.setElementCount(0);
|
||||
keyTilesetScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
keyTilesetScrollBar.setVisibleStart(0);
|
||||
|
||||
keyTechScrollBar.init(techInfoXPos + keyButtonsWidth + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTechScrollBar.init(techInfoXPos + keyButtonsWidthTech + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTechScrollBar.setLength(listBoxLength);
|
||||
keyTechScrollBar.setElementCount(0);
|
||||
keyTechScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
keyTechScrollBar.setVisibleStart(0);
|
||||
|
||||
keyMapScrollBar.init(mapInfoXPos + keyButtonsWidth + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyMapScrollBar.init(mapInfoXPos + keyButtonsWidthMap + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyMapScrollBar.setLength(listBoxLength);
|
||||
keyMapScrollBar.setElementCount(0);
|
||||
keyMapScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
keyMapScrollBar.setVisibleStart(0);
|
||||
|
||||
keyScenarioScrollBar.init(scenarioInfoXPos + keyButtonsWidth,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyScenarioScrollBar.init(scenarioInfoXPos + keyButtonsWidthScen,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyScenarioScrollBar.setLength(listBoxLength);
|
||||
keyScenarioScrollBar.setElementCount(0);
|
||||
keyScenarioScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
|
@ -530,7 +534,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
ModInfo modinfo;
|
||||
modinfo=tilesetCacheList[result];
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(tilesetInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(tilesetInfoXPos, keyButtonsYBase, keyButtonsWidthTil,keyButtonsHeight);
|
||||
button->setText(modinfo.name);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
|
@ -554,7 +558,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
bool alreadyHasTileset = (tilesetCacheList.find(tilesetName) != tilesetCacheList.end());
|
||||
if(alreadyHasTileset == false) {
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(tilesetInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(tilesetInfoXPos, keyButtonsYBase, keyButtonsWidthTil,keyButtonsHeight);
|
||||
button->setText(tilesetName);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
|
@ -593,14 +597,14 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
modinfo=techCacheList[result];
|
||||
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(techInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(techInfoXPos, keyButtonsYBase, keyButtonsWidthTech,keyButtonsHeight);
|
||||
button->setText(modinfo.name);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
|
||||
keyTechButtons.push_back(button);
|
||||
GraphicLabel *label=new GraphicLabel();
|
||||
label->init(techInfoXPos + keyButtonsWidth+10,keyButtonsYBase,labelWidth,20);
|
||||
label->init(techInfoXPos + keyButtonsWidthTech+10,keyButtonsYBase,labelWidth,20);
|
||||
label->setText(modinfo.count);
|
||||
labelsTech.push_back(label);
|
||||
}
|
||||
|
@ -628,7 +632,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
findAll(techPath + techName + "/factions/*.", factions, false, false);
|
||||
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(techInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(techInfoXPos, keyButtonsYBase, keyButtonsWidthTech,keyButtonsHeight);
|
||||
button->setText(techName);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
|
@ -636,7 +640,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
|
||||
int techFactionCount = (int)factions.size();
|
||||
GraphicLabel *label=new GraphicLabel();
|
||||
label->init(techInfoXPos + keyButtonsWidth+10,keyButtonsYBase,labelWidth,20);
|
||||
label->init(techInfoXPos + keyButtonsWidthTech+10,keyButtonsYBase,labelWidth,20);
|
||||
label->setText(intToStr(techFactionCount));
|
||||
labelsTech.push_back(label);
|
||||
}
|
||||
|
@ -668,14 +672,14 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
modinfo=mapCacheList[result];
|
||||
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(mapInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(mapInfoXPos, keyButtonsYBase, keyButtonsWidthMap,keyButtonsHeight);
|
||||
button->setText(modinfo.name);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
keyMapButtons.push_back(button);
|
||||
|
||||
GraphicLabel *label=new GraphicLabel();
|
||||
label->init(mapInfoXPos + keyButtonsWidth + 10,keyButtonsYBase,labelWidth,20);
|
||||
label->init(mapInfoXPos + keyButtonsWidthMap + 10,keyButtonsYBase,labelWidth,20);
|
||||
label->setText(modinfo.count);
|
||||
labelsMap.push_back(label);
|
||||
}
|
||||
|
@ -703,7 +707,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
MapInfo mapInfo = loadMapInfo(mapPath);
|
||||
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(mapInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(mapInfoXPos, keyButtonsYBase, keyButtonsWidthMap,keyButtonsHeight);
|
||||
button->setText(mapName);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
|
@ -711,7 +715,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
|
||||
int mapPlayerCount = mapInfo.players;
|
||||
GraphicLabel *label=new GraphicLabel();
|
||||
label->init(mapInfoXPos + keyButtonsWidth + 10,keyButtonsYBase,labelWidth,20);
|
||||
label->init(mapInfoXPos + keyButtonsWidthMap + 10,keyButtonsYBase,labelWidth,20);
|
||||
label->setText(intToStr(mapPlayerCount));
|
||||
labelsMap.push_back(label);
|
||||
}
|
||||
|
@ -742,7 +746,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
ModInfo modinfo;
|
||||
modinfo=scenarioCacheList[result];
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(scenarioInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(scenarioInfoXPos, keyButtonsYBase, keyButtonsWidthScen,keyButtonsHeight);
|
||||
button->setText(modinfo.name);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
|
@ -771,7 +775,7 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
scenarioPath += scenarioName;
|
||||
|
||||
GraphicButton *button=new GraphicButton();
|
||||
button->init(scenarioInfoXPos, keyButtonsYBase, keyButtonsWidth,keyButtonsHeight);
|
||||
button->init(scenarioInfoXPos, keyButtonsYBase, keyButtonsWidthScen,keyButtonsHeight);
|
||||
button->setText(scenarioName);
|
||||
button->setUseCustomTexture(true);
|
||||
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||
|
@ -787,25 +791,25 @@ void MenuStateMods::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
keyTilesetScrollBar.init(tilesetInfoXPos + keyButtonsWidth,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTilesetScrollBar.init(tilesetInfoXPos + keyButtonsWidthTil,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTilesetScrollBar.setLength(listBoxLength);
|
||||
keyTilesetScrollBar.setElementCount((int)keyTilesetButtons.size());
|
||||
keyTilesetScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
keyTilesetScrollBar.setVisibleStart(0);
|
||||
|
||||
keyTechScrollBar.init(techInfoXPos + keyButtonsWidth + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTechScrollBar.init(techInfoXPos + keyButtonsWidthTech + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyTechScrollBar.setLength(listBoxLength);
|
||||
keyTechScrollBar.setElementCount((int)keyTechButtons.size());
|
||||
keyTechScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
keyTechScrollBar.setVisibleStart(0);
|
||||
|
||||
keyMapScrollBar.init(mapInfoXPos + keyButtonsWidth + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyMapScrollBar.init(mapInfoXPos + keyButtonsWidthMap + labelWidth + 20,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyMapScrollBar.setLength(listBoxLength);
|
||||
keyMapScrollBar.setElementCount((int)keyMapButtons.size());
|
||||
keyMapScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
keyMapScrollBar.setVisibleStart(0);
|
||||
|
||||
keyScenarioScrollBar.init(scenarioInfoXPos + keyButtonsWidth,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyScenarioScrollBar.init(scenarioInfoXPos + keyButtonsWidthScen,scrollListsYPos-listBoxLength+keyButtonsLineHeight,false,200,20);
|
||||
keyScenarioScrollBar.setLength(listBoxLength);
|
||||
keyScenarioScrollBar.setElementCount((int)keyScenarioButtons.size());
|
||||
keyScenarioScrollBar.setVisibleSize(keyButtonsToRender);
|
||||
|
|
|
@ -123,6 +123,10 @@ private:
|
|||
int keyButtonsLineHeight;
|
||||
int keyButtonsHeight;
|
||||
int keyButtonsWidth;
|
||||
int keyButtonsWidthTech;
|
||||
int keyButtonsWidthMap;
|
||||
int keyButtonsWidthTil;
|
||||
int keyButtonsWidthScen;
|
||||
|
||||
//Console console;
|
||||
bool showFullConsole;
|
||||
|
|
|
@ -41,24 +41,25 @@ MenuStateNewGame::MenuStateNewGame(Program *program, MainMenu *mainMenu):
|
|||
Lang &lang= Lang::getInstance();
|
||||
|
||||
int buttonWidth = 200;
|
||||
int buttonXPosition = (1000 - buttonWidth) / 2;
|
||||
int yPos=465;
|
||||
buttonTutorial.registerGraphicComponent(containerName,"buttonTutorial");
|
||||
buttonTutorial.init(425, yPos, buttonWidth);
|
||||
buttonTutorial.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonScenario.registerGraphicComponent(containerName,"buttonScenario");
|
||||
buttonScenario.init(425, yPos, buttonWidth);
|
||||
buttonScenario.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonCustomGame.registerGraphicComponent(containerName,"buttonCustomGame");
|
||||
buttonCustomGame.init(425, yPos, buttonWidth);
|
||||
buttonCustomGame.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonMasterserverGame.registerGraphicComponent(containerName,"buttonMasterserverGame");
|
||||
buttonMasterserverGame.init(425, yPos, buttonWidth);
|
||||
buttonMasterserverGame.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonJoinGame.registerGraphicComponent(containerName,"buttonJoinGame");
|
||||
buttonJoinGame.init(425, yPos, buttonWidth);
|
||||
buttonJoinGame.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonReturn.registerGraphicComponent(containerName,"buttonReturn");
|
||||
buttonReturn.init(425, yPos, buttonWidth);
|
||||
buttonReturn.init(buttonXPosition, yPos, buttonWidth);
|
||||
|
||||
buttonCustomGame.setText(lang.getString("CustomGame"));
|
||||
buttonScenario.setText(lang.getString("Scenario"));
|
||||
|
|
|
@ -47,8 +47,8 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu, Program
|
|||
//modeinfos=list<ModeInfo> ();
|
||||
activeInputLabel=NULL;
|
||||
|
||||
int leftLabelStart=50;
|
||||
int leftColumnStart=leftLabelStart+280;
|
||||
int leftLabelStart=100;
|
||||
int leftColumnStart=leftLabelStart+300;
|
||||
//int rightLabelStart=450;
|
||||
//int rightColumnStart=rightLabelStart+280;
|
||||
int buttonRowPos=50;
|
||||
|
@ -108,7 +108,7 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu, Program
|
|||
labelLang.setText(lang.getString("Language"));
|
||||
|
||||
listBoxLang.registerGraphicComponent(containerName,"listBoxLang");
|
||||
listBoxLang.init(currentColumnStart, currentLine, 320);
|
||||
listBoxLang.init(currentColumnStart, currentLine, 375);
|
||||
vector<string> langResults;
|
||||
|
||||
// string data_path = getGameReadWritePath(GameConstants::path_data_CacheLookupKey);
|
||||
|
@ -232,7 +232,7 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu, Program
|
|||
labelHealthBars.setText(lang.getString("Healthbar"));
|
||||
|
||||
listBoxHealthBars.registerGraphicComponent(containerName,"lisBoxtHealthBars");
|
||||
listBoxHealthBars.init(currentColumnStart ,currentLine, 300 );
|
||||
listBoxHealthBars.init(currentColumnStart ,currentLine, 375);
|
||||
listBoxHealthBars.pushBackItem(lang.getString("HealthbarsFactionDefault"));
|
||||
listBoxHealthBars.pushBackItem(lang.getString("HealthbarsOff"));
|
||||
listBoxHealthBars.pushBackItem(lang.getString("HealthbarsAlways"));
|
||||
|
@ -332,11 +332,11 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu, Program
|
|||
labelTransifexUserLabel.setText(lang.getString("TransifexUserName"));
|
||||
|
||||
labelTransifexPwdLabel.registerGraphicComponent(containerName,"labelTransifexPwdLabel");
|
||||
labelTransifexPwdLabel.init(currentLabelStart + 250 ,currentLine);
|
||||
labelTransifexPwdLabel.init(currentLabelStart + 260 ,currentLine);
|
||||
labelTransifexPwdLabel.setText(lang.getString("TransifexPwd"));
|
||||
|
||||
labelTransifexI18NLabel.registerGraphicComponent(containerName,"labelTransifexI18NLabel");
|
||||
labelTransifexI18NLabel.init(currentLabelStart + 500 ,currentLine);
|
||||
labelTransifexI18NLabel.init(currentLabelStart + 520 ,currentLine);
|
||||
labelTransifexI18NLabel.setText(lang.getString("TransifexI18N"));
|
||||
|
||||
currentLine-=lineOffset;
|
||||
|
@ -344,32 +344,32 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu, Program
|
|||
labelTransifexUser.registerGraphicComponent(containerName,"labelTransifexUser");
|
||||
labelTransifexUser.init(currentLabelStart,currentLine);
|
||||
labelTransifexUser.setEditable(true);
|
||||
labelTransifexUser.setMaxEditWidth(30);
|
||||
labelTransifexUser.setMaxEditRenderWidth(220);
|
||||
labelTransifexUser.setMaxEditWidth(28);
|
||||
labelTransifexUser.setMaxEditRenderWidth(250);
|
||||
labelTransifexUser.setText(config.getString("TranslationGetURLUser","<none>"));
|
||||
|
||||
labelTransifexPwd.registerGraphicComponent(containerName,"labelTransifexPwd");
|
||||
labelTransifexPwd.init(currentLabelStart + 250 ,currentLine);
|
||||
labelTransifexPwd.init(currentLabelStart + 260 ,currentLine);
|
||||
labelTransifexPwd.setIsPassword(true);
|
||||
labelTransifexPwd.setEditable(true);
|
||||
labelTransifexPwd.setMaxEditWidth(35);
|
||||
labelTransifexPwd.setMaxEditRenderWidth(220);
|
||||
labelTransifexPwd.setMaxEditWidth(28);
|
||||
labelTransifexPwd.setMaxEditRenderWidth(250);
|
||||
labelTransifexPwd.setText(config.getString("TranslationGetURLPassword",""));
|
||||
|
||||
labelTransifexI18N.registerGraphicComponent(containerName,"labelTransifexI18N");
|
||||
labelTransifexI18N.init(currentLabelStart + 500 ,currentLine);
|
||||
labelTransifexI18N.init(currentLabelStart + 520 ,currentLine);
|
||||
labelTransifexI18N.setEditable(true);
|
||||
labelTransifexI18N.setMaxEditWidth(3);
|
||||
labelTransifexI18N.setMaxEditRenderWidth(40);
|
||||
labelTransifexI18N.setMaxEditWidth(6);
|
||||
labelTransifexI18N.setMaxEditRenderWidth(70);
|
||||
labelTransifexI18N.setText(config.getString("TranslationGetURLLanguage","en"));
|
||||
currentLine-=lineOffset;
|
||||
|
||||
buttonGetNewLanguageFiles.registerGraphicComponent(containerName,"buttonGetNewLanguageFiles");
|
||||
buttonGetNewLanguageFiles.init(currentLabelStart+20, currentLine, 200);
|
||||
buttonGetNewLanguageFiles.init(currentLabelStart, currentLine, 250);
|
||||
buttonGetNewLanguageFiles.setText(lang.getString("TransifexGetLanguageFiles"));
|
||||
|
||||
buttonDeleteNewLanguageFiles.registerGraphicComponent(containerName,"buttonDeleteNewLanguageFiles");
|
||||
buttonDeleteNewLanguageFiles.init(currentLabelStart + 250, currentLine, 200);
|
||||
buttonDeleteNewLanguageFiles.init(currentLabelStart + 260, currentLine, 250);
|
||||
buttonDeleteNewLanguageFiles.setText(lang.getString("TransifexDeleteLanguageFiles"));
|
||||
|
||||
setupTransifexUI();
|
||||
|
@ -609,6 +609,8 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
if(labelTransifexI18N.getText() != "") {
|
||||
Lang &lang= Lang::getInstance();
|
||||
string language = lang.getLanguageFile(labelTransifexI18N.getText());
|
||||
replaceAll(language,"(","");
|
||||
replaceAll(language,")","");
|
||||
|
||||
if(language != "") {
|
||||
bool foundFilesToDelete = false;
|
||||
|
@ -853,6 +855,8 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
replaceAll(langName,"@","");
|
||||
replaceAll(langName,"!","");
|
||||
replaceAll(langName,"*","");
|
||||
replaceAll(langName,"(","");
|
||||
replaceAll(langName,")","");
|
||||
langName = trim(langName);
|
||||
replaceAll(langName," ","-");
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ MenuStateOptionsGraphics::MenuStateOptionsGraphics(Program *program, MainMenu *m
|
|||
//modeinfos=list<ModeInfo> ();
|
||||
::Shared::PlatformCommon::getFullscreenVideoModes(&modeInfos,!config.getBool("Windowed"));
|
||||
|
||||
int leftLabelStart=50;
|
||||
int leftColumnStart=leftLabelStart+280;
|
||||
int leftLabelStart=100;
|
||||
int leftColumnStart=leftLabelStart+300;
|
||||
//int rightLabelStart=450;
|
||||
//int rightColumnStart=rightLabelStart+280;
|
||||
int buttonRowPos=50;
|
||||
|
@ -188,7 +188,7 @@ MenuStateOptionsGraphics::MenuStateOptionsGraphics(Program *program, MainMenu *m
|
|||
labelSelectionType.setText(lang.getString("SelectionType"));
|
||||
|
||||
listBoxSelectionType.registerGraphicComponent(containerName,"listBoxSelectionType");
|
||||
listBoxSelectionType.init(currentColumnStart, currentLine, 200);
|
||||
listBoxSelectionType.init(currentColumnStart, currentLine, 250);
|
||||
listBoxSelectionType.pushBackItem("SelectBuffer (nvidia)");
|
||||
listBoxSelectionType.pushBackItem("ColorPicking (default)");
|
||||
listBoxSelectionType.pushBackItem("FrustumPicking (bad)");
|
||||
|
@ -208,7 +208,7 @@ MenuStateOptionsGraphics::MenuStateOptionsGraphics(Program *program, MainMenu *m
|
|||
labelShadows.setText(lang.getString("Shadows"));
|
||||
|
||||
listBoxShadows.registerGraphicComponent(containerName,"listBoxShadows");
|
||||
listBoxShadows.init(currentColumnStart, currentLine, 200);
|
||||
listBoxShadows.init(currentColumnStart, currentLine, 250);
|
||||
for(int i= 0; i<Renderer::sCount; ++i){
|
||||
listBoxShadows.pushBackItem(lang.getString(Renderer::shadowsToStr(static_cast<Renderer::Shadows>(i))));
|
||||
}
|
||||
|
@ -369,11 +369,11 @@ MenuStateOptionsGraphics::MenuStateOptionsGraphics(Program *program, MainMenu *m
|
|||
buttonAutoConfig.setText(lang.getString("AutoConfig"));
|
||||
|
||||
buttonAutoConfig.registerGraphicComponent(containerName,"buttonAutoConfig");
|
||||
buttonAutoConfig.init(buttonStartPos+250, buttonRowPos, 125);
|
||||
buttonAutoConfig.init(buttonStartPos+230, buttonRowPos, 175);
|
||||
|
||||
buttonVideoInfo.setText(lang.getString("VideoInfo"));
|
||||
buttonVideoInfo.registerGraphicComponent(containerName,"buttonVideoInfo");
|
||||
buttonVideoInfo.init(buttonStartPos+385, buttonRowPos, 125); // was 620
|
||||
buttonVideoInfo.init(buttonStartPos+415, buttonRowPos, 175); // was 620
|
||||
|
||||
GraphicComponent::applyAllCustomProperties(containerName);
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ MenuStateOptionsNetwork::MenuStateOptionsNetwork(Program *program, MainMenu *mai
|
|||
this->parentUI=parentUI;
|
||||
this->console.setOnlyChatMessagesInStoredLines(false);
|
||||
//modeinfos=list<ModeInfo> ();
|
||||
int leftLabelStart=50;
|
||||
int leftColumnStart=leftLabelStart+280;
|
||||
int leftLabelStart=100;
|
||||
int leftColumnStart=leftLabelStart+300;
|
||||
//int rightLabelStart=450;
|
||||
//int rightColumnStart=rightLabelStart+280;
|
||||
int buttonRowPos=50;
|
||||
|
@ -123,7 +123,7 @@ MenuStateOptionsNetwork::MenuStateOptionsNetwork(Program *program, MainMenu *mai
|
|||
labelServerPortLabel.setText(lang.getString("ServerPort"));
|
||||
|
||||
listBoxServerPort.registerGraphicComponent(containerName,"listBoxPublishServerExternalPort");
|
||||
listBoxServerPort.init(currentColumnStart, currentLine, 170);
|
||||
listBoxServerPort.init(currentColumnStart, currentLine, 160);
|
||||
|
||||
string portListString = config.getString("PortList",intToStr(GameConstants::serverPort).c_str());
|
||||
std::vector<std::string> portList;
|
||||
|
@ -219,8 +219,8 @@ MenuStateOptionsNetwork::MenuStateOptionsNetwork(Program *program, MainMenu *mai
|
|||
buttonOk.registerGraphicComponent(containerName,"buttonOk");
|
||||
buttonOk.init(buttonStartPos, buttonRowPos, 100);
|
||||
buttonOk.setText(lang.getString("Save"));
|
||||
buttonReturn.setText(lang.getString("Return"));
|
||||
|
||||
buttonReturn.setText(lang.getString("Return"));
|
||||
buttonReturn.registerGraphicComponent(containerName,"buttonAbort");
|
||||
buttonReturn.init(buttonStartPos+110, buttonRowPos, 100);
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ MenuStateOptionsSound::MenuStateOptionsSound(Program *program, MainMenu *mainMen
|
|||
Config &config= Config::getInstance();
|
||||
this->console.setOnlyChatMessagesInStoredLines(false);
|
||||
|
||||
int leftLabelStart=50;
|
||||
int leftColumnStart=leftLabelStart+280;
|
||||
int leftLabelStart=100;
|
||||
int leftColumnStart=leftLabelStart+300;
|
||||
//int rightLabelStart=450;
|
||||
//int rightColumnStart=rightLabelStart+280;
|
||||
int buttonRowPos=50;
|
||||
|
@ -103,11 +103,11 @@ MenuStateOptionsSound::MenuStateOptionsSound(Program *program, MainMenu *mainMen
|
|||
//soundboxes
|
||||
labelSoundFactory.registerGraphicComponent(containerName,"labelSoundFactory");
|
||||
labelSoundFactory.init(currentLabelStart, currentLine);
|
||||
labelSoundFactory.setText(lang.getString("SoundAndMusic"));
|
||||
labelSoundFactory.setText(lang.getString("SoundAndMusic2"));
|
||||
|
||||
listBoxSoundFactory.registerGraphicComponent(containerName,"listBoxSoundFactory");
|
||||
listBoxSoundFactory.init(currentColumnStart, currentLine, 100);
|
||||
listBoxSoundFactory.pushBackItem("None");
|
||||
listBoxSoundFactory.init(currentColumnStart, currentLine, 175);
|
||||
listBoxSoundFactory.pushBackItem(lang.getString("None"));
|
||||
listBoxSoundFactory.pushBackItem("OpenAL");
|
||||
|
||||
listBoxSoundFactory.setSelectedItem(config.getString("FactorySound"));
|
||||
|
@ -198,10 +198,10 @@ void MenuStateOptionsSound::reloadUI() {
|
|||
buttonNetworkSettings.setFont3D(CoreData::getInstance().getMenuFontVeryBig3D());
|
||||
buttonNetworkSettings.setText(lang.getString("Network"));
|
||||
|
||||
labelSoundFactory.setText(lang.getString("SoundAndMusic"));
|
||||
labelSoundFactory.setText(lang.getString("SoundAndMusic2"));
|
||||
|
||||
std::vector<string> listboxData;
|
||||
listboxData.push_back("None");
|
||||
listboxData.push_back(lang.getString("None"));
|
||||
listboxData.push_back("OpenAL");
|
||||
|
||||
listBoxSoundFactory.setItems(listboxData);
|
||||
|
|
|
@ -47,6 +47,8 @@ MenuStateRoot::MenuStateRoot(Program *program, MainMenu *mainMenu):
|
|||
|
||||
Lang &lang= Lang::getInstance();
|
||||
int yPos=440;
|
||||
int buttonWidth = 200;
|
||||
int buttonXPosition = (1000 - buttonWidth) / 2;
|
||||
|
||||
|
||||
labelVersion.registerGraphicComponent(containerName,"labelVersion");
|
||||
|
@ -55,28 +57,28 @@ MenuStateRoot::MenuStateRoot(Program *program, MainMenu *mainMenu):
|
|||
labelVersion.setText(glestVersionString);
|
||||
}
|
||||
else {
|
||||
labelVersion.init(405, yPos);
|
||||
labelVersion.init(buttonXPosition, yPos);
|
||||
labelVersion.setText(glestVersionString + " [" + getCompileDateTime() + ", " + getGITRevisionString() + "]");
|
||||
}
|
||||
|
||||
yPos-=55;
|
||||
buttonNewGame.registerGraphicComponent(containerName,"buttonNewGame");
|
||||
buttonNewGame.init(425, yPos, 150);
|
||||
buttonNewGame.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonLoadGame.registerGraphicComponent(containerName,"buttonLoadGame");
|
||||
buttonLoadGame.init(425, yPos, 150);
|
||||
buttonLoadGame.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonMods.registerGraphicComponent(containerName,"buttonMods");
|
||||
buttonMods.init(425, yPos, 150);
|
||||
buttonMods.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonOptions.registerGraphicComponent(containerName,"buttonOptions");
|
||||
buttonOptions.init(425, yPos, 150);
|
||||
buttonOptions.init(buttonXPosition, yPos, buttonWidth);
|
||||
yPos-=40;
|
||||
buttonAbout.registerGraphicComponent(containerName,"buttonAbout");
|
||||
buttonAbout.init(425, yPos , 150);
|
||||
buttonAbout.init(buttonXPosition, yPos , buttonWidth);
|
||||
yPos-=40;
|
||||
buttonExit.registerGraphicComponent(containerName,"buttonExit");
|
||||
buttonExit.init(425, yPos, 150);
|
||||
buttonExit.init(buttonXPosition, yPos, buttonWidth);
|
||||
|
||||
buttonNewGame.setText(lang.getString("NewGame"));
|
||||
buttonLoadGame.setText(lang.getString("LoadGame"));
|
||||
|
@ -508,9 +510,9 @@ void MenuStateRoot::render() {
|
|||
CoreData &coreData= CoreData::getInstance();
|
||||
const Metrics &metrics= Metrics::getInstance();
|
||||
|
||||
int w= 300;
|
||||
int h= 150;
|
||||
int yPos=495;
|
||||
int w= 400;
|
||||
int h= 200;
|
||||
int yPos= 510;
|
||||
|
||||
int logoMainX = (metrics.getVirtualW()-w)/2;
|
||||
int logoMainY = yPos-h/2;
|
||||
|
@ -706,7 +708,7 @@ void MenuStateRoot::keyDown(SDL_KeyboardEvent key) {
|
|||
//if(key == configKeys.getCharKey("ExitKey")) {
|
||||
if(isKeyPressed(configKeys.getSDLKey("ExitKey"),key) == true) {
|
||||
Lang &lang= Lang::getInstance();
|
||||
showMessageBox(lang.getString("ExitGame?"), "", true);
|
||||
showMessageBox(lang.getString("ExitGameQuestion"), "", true);
|
||||
}
|
||||
//else if(mainMessageBox.getEnabled() == true && key == vkReturn) {
|
||||
else if(mainMessageBox.getEnabled() == true && isKeyPressed(SDLK_RETURN,key) == true) {
|
||||
|
|
|
@ -37,7 +37,7 @@ ServerLine::ServerLine(MasterServerInfo *mServerInfo, int lineIndex, int baseY,
|
|||
this->lineHeight= lineHeight;
|
||||
int lineOffset= lineHeight * lineIndex;
|
||||
masterServerInfo= *mServerInfo;
|
||||
int i= 7;
|
||||
int i= 5;
|
||||
this->baseY= baseY;
|
||||
Vec3f color=Vec3f(1.0f,1.0f,1.0f);
|
||||
|
||||
|
@ -50,13 +50,13 @@ ServerLine::ServerLine(MasterServerInfo *mServerInfo, int lineIndex, int baseY,
|
|||
//i+= 10;
|
||||
glestVersionLabel.init(i, baseY - lineOffset);
|
||||
glestVersionLabel.setRenderBackground(true);
|
||||
glestVersionLabel.setMaxEditRenderWidth(960); // use background for whole line
|
||||
glestVersionLabel.setMaxEditRenderWidth(970); // use background for whole line
|
||||
glestVersionLabel.setTextColor(color);
|
||||
glestVersionLabel.setText(masterServerInfo.getGlestVersion());
|
||||
glestVersionLabel.setText(" " + masterServerInfo.getGlestVersion());
|
||||
glestVersionLabel.setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||
glestVersionLabel.setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||
|
||||
i+= 70;
|
||||
i+= 80;
|
||||
string platform=masterServerInfo.getPlatform();
|
||||
size_t revOffset = platform.find("-Rev");
|
||||
if(revOffset != platform.npos) {
|
||||
|
@ -76,12 +76,12 @@ ServerLine::ServerLine(MasterServerInfo *mServerInfo, int lineIndex, int baseY,
|
|||
// binaryCompileDateLabel.setText(masterServerInfo.getBinaryCompileDate());
|
||||
|
||||
//game info:
|
||||
i+= 130;
|
||||
i+= 120;
|
||||
serverTitleLabel.init(i, baseY - lineOffset);
|
||||
serverTitleLabel.setTextColor(color);
|
||||
serverTitleLabel.setText(masterServerInfo.getServerTitle());
|
||||
|
||||
i+= 150;
|
||||
i+= 170;
|
||||
country.init(i, baseY - lineOffset);
|
||||
country.setTextColor(color);
|
||||
country.setText(masterServerInfo.getCountry());
|
||||
|
@ -112,7 +112,7 @@ ServerLine::ServerLine(MasterServerInfo *mServerInfo, int lineIndex, int baseY,
|
|||
renderer.initTexture(rsGlobal, countryTexture);
|
||||
}
|
||||
|
||||
i+= 65;
|
||||
i+= 60;
|
||||
// ipAddressLabel.init(i,baseY-lineOffset);
|
||||
// ipAddressLabel.setText(masterServerInfo.getIpAddress());
|
||||
// i+=100;
|
||||
|
@ -126,11 +126,11 @@ ServerLine::ServerLine(MasterServerInfo *mServerInfo, int lineIndex, int baseY,
|
|||
techLabel.setTextColor(color);
|
||||
techLabel.setText(masterServerInfo.getTech());
|
||||
|
||||
i+= 120;
|
||||
i+= 130;
|
||||
mapLabel.init(i, baseY - lineOffset);
|
||||
mapLabel.setTextColor(color);
|
||||
mapLabel.setText(masterServerInfo.getMap());
|
||||
i+= 120;
|
||||
i+= 130;
|
||||
|
||||
// tilesetLabel.init(i,baseY-lineOffset);
|
||||
// tilesetLabel.setText(masterServerInfo.getTileset());
|
||||
|
@ -142,17 +142,17 @@ ServerLine::ServerLine(MasterServerInfo *mServerInfo, int lineIndex, int baseY,
|
|||
masterServerInfo.getNetworkSlots()) + "/" + intToStr(masterServerInfo.getConnectedClients()));
|
||||
|
||||
i+= 50;
|
||||
externalConnectPort.init(i, baseY - lineOffset);
|
||||
externalConnectPort.setTextColor(color);
|
||||
externalConnectPort.setText(intToStr(masterServerInfo.getExternalConnectPort()));
|
||||
//externalConnectPort.init(i, baseY - lineOffset);
|
||||
//externalConnectPort.setTextColor(color);
|
||||
//externalConnectPort.setText(intToStr(masterServerInfo.getExternalConnectPort()));
|
||||
|
||||
i+= 60;
|
||||
status.init(i, baseY - lineOffset);
|
||||
i+= 30;
|
||||
status.init(i-10, baseY - lineOffset);
|
||||
status.setTextColor(color);
|
||||
status.setText(lang.getString("MGGameStatus" + intToStr(masterServerInfo.getStatus())));
|
||||
|
||||
i+= 130;
|
||||
selectButton.init(i, baseY - lineOffset, 30);
|
||||
selectButton.init(i+25, baseY - lineOffset, 35, lineHeight - 5);
|
||||
selectButton.setText(">");
|
||||
selectButton.setAlwaysLighted(true);
|
||||
|
||||
|
@ -188,7 +188,7 @@ void ServerLine::reloadUI() {
|
|||
activeSlotsLabel.setText(intToStr(masterServerInfo.getActiveSlots()) + "/" + intToStr(
|
||||
masterServerInfo.getNetworkSlots()) + "/" + intToStr(masterServerInfo.getConnectedClients()));
|
||||
|
||||
externalConnectPort.setText(intToStr(masterServerInfo.getExternalConnectPort()));
|
||||
//externalConnectPort.setText(intToStr(masterServerInfo.getExternalConnectPort()));
|
||||
|
||||
status.setText(lang.getString("MGGameStatus" + intToStr(masterServerInfo.getStatus())));
|
||||
|
||||
|
@ -230,7 +230,7 @@ void ServerLine::render(){
|
|||
//game info:
|
||||
renderer.renderLabel(&serverTitleLabel);
|
||||
if(countryTexture != NULL){
|
||||
renderer.renderTextureQuad(country.getX() + 20, country.getY(), countryTexture->getTextureWidth(),
|
||||
renderer.renderTextureQuad(country.getX()+1, country.getY()+4, countryTexture->getTextureWidth(),
|
||||
countryTexture->getTextureHeight(), countryTexture, 0.7f);
|
||||
}
|
||||
else{
|
||||
|
@ -244,7 +244,7 @@ void ServerLine::render(){
|
|||
renderer.renderLabel(&mapLabel);
|
||||
//renderer.renderLabel(&tilesetLabel);
|
||||
renderer.renderLabel(&activeSlotsLabel);
|
||||
renderer.renderLabel(&externalConnectPort);
|
||||
//renderer.renderLabel(&externalConnectPort);
|
||||
renderer.renderLabel(&status);
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ void ServerLine::setY(int y){
|
|||
//tilesetLabel.setY(y);
|
||||
activeSlotsLabel.setY(y);
|
||||
|
||||
externalConnectPort.setY(y);
|
||||
//externalConnectPort.setY(y);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue