Mercurial > hg > openttd
changeset 17851:8182cf0762b2 draft
(svn r22642) -Change: Disable the 'set parameters' button in the NewGRF GUI, if the GRF specifies to have no parameters and one would not be able to set any parameters anyway.
author | frosch <frosch@openttd.org> |
---|---|
date | Thu, 07 Jul 2011 21:52:08 +0000 |
parents | 7b0acff1de77 |
children | 66f7bfbb94b8 |
files | src/newgrf_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -943,7 +943,7 @@ break; case SNGRFS_SET_PARAMETERS: { // Edit parameters - if (this->active_sel == NULL || !this->editable || !this->show_params) break; + if (this->active_sel == NULL || !this->editable || !this->show_params || this->active_sel->num_valid_params == 0) break; OpenGRFParameterWindow(this->active_sel); break; @@ -1098,7 +1098,7 @@ SNGRFS_MOVE_DOWN, WIDGET_LIST_END ); - this->SetWidgetDisabledState(SNGRFS_SET_PARAMETERS, !this->show_params || disable_all); + this->SetWidgetDisabledState(SNGRFS_SET_PARAMETERS, !this->show_params || disable_all || this->active_sel->num_valid_params == 0); this->SetWidgetDisabledState(SNGRFS_TOGGLE_PALETTE, disable_all); if (!disable_all) {