mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
House picker: Allow only one instance, remove button toggle behaviour.
This makes it behave more like object picker window.
This commit is contained in:
parent
5a2ecfd548
commit
7040d61287
@ -613,11 +613,8 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
|
|||||||
ShowBuildObjectPicker();
|
ShowBuildObjectPicker();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_ETT_PLACE_HOUSE: // Place house button
|
case WID_ETT_PLACE_HOUSE: // Place house button
|
||||||
if (HandlePlacePushButton(this, WID_ETT_PLACE_HOUSE, SPR_CURSOR_TOWN, HT_RECT)) {
|
ShowBuildHousePicker(this);
|
||||||
ShowBuildHousePicker(this);
|
|
||||||
this->last_user_action = widget;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_ETT_INCREASE_SIZE:
|
case WID_ETT_INCREASE_SIZE:
|
||||||
|
@ -1717,6 +1717,9 @@ static WindowDesc _house_picker_desc(
|
|||||||
*/
|
*/
|
||||||
void ShowBuildHousePicker(Window *parent)
|
void ShowBuildHousePicker(Window *parent)
|
||||||
{
|
{
|
||||||
|
if (BringWindowToFrontById(WC_BUILD_HOUSE, 0) != NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
new HousePickerWindow(&_house_picker_desc, parent);
|
new HousePickerWindow(&_house_picker_desc, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user