- removed pathfinder as a configurable item in the UI
This commit is contained in:
parent
8e88b36723
commit
f1ef5e2ecd
|
@ -226,16 +226,16 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
||||||
listBoxAISwitchTeamAcceptPercent.setSelectedItem(intToStr(30));
|
listBoxAISwitchTeamAcceptPercent.setSelectedItem(intToStr(30));
|
||||||
listBoxAISwitchTeamAcceptPercent.setEditable(false);
|
listBoxAISwitchTeamAcceptPercent.setEditable(false);
|
||||||
|
|
||||||
labelPathFinderType.registerGraphicComponent(containerName,"labelPathFinderType");
|
//labelPathFinderType.registerGraphicComponent(containerName,"labelPathFinderType");
|
||||||
labelPathFinderType.init(xoffset+650, aHeadPos, 80);
|
//labelPathFinderType.init(xoffset+650, aHeadPos, 80);
|
||||||
labelPathFinderType.setText(lang.get("PathFinderType"));
|
//labelPathFinderType.setText(lang.get("PathFinderType"));
|
||||||
|
|
||||||
listBoxPathFinderType.registerGraphicComponent(containerName,"listBoxPathFinderType");
|
//listBoxPathFinderType.registerGraphicComponent(containerName,"listBoxPathFinderType");
|
||||||
listBoxPathFinderType.init(xoffset+650, aPos, 150);
|
//listBoxPathFinderType.init(xoffset+650, aPos, 150);
|
||||||
listBoxPathFinderType.pushBackItem(lang.get("PathFinderTypeRegular"));
|
//listBoxPathFinderType.pushBackItem(lang.get("PathFinderTypeRegular"));
|
||||||
|
|
||||||
listBoxPathFinderType.setSelectedItemIndex(0);
|
//listBoxPathFinderType.setSelectedItemIndex(0);
|
||||||
listBoxPathFinderType.setEditable(false);
|
//listBoxPathFinderType.setEditable(false);
|
||||||
|
|
||||||
listBoxPlayerStatus.registerGraphicComponent(containerName,"listBoxPlayerStatus");
|
listBoxPlayerStatus.registerGraphicComponent(containerName,"listBoxPlayerStatus");
|
||||||
listBoxPlayerStatus.init(xoffset+650, 180, 150);
|
listBoxPlayerStatus.init(xoffset+650, 180, 150);
|
||||||
|
@ -591,11 +591,11 @@ void MenuStateConnectedGame::reloadUI() {
|
||||||
}
|
}
|
||||||
listBoxFallbackCpuMultiplier.setItems(rMultiplier);
|
listBoxFallbackCpuMultiplier.setItems(rMultiplier);
|
||||||
|
|
||||||
labelPathFinderType.setText(lang.get("PathFinderType"));
|
//labelPathFinderType.setText(lang.get("PathFinderType"));
|
||||||
|
|
||||||
vector<string> pathfinderItems;
|
//vector<string> pathfinderItems;
|
||||||
pathfinderItems.push_back(lang.get("PathFinderTypeRegular"));
|
//pathfinderItems.push_back(lang.get("PathFinderTypeRegular"));
|
||||||
listBoxPathFinderType.setItems(pathfinderItems);
|
//listBoxPathFinderType.setItems(pathfinderItems);
|
||||||
|
|
||||||
labelMap.setText(lang.get("Map"));
|
labelMap.setText(lang.get("Map"));
|
||||||
|
|
||||||
|
@ -1475,7 +1475,7 @@ void MenuStateConnectedGame::loadGameSettings(GameSettings *gameSettings) {
|
||||||
|
|
||||||
//gameSettings->setEnableObserverModeAtEndGame(listBoxEnableObserverMode.getSelectedItemIndex() == 0);
|
//gameSettings->setEnableObserverModeAtEndGame(listBoxEnableObserverMode.getSelectedItemIndex() == 0);
|
||||||
gameSettings->setEnableObserverModeAtEndGame(true);
|
gameSettings->setEnableObserverModeAtEndGame(true);
|
||||||
gameSettings->setPathFinderType(static_cast<PathFinderType>(listBoxPathFinderType.getSelectedItemIndex()));
|
//gameSettings->setPathFinderType(static_cast<PathFinderType>(listBoxPathFinderType.getSelectedItemIndex()));
|
||||||
|
|
||||||
valueFlags1 = gameSettings->getFlagTypes1();
|
valueFlags1 = gameSettings->getFlagTypes1();
|
||||||
if(listBoxEnableSwitchTeamMode.getSelectedItemIndex() == 0) {
|
if(listBoxEnableSwitchTeamMode.getSelectedItemIndex() == 0) {
|
||||||
|
@ -1878,13 +1878,13 @@ void MenuStateConnectedGame::render() {
|
||||||
renderer.renderListBox(&listBoxTechTree);
|
renderer.renderListBox(&listBoxTechTree);
|
||||||
|
|
||||||
//renderer.renderLabel(&labelEnableObserverMode);
|
//renderer.renderLabel(&labelEnableObserverMode);
|
||||||
renderer.renderLabel(&labelPathFinderType);
|
//renderer.renderLabel(&labelPathFinderType);
|
||||||
|
|
||||||
renderer.renderLabel(&labelEnableSwitchTeamMode);
|
renderer.renderLabel(&labelEnableSwitchTeamMode);
|
||||||
renderer.renderLabel(&labelAISwitchTeamAcceptPercent);
|
renderer.renderLabel(&labelAISwitchTeamAcceptPercent);
|
||||||
|
|
||||||
//renderer.renderListBox(&listBoxEnableObserverMode);
|
//renderer.renderListBox(&listBoxEnableObserverMode);
|
||||||
renderer.renderListBox(&listBoxPathFinderType);
|
//renderer.renderListBox(&listBoxPathFinderType);
|
||||||
|
|
||||||
renderer.renderListBox(&listBoxEnableSwitchTeamMode);
|
renderer.renderListBox(&listBoxEnableSwitchTeamMode);
|
||||||
renderer.renderListBox(&listBoxAISwitchTeamAcceptPercent);
|
renderer.renderListBox(&listBoxAISwitchTeamAcceptPercent);
|
||||||
|
@ -3642,12 +3642,12 @@ void MenuStateConnectedGame::setupUIFromGameSettings(GameSettings *gameSettings,
|
||||||
// else {
|
// else {
|
||||||
// listBoxEnableObserverMode.setSelectedItemIndex(1);
|
// listBoxEnableObserverMode.setSelectedItemIndex(1);
|
||||||
// }
|
// }
|
||||||
if(gameSettings->getPathFinderType() == pfBasic) {
|
// if(gameSettings->getPathFinderType() == pfBasic) {
|
||||||
listBoxPathFinderType.setSelectedItemIndex(0);
|
// listBoxPathFinderType.setSelectedItemIndex(0);
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
listBoxPathFinderType.setSelectedItemIndex(1);
|
// listBoxPathFinderType.setSelectedItemIndex(1);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Control
|
// Control
|
||||||
for(int i=0; i<GameConstants::maxPlayers; ++i) {
|
for(int i=0; i<GameConstants::maxPlayers; ++i) {
|
||||||
|
|
|
@ -63,8 +63,8 @@ private:
|
||||||
GraphicLabel labelInfo;
|
GraphicLabel labelInfo;
|
||||||
GraphicButton buttonRestoreLastSettings;
|
GraphicButton buttonRestoreLastSettings;
|
||||||
|
|
||||||
GraphicLabel labelPathFinderType;
|
//GraphicLabel labelPathFinderType;
|
||||||
GraphicListBox listBoxPathFinderType;
|
//GraphicListBox listBoxPathFinderType;
|
||||||
|
|
||||||
GraphicLabel labelMapPlayerCount;
|
GraphicLabel labelMapPlayerCount;
|
||||||
GraphicListBox listBoxMapPlayerCount;
|
GraphicListBox listBoxMapPlayerCount;
|
||||||
|
|
|
@ -338,14 +338,14 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
||||||
listBoxAISwitchTeamAcceptPercent.setSelectedItem(intToStr(30));
|
listBoxAISwitchTeamAcceptPercent.setSelectedItem(intToStr(30));
|
||||||
|
|
||||||
// Which Pathfinder
|
// Which Pathfinder
|
||||||
labelPathFinderType.registerGraphicComponent(containerName,"labelPathFinderType");
|
//labelPathFinderType.registerGraphicComponent(containerName,"labelPathFinderType");
|
||||||
labelPathFinderType.init(xoffset+650, aHeadPos, 80);
|
//labelPathFinderType.init(xoffset+650, aHeadPos, 80);
|
||||||
labelPathFinderType.setText(lang.get("PathFinderType"));
|
//labelPathFinderType.setText(lang.get("PathFinderType"));
|
||||||
|
|
||||||
listBoxPathFinderType.registerGraphicComponent(containerName,"listBoxPathFinderType");
|
//listBoxPathFinderType.registerGraphicComponent(containerName,"listBoxPathFinderType");
|
||||||
listBoxPathFinderType.init(xoffset+650, aPos, 150);
|
//listBoxPathFinderType.init(xoffset+650, aPos, 150);
|
||||||
listBoxPathFinderType.pushBackItem(lang.get("PathFinderTypeRegular"));
|
//listBoxPathFinderType.pushBackItem(lang.get("PathFinderTypeRegular"));
|
||||||
listBoxPathFinderType.setSelectedItemIndex(0);
|
//listBoxPathFinderType.setSelectedItemIndex(0);
|
||||||
|
|
||||||
// Advanced Options
|
// Advanced Options
|
||||||
labelAdvanced.registerGraphicComponent(containerName,"labelAdvanced");
|
labelAdvanced.registerGraphicComponent(containerName,"labelAdvanced");
|
||||||
|
@ -774,11 +774,11 @@ void MenuStateCustomGame::reloadUI() {
|
||||||
|
|
||||||
labelAISwitchTeamAcceptPercent.setText(lang.get("AISwitchTeamAcceptPercent"));
|
labelAISwitchTeamAcceptPercent.setText(lang.get("AISwitchTeamAcceptPercent"));
|
||||||
|
|
||||||
labelPathFinderType.setText(lang.get("PathFinderType"));
|
//labelPathFinderType.setText(lang.get("PathFinderType"));
|
||||||
|
|
||||||
listBoxData.clear();
|
listBoxData.clear();
|
||||||
listBoxData.push_back(lang.get("PathFinderTypeRegular"));
|
//listBoxData.push_back(lang.get("PathFinderTypeRegular"));
|
||||||
listBoxPathFinderType.setItems(listBoxData);
|
//listBoxPathFinderType.setItems(listBoxData);
|
||||||
|
|
||||||
// Advanced Options
|
// Advanced Options
|
||||||
labelAdvanced.setText(lang.get("AdvancedGameOptions"));
|
labelAdvanced.setText(lang.get("AdvancedGameOptions"));
|
||||||
|
@ -1144,19 +1144,19 @@ void MenuStateCustomGame::mouseClick(int x, int y, MouseButton mouseButton) {
|
||||||
lastSetChangedGameSettings = time(NULL);
|
lastSetChangedGameSettings = time(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (listBoxAdvanced.getSelectedItemIndex() == 1 && listBoxPathFinderType.mouseClick(x, y)) {
|
// else if (listBoxAdvanced.getSelectedItemIndex() == 1 && listBoxPathFinderType.mouseClick(x, y)) {
|
||||||
MutexSafeWrapper safeMutex((publishToMasterserverThread != NULL ? publishToMasterserverThread->getMutexThreadObjectAccessor() : NULL),string(__FILE__) + "_" + intToStr(__LINE__));
|
// MutexSafeWrapper safeMutex((publishToMasterserverThread != NULL ? publishToMasterserverThread->getMutexThreadObjectAccessor() : NULL),string(__FILE__) + "_" + intToStr(__LINE__));
|
||||||
|
//
|
||||||
if(listBoxPublishServer.getSelectedItemIndex() == 0) {
|
// if(listBoxPublishServer.getSelectedItemIndex() == 0) {
|
||||||
needToRepublishToMasterserver = true;
|
// needToRepublishToMasterserver = true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if(hasNetworkGameSettings() == true)
|
// if(hasNetworkGameSettings() == true)
|
||||||
{
|
// {
|
||||||
needToSetChangedGameSettings = true;
|
// needToSetChangedGameSettings = true;
|
||||||
lastSetChangedGameSettings = time(NULL);
|
// lastSetChangedGameSettings = time(NULL);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else if (listBoxAdvanced.mouseClick(x, y)) {
|
else if (listBoxAdvanced.mouseClick(x, y)) {
|
||||||
//TODO
|
//TODO
|
||||||
}
|
}
|
||||||
|
@ -1798,8 +1798,8 @@ void MenuStateCustomGame::mouseMove(int x, int y, const MouseState *ms) {
|
||||||
labelNetworkPauseGameForLaggedClients.mouseMove(x, y);
|
labelNetworkPauseGameForLaggedClients.mouseMove(x, y);
|
||||||
listBoxNetworkPauseGameForLaggedClients.mouseMove(x, y);
|
listBoxNetworkPauseGameForLaggedClients.mouseMove(x, y);
|
||||||
|
|
||||||
labelPathFinderType.mouseMove(x, y);
|
//labelPathFinderType.mouseMove(x, y);
|
||||||
listBoxPathFinderType.mouseMove(x, y);
|
//listBoxPathFinderType.mouseMove(x, y);
|
||||||
}
|
}
|
||||||
listBoxTileset.mouseMove(x, y);
|
listBoxTileset.mouseMove(x, y);
|
||||||
listBoxMapFilter.mouseMove(x, y);
|
listBoxMapFilter.mouseMove(x, y);
|
||||||
|
@ -1964,7 +1964,7 @@ void MenuStateCustomGame::render() {
|
||||||
renderer.renderLabel(&labelFogOfWar);
|
renderer.renderLabel(&labelFogOfWar);
|
||||||
renderer.renderLabel(&labelAllowObservers);
|
renderer.renderLabel(&labelAllowObservers);
|
||||||
renderer.renderLabel(&labelFallbackCpuMultiplier);
|
renderer.renderLabel(&labelFallbackCpuMultiplier);
|
||||||
renderer.renderLabel(&labelPathFinderType);
|
//renderer.renderLabel(&labelPathFinderType);
|
||||||
|
|
||||||
renderer.renderLabel(&labelEnableSwitchTeamMode);
|
renderer.renderLabel(&labelEnableSwitchTeamMode);
|
||||||
renderer.renderLabel(&labelAISwitchTeamAcceptPercent);
|
renderer.renderLabel(&labelAISwitchTeamAcceptPercent);
|
||||||
|
@ -1972,7 +1972,7 @@ void MenuStateCustomGame::render() {
|
||||||
renderer.renderListBox(&listBoxFogOfWar);
|
renderer.renderListBox(&listBoxFogOfWar);
|
||||||
renderer.renderListBox(&listBoxAllowObservers);
|
renderer.renderListBox(&listBoxAllowObservers);
|
||||||
//renderer.renderListBox(&listBoxEnableObserverMode);
|
//renderer.renderListBox(&listBoxEnableObserverMode);
|
||||||
renderer.renderListBox(&listBoxPathFinderType);
|
//renderer.renderListBox(&listBoxPathFinderType);
|
||||||
|
|
||||||
renderer.renderListBox(&listBoxEnableSwitchTeamMode);
|
renderer.renderListBox(&listBoxEnableSwitchTeamMode);
|
||||||
renderer.renderListBox(&listBoxAISwitchTeamAcceptPercent);
|
renderer.renderListBox(&listBoxAISwitchTeamAcceptPercent);
|
||||||
|
@ -3108,7 +3108,7 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings,bool force
|
||||||
|
|
||||||
//gameSettings->setEnableObserverModeAtEndGame(listBoxEnableObserverMode.getSelectedItemIndex() == 0);
|
//gameSettings->setEnableObserverModeAtEndGame(listBoxEnableObserverMode.getSelectedItemIndex() == 0);
|
||||||
gameSettings->setEnableObserverModeAtEndGame(true);
|
gameSettings->setEnableObserverModeAtEndGame(true);
|
||||||
gameSettings->setPathFinderType(static_cast<PathFinderType>(listBoxPathFinderType.getSelectedItemIndex()));
|
//gameSettings->setPathFinderType(static_cast<PathFinderType>(listBoxPathFinderType.getSelectedItemIndex()));
|
||||||
|
|
||||||
valueFlags1 = gameSettings->getFlagTypes1();
|
valueFlags1 = gameSettings->getFlagTypes1();
|
||||||
if(listBoxEnableSwitchTeamMode.getSelectedItemIndex() == 0) {
|
if(listBoxEnableSwitchTeamMode.getSelectedItemIndex() == 0) {
|
||||||
|
@ -3579,7 +3579,7 @@ void MenuStateCustomGame::setupUIFromGameSettings(const GameSettings &gameSettin
|
||||||
listBoxAISwitchTeamAcceptPercent.setSelectedItem(intToStr(gameSettings.getAiAcceptSwitchTeamPercentChance()));
|
listBoxAISwitchTeamAcceptPercent.setSelectedItem(intToStr(gameSettings.getAiAcceptSwitchTeamPercentChance()));
|
||||||
listBoxFallbackCpuMultiplier.setSelectedItemIndex(gameSettings.getFallbackCpuMultiplier());
|
listBoxFallbackCpuMultiplier.setSelectedItemIndex(gameSettings.getFallbackCpuMultiplier());
|
||||||
|
|
||||||
listBoxPathFinderType.setSelectedItemIndex(gameSettings.getPathFinderType());
|
//listBoxPathFinderType.setSelectedItemIndex(gameSettings.getPathFinderType());
|
||||||
|
|
||||||
//listBoxEnableServerControlledAI.setSelectedItem(gameSettings.getEnableServerControlledAI() == true ? lang.get("Yes") : lang.get("No"));
|
//listBoxEnableServerControlledAI.setSelectedItem(gameSettings.getEnableServerControlledAI() == true ? lang.get("Yes") : lang.get("No"));
|
||||||
|
|
||||||
|
@ -4325,7 +4325,7 @@ void MenuStateCustomGame::SetupUIForScenarios() {
|
||||||
}
|
}
|
||||||
listBoxFogOfWar.setEditable(false);
|
listBoxFogOfWar.setEditable(false);
|
||||||
listBoxAllowObservers.setEditable(false);
|
listBoxAllowObservers.setEditable(false);
|
||||||
listBoxPathFinderType.setEditable(false);
|
//listBoxPathFinderType.setEditable(false);
|
||||||
listBoxEnableSwitchTeamMode.setEditable(false);
|
listBoxEnableSwitchTeamMode.setEditable(false);
|
||||||
listBoxAISwitchTeamAcceptPercent.setEditable(false);
|
listBoxAISwitchTeamAcceptPercent.setEditable(false);
|
||||||
listBoxFallbackCpuMultiplier.setEditable(false);
|
listBoxFallbackCpuMultiplier.setEditable(false);
|
||||||
|
@ -4345,7 +4345,7 @@ void MenuStateCustomGame::SetupUIForScenarios() {
|
||||||
}
|
}
|
||||||
listBoxFogOfWar.setEditable(true);
|
listBoxFogOfWar.setEditable(true);
|
||||||
listBoxAllowObservers.setEditable(true);
|
listBoxAllowObservers.setEditable(true);
|
||||||
listBoxPathFinderType.setEditable(true);
|
//listBoxPathFinderType.setEditable(true);
|
||||||
listBoxEnableSwitchTeamMode.setEditable(true);
|
listBoxEnableSwitchTeamMode.setEditable(true);
|
||||||
listBoxAISwitchTeamAcceptPercent.setEditable(true);
|
listBoxAISwitchTeamAcceptPercent.setEditable(true);
|
||||||
listBoxFallbackCpuMultiplier.setEditable(true);
|
listBoxFallbackCpuMultiplier.setEditable(true);
|
||||||
|
|
|
@ -97,8 +97,8 @@ private:
|
||||||
GraphicLabel labelNetworkPauseGameForLaggedClients;
|
GraphicLabel labelNetworkPauseGameForLaggedClients;
|
||||||
GraphicListBox listBoxNetworkPauseGameForLaggedClients;
|
GraphicListBox listBoxNetworkPauseGameForLaggedClients;
|
||||||
|
|
||||||
GraphicLabel labelPathFinderType;
|
//GraphicLabel labelPathFinderType;
|
||||||
GraphicListBox listBoxPathFinderType;
|
//GraphicListBox listBoxPathFinderType;
|
||||||
|
|
||||||
GraphicLabel labelMapFilter;
|
GraphicLabel labelMapFilter;
|
||||||
GraphicListBox listBoxMapFilter;
|
GraphicListBox listBoxMapFilter;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user