File diff r24646:583bcdcccced → r24647:35d23833519f
src/signs_gui.cpp
Show inline comments
 
@@ -22,12 +22,13 @@
 
#include "sortlist_type.h"
 
#include "stringfilter_type.h"
 
#include "string_func.h"
 
#include "core/geometry_func.hpp"
 
#include "hotkeys.h"
 
#include "transparency.h"
 
#include "gui.h"
 

	
 
#include "widgets/sign_widget.h"
 

	
 
#include "table/strings.h"
 
#include "table/sprites.h"
 

	
 
@@ -483,12 +484,23 @@ struct SignWindow : Window, SignList {
 
		}
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	{
 
		switch (widget) {
 
			case WID_QES_LOCATION: {
 
				const Sign *si = Sign::Get(this->cur_sign);
 
				TileIndex tile = TileVirtXY(si->x, si->y);
 
				if (_ctrl_pressed) {
 
					ShowExtraViewportWindow(tile);
 
				} else {
 
					ScrollMainWindowToTile(tile);
 
				}
 
				break;
 
			}
 

	
 
			case WID_QES_PREVIOUS:
 
			case WID_QES_NEXT: {
 
				const Sign *si = this->PrevNextSign(widget == WID_QES_NEXT);
 

	
 
				/* Rebuild the sign list */
 
				this->signs.ForceRebuild();
 
@@ -520,12 +532,13 @@ struct SignWindow : Window, SignList {
 
};
 

	
 
static const NWidgetPart _nested_query_sign_edit_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_GREY),
 
		NWidget(WWT_CAPTION, COLOUR_GREY, WID_QES_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
 
		NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_QES_LOCATION), SetMinimalSize(12, 14), SetDataTip(SPR_GOTO_LOCATION, STR_EDIT_SIGN_LOCATION_TOOLTIP),
 
	EndContainer(),
 
	NWidget(WWT_PANEL, COLOUR_GREY),
 
		NWidget(WWT_EDITBOX, COLOUR_GREY, WID_QES_TEXT), SetMinimalSize(256, 12), SetDataTip(STR_EDIT_SIGN_SIGN_OSKTITLE, STR_NULL), SetPadding(2, 2, 2, 2),
 
	EndContainer(),
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_QES_OK), SetMinimalSize(61, 12), SetDataTip(STR_BUTTON_OK, STR_NULL),