Changeset - r11758:83a3c21e5290
[Not reviewed]
master
0 1 0
alberth - 16 years ago 2009-04-26 08:33:47
alberth@openttd.org
(svn r16153) -Codechange: Completing QueryEditSignWidgets enum.
1 file changed with 17 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/signs_gui.cpp
Show inline comments
 
@@ -184,18 +184,23 @@ static bool RenameSign(SignID index, con
 
{
 
	bool remove = StrEmpty(text);
 
	DoCommandP(0, index, 0, CMD_RENAME_SIGN | (StrEmpty(text) ? CMD_MSG(STR_ERROR_CAN_T_DELETE_SIGN) : CMD_MSG(STR_ERROR_CAN_T_CHANGE_SIGN_NAME)), NULL, text);
 
	return remove;
 
}
 

	
 
/** Widget numbers of the query sign edit window. */
 
enum QueryEditSignWidgets {
 
	QUERY_EDIT_SIGN_WIDGET_TEXT = 3,
 
	QUERY_EDIT_SIGN_WIDGET_CLOSEBOX,
 
	QUERY_EDIT_SIGN_WIDGET_CAPTION,
 
	QUERY_EDIT_SIGN_WIDGET_PANEL,
 
	QUERY_EDIT_SIGN_WIDGET_TEXT,
 
	QUERY_EDIT_SIGN_WIDGET_OK,
 
	QUERY_EDIT_SIGN_WIDGET_CANCEL,
 
	QUERY_EDIT_SIGN_WIDGET_DELETE,
 
	QUERY_EDIT_SIGN_WIDGET_PREVIOUS = QUERY_EDIT_SIGN_WIDGET_DELETE + 2,
 
	QUERY_EDIT_SIGN_WIDGET_FILL,
 
	QUERY_EDIT_SIGN_WIDGET_PREVIOUS,
 
	QUERY_EDIT_SIGN_WIDGET_NEXT,
 
};
 

	
 
struct SignWindow : QueryStringBaseWindow, SignList {
 
	SignID cur_sign;
 

	
 
@@ -325,22 +330,22 @@ struct SignWindow : QueryStringBaseWindo
 
	{
 
		ShowOnScreenKeyboard(this, wid, QUERY_EDIT_SIGN_WIDGET_CANCEL, QUERY_EDIT_SIGN_WIDGET_OK);
 
	}
 
};
 

	
 
static const Widget _query_sign_edit_widgets[] = {
 
{ WWT_CLOSEBOX, RESIZE_NONE,  COLOUR_GREY,   0,  10,   0,  13, STR_BLACK_CROSS,             STR_TOOLTIP_CLOSE_WINDOW},
 
{  WWT_CAPTION, RESIZE_NONE,  COLOUR_GREY,  11, 259,   0,  13, STR_QUERY_CAPTION,           STR_NULL },
 
{    WWT_PANEL, RESIZE_NONE,  COLOUR_GREY,   0, 259,  14,  29, STR_NULL,                    STR_NULL },
 
{  WWT_EDITBOX, RESIZE_NONE,  COLOUR_GREY,   2, 257,  16,  27, STR_SIGN_OSKTITLE,           STR_NULL },  // Text field
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY,   0,  60,  30,  41, STR_QUERY_OK,                STR_NULL },
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY,  61, 120,  30,  41, STR_QUERY_CANCEL,            STR_NULL },
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 121, 180,  30,  41, STR_TOWN_VIEW_DELETE_BUTTON, STR_NULL },
 
{    WWT_PANEL, RESIZE_NONE,  COLOUR_GREY, 181, 237,  30,  41, STR_NULL,                    STR_NULL },
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 238, 248,  30,  41, STR_ARROW_LEFT_SMALL,        STR_PREVIOUS_SIGN_TOOLTIP },
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 249, 259,  30,  41, STR_ARROW_RIGHT_SMALL,       STR_NEXT_SIGN_TOOLTIP },
 
{ WWT_CLOSEBOX, RESIZE_NONE,  COLOUR_GREY,   0,  10,   0,  13, STR_BLACK_CROSS,             STR_TOOLTIP_CLOSE_WINDOW},   // QUERY_EDIT_SIGN_WIDGET_CLOSEBOX
 
{  WWT_CAPTION, RESIZE_NONE,  COLOUR_GREY,  11, 259,   0,  13, STR_QUERY_CAPTION,           STR_NULL },                  // QUERY_EDIT_SIGN_WIDGET_CAPTION
 
{    WWT_PANEL, RESIZE_NONE,  COLOUR_GREY,   0, 259,  14,  29, STR_NULL,                    STR_NULL },                  // QUERY_EDIT_SIGN_WIDGET_PANEL
 
{  WWT_EDITBOX, RESIZE_NONE,  COLOUR_GREY,   2, 257,  16,  27, STR_SIGN_OSKTITLE,           STR_NULL },                  // QUERY_EDIT_SIGN_WIDGET_TEXT (Text field)
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY,   0,  60,  30,  41, STR_QUERY_OK,                STR_NULL },                  // QUERY_EDIT_SIGN_WIDGET_OK
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY,  61, 120,  30,  41, STR_QUERY_CANCEL,            STR_NULL },                  // QUERY_EDIT_SIGN_WIDGET_CANCEL
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 121, 180,  30,  41, STR_TOWN_VIEW_DELETE_BUTTON, STR_NULL },                  // QUERY_EDIT_SIGN_WIDGET_DELETE
 
{    WWT_PANEL, RESIZE_NONE,  COLOUR_GREY, 181, 237,  30,  41, STR_NULL,                    STR_NULL },                  // QUERY_EDIT_SIGN_WIDGET_FILL
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 238, 248,  30,  41, STR_ARROW_LEFT_SMALL,        STR_PREVIOUS_SIGN_TOOLTIP }, // QUERY_EDIT_SIGN_WIDGET_PREVIOUS
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 249, 259,  30,  41, STR_ARROW_RIGHT_SMALL,       STR_NEXT_SIGN_TOOLTIP },     // QUERY_EDIT_SIGN_WIDGET_NEXT
 
{ WIDGETS_END },
 
};
 

	
 
static const WindowDesc _query_sign_edit_desc(
 
	190, 170, 260, 42, 260, 42,
 
	WC_QUERY_STRING, WC_NONE,
0 comments (0 inline, 0 general)