resource multiplier is not shown on client side for humans ...

This commit is contained in:
Titus Tscharntke 2011-01-03 02:35:09 +00:00
parent 87c1bc5491
commit 944f6f0eee
2 changed files with 11 additions and 1 deletions

View File

@ -1147,6 +1147,15 @@ void MenuStateConnectedGame::update() {
}
}
ControlType ct= gameSettings->getFactionControl(i);
if (ct == ctHuman || ct == ctNetwork || ct == ctClosed) {
listBoxRMultiplier[slot].setEnabled(false);
listBoxRMultiplier[slot].setVisible(false);
} else {
listBoxRMultiplier[slot].setEnabled(true);
listBoxRMultiplier[slot].setVisible(true);
}
if(gameSettings->getFactionControl(i) == ctNetwork &&
gameSettings->getThisFactionIndex() == i){
// set my current slot to ctHuman

View File

@ -940,6 +940,7 @@ void MenuStateCustomGame::updateResourceMultiplier(const int index) {
listBoxRMultiplier[index].setEnabled(true);
}
listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled());
listBoxRMultiplier[index].setVisible(listBoxRMultiplier[index].getEnabled());
}
@ -1261,7 +1262,7 @@ void MenuStateCustomGame::render() {
renderer.renderListBox(&listBoxControls[i]);
if(listBoxControls[i].getSelectedItemIndex()!=ctClosed){
if(listBoxRMultiplier[i].getEnabled() && (listBoxAdvanced.getSelectedItemIndex() == 1)){
if(listBoxAdvanced.getSelectedItemIndex() == 1){
renderer.renderListBox(&listBoxRMultiplier[i]);
}
renderer.renderListBox(&listBoxFactions[i]);