src/misc_gui.cpp
changeset 10641 13148f508e6d
parent 10638 1234ac29df11
child 10647 51ad0a0c6c17
equal deleted inserted replaced
10640:5bef905df159 10641:13148f508e6d
    67 static const WindowDesc _land_info_desc = {
    67 static const WindowDesc _land_info_desc = {
    68 	WDP_AUTO, WDP_AUTO, 280, 93, 280, 93,
    68 	WDP_AUTO, WDP_AUTO, 280, 93, 280, 93,
    69 	WC_LAND_INFO, WC_NONE,
    69 	WC_LAND_INFO, WC_NONE,
    70 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
    70 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
    71 	_land_info_widgets,
    71 	_land_info_widgets,
    72 	NULL
       
    73 };
    72 };
    74 
    73 
    75 class LandInfoWindow : public Window {
    74 class LandInfoWindow : public Window {
    76 	enum {
    75 	enum {
    77 		LAND_INFO_LINES          =   7,
    76 		LAND_INFO_LINES          =   7,
   217 static const WindowDesc _about_desc = {
   216 static const WindowDesc _about_desc = {
   218 	WDP_CENTER, WDP_CENTER, 420, 272, 420, 272,
   217 	WDP_CENTER, WDP_CENTER, 420, 272, 420, 272,
   219 	WC_GAME_OPTIONS, WC_NONE,
   218 	WC_GAME_OPTIONS, WC_NONE,
   220 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
   219 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
   221 	_about_widgets,
   220 	_about_widgets,
   222 	NULL
       
   223 };
   221 };
   224 
   222 
   225 struct AboutWindow : public Window {
   223 struct AboutWindow : public Window {
   226 	int scroll_height;
   224 	int scroll_height;
   227 	uint16 counter;
   225 	uint16 counter;
  1072 static const WindowDesc _query_string_desc = {
  1070 static const WindowDesc _query_string_desc = {
  1073 	190, 219, 260, 42, 260, 42,
  1071 	190, 219, 260, 42, 260, 42,
  1074 	WC_QUERY_STRING, WC_NONE,
  1072 	WC_QUERY_STRING, WC_NONE,
  1075 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
  1073 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
  1076 	_query_string_widgets,
  1074 	_query_string_widgets,
  1077 	NULL
       
  1078 };
  1075 };
  1079 
  1076 
  1080 /** Show a query popup window with a textbox in it.
  1077 /** Show a query popup window with a textbox in it.
  1081  * @param str StringID for the text shown in the textbox
  1078  * @param str StringID for the text shown in the textbox
  1082  * @param caption StringID of text shown in caption of querywindow
  1079  * @param caption StringID of text shown in caption of querywindow
  1206 static const WindowDesc _query_desc = {
  1203 static const WindowDesc _query_desc = {
  1207 	WDP_CENTER, WDP_CENTER, 210, 82, 210, 82,
  1204 	WDP_CENTER, WDP_CENTER, 210, 82, 210, 82,
  1208 	WC_CONFIRM_POPUP_QUERY, WC_NONE,
  1205 	WC_CONFIRM_POPUP_QUERY, WC_NONE,
  1209 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_DEF_WIDGET | WDF_MODAL,
  1206 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_DEF_WIDGET | WDF_MODAL,
  1210 	_query_widgets,
  1207 	_query_widgets,
  1211 	NULL
       
  1212 };
  1208 };
  1213 
  1209 
  1214 /** Show a modal confirmation window with standard 'yes' and 'no' buttons
  1210 /** Show a modal confirmation window with standard 'yes' and 'no' buttons
  1215  * The window is aligned to the centre of its parent.
  1211  * The window is aligned to the centre of its parent.
  1216  * NOTE: You cannot use BindCString as parameter for this window!
  1212  * NOTE: You cannot use BindCString as parameter for this window!
  1587 static const WindowDesc _load_dialog_desc = {
  1583 static const WindowDesc _load_dialog_desc = {
  1588 	WDP_CENTER, WDP_CENTER, 257, 154, 257, 294,
  1584 	WDP_CENTER, WDP_CENTER, 257, 154, 257, 294,
  1589 	WC_SAVELOAD, WC_NONE,
  1585 	WC_SAVELOAD, WC_NONE,
  1590 	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
  1586 	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
  1591 	_load_dialog_widgets,
  1587 	_load_dialog_widgets,
  1592 	NULL,
       
  1593 };
  1588 };
  1594 
  1589 
  1595 static const WindowDesc _save_dialog_desc = {
  1590 static const WindowDesc _save_dialog_desc = {
  1596 	WDP_CENTER, WDP_CENTER, 257, 180, 257, 320,
  1591 	WDP_CENTER, WDP_CENTER, 257, 180, 257, 320,
  1597 	WC_SAVELOAD, WC_NONE,
  1592 	WC_SAVELOAD, WC_NONE,
  1598 	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
  1593 	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
  1599 	_save_dialog_widgets,
  1594 	_save_dialog_widgets,
  1600 	NULL,
       
  1601 };
  1595 };
  1602 
  1596 
  1603 /** These values are used to convert the file/operations mode into a corresponding file type.
  1597 /** These values are used to convert the file/operations mode into a corresponding file type.
  1604  * So each entry, as expressed by the related comment, is based on the enum   */
  1598  * So each entry, as expressed by the related comment, is based on the enum   */
  1605 static const FileType _file_modetotype[] = {
  1599 static const FileType _file_modetotype[] = {