Revert back to v2 of house picking/placing patch.

This commit is contained in:
Jonathan G Rennison
2016-05-12 22:35:39 +01:00
parent 6ebea4b49c
commit 95b65163e3
30 changed files with 721 additions and 1401 deletions

View File

@@ -32,6 +32,7 @@
#include "hotkeys.h"
#include "engine_base.h"
#include "terraform_gui.h"
#include "town_gui.h"
#include "zoom_func.h"
#include "widgets/terraform_widget.h"
@@ -465,6 +466,9 @@ static const NWidgetPart _nested_scen_edit_land_gen_widgets[] = {
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_ETT_PLACE_OBJECT), SetMinimalSize(23, 22),
SetFill(0, 1), SetDataTip(SPR_IMG_TRANSMITTER, STR_SCENEDIT_TOOLBAR_PLACE_OBJECT),
NWidget(NWID_SPACER), SetFill(1, 0),
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_ETT_PLACE_HOUSE), SetMinimalSize(23, 22),
SetFill(0, 1), SetDataTip(SPR_IMG_TOWN, STR_SCENEDIT_TOOLBAR_PLACE_HOUSE),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SPACER), SetFill(1, 0),
@@ -609,6 +613,10 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
ShowBuildObjectPicker();
break;
case WID_ETT_PLACE_HOUSE: // Place house button
ShowBuildHousePicker();
break;
case WID_ETT_INCREASE_SIZE:
case WID_ETT_DECREASE_SIZE: { // Increase/Decrease terraform size
int size = (widget == WID_ETT_INCREASE_SIZE) ? 1 : -1;
@@ -730,6 +738,7 @@ static Hotkey terraform_editor_hotkeys[] = {
Hotkey('R', "rocky", WID_ETT_PLACE_ROCKS),
Hotkey('T', "desert", WID_ETT_PLACE_DESERT),
Hotkey('O', "object", WID_ETT_PLACE_OBJECT),
Hotkey('H', "house", WID_ETT_PLACE_HOUSE),
HOTKEY_LIST_END
};