src/transparency_gui.cpp
branchNewGRF_ports
changeset 6720 35756db7e577
parent 6719 4cc327ad39d5
child 6743 cabfaa4a0295
equal deleted inserted replaced
6719:4cc327ad39d5 6720:35756db7e577
    21 	TTW_WIDGET_HOUSES,       ///< Make houses transparent
    21 	TTW_WIDGET_HOUSES,       ///< Make houses transparent
    22 	TTW_WIDGET_INDUSTRIES,   ///< Make Industries transparent
    22 	TTW_WIDGET_INDUSTRIES,   ///< Make Industries transparent
    23 	TTW_WIDGET_BUILDINGS,    ///< Make player buildings and structures transparent
    23 	TTW_WIDGET_BUILDINGS,    ///< Make player buildings and structures transparent
    24 	TTW_WIDGET_BRIDGES,      ///< Make bridges transparent
    24 	TTW_WIDGET_BRIDGES,      ///< Make bridges transparent
    25 	TTW_WIDGET_STRUCTURES,   ///< Make unmovable structures transparent
    25 	TTW_WIDGET_STRUCTURES,   ///< Make unmovable structures transparent
       
    26 	TTW_WIDGET_LOADING,      ///< Make loading indicators transperent
    26 	TTW_WIDGET_END,          ///< End of toggle buttons
    27 	TTW_WIDGET_END,          ///< End of toggle buttons
    27 };
    28 };
    28 
    29 
    29 /** Toggle the bits of the transparencies variable
    30 /** Toggle the bits of the transparencies variable
    30  * when clicking on a widget, and play a sound
    31  * when clicking on a widget, and play a sound
    57 	}
    58 	}
    58 }
    59 }
    59 
    60 
    60 static const Widget _transparency_widgets[] = {
    61 static const Widget _transparency_widgets[] = {
    61 { WWT_CLOSEBOX,   RESIZE_NONE,  7,   0,  10,   0,  13, STR_00C5,                 STR_018B_CLOSE_WINDOW},
    62 { WWT_CLOSEBOX,   RESIZE_NONE,  7,   0,  10,   0,  13, STR_00C5,                 STR_018B_CLOSE_WINDOW},
    62 {  WWT_CAPTION,   RESIZE_NONE,  7,  11, 162,   0,  13, STR_TRANSPARENCY_TOOLB,   STR_018C_WINDOW_TITLE_DRAG_THIS},
    63 {  WWT_CAPTION,   RESIZE_NONE,  7,  11, 184,   0,  13, STR_TRANSPARENCY_TOOLB,   STR_018C_WINDOW_TITLE_DRAG_THIS},
    63 {WWT_STICKYBOX,   RESIZE_NONE,  7, 163, 174,   0,  13, STR_NULL,                 STR_STICKY_BUTTON},
    64 {WWT_STICKYBOX,   RESIZE_NONE,  7, 185, 196,   0,  13, STR_NULL,                 STR_STICKY_BUTTON},
    64 
    65 
    65 /* transparency widgets:
    66 /* transparency widgets:
    66  * transparent signs, trees, houses, industries, player's buildings, bridges and unmovable structures */
    67  * transparent signs, trees, houses, industries, player's buildings, bridges, unmovable structures and loading indicators */
    67 {   WWT_IMGBTN,   RESIZE_NONE,  7,   0,  21,  14,  35, SPR_IMG_SIGN,         STR_TRANSPARENT_SIGNS_DESC},
    68 {   WWT_IMGBTN,   RESIZE_NONE,  7,   0,  21,  14,  35, SPR_IMG_SIGN,         STR_TRANSPARENT_SIGNS_DESC},
    68 {   WWT_IMGBTN,   RESIZE_NONE,  7,  22,  43,  14,  35, SPR_IMG_PLANTTREES,   STR_TRANSPARENT_TREES_DESC},
    69 {   WWT_IMGBTN,   RESIZE_NONE,  7,  22,  43,  14,  35, SPR_IMG_PLANTTREES,   STR_TRANSPARENT_TREES_DESC},
    69 {   WWT_IMGBTN,   RESIZE_NONE,  7,  44,  65,  14,  35, SPR_IMG_TOWN,         STR_TRANSPARENT_HOUSES_DESC},
    70 {   WWT_IMGBTN,   RESIZE_NONE,  7,  44,  65,  14,  35, SPR_IMG_TOWN,         STR_TRANSPARENT_HOUSES_DESC},
    70 {   WWT_IMGBTN,   RESIZE_NONE,  7,  66,  87,  14,  35, SPR_IMG_INDUSTRY,     STR_TRANSPARENT_INDUSTRIES_DESC},
    71 {   WWT_IMGBTN,   RESIZE_NONE,  7,  66,  87,  14,  35, SPR_IMG_INDUSTRY,     STR_TRANSPARENT_INDUSTRIES_DESC},
    71 {   WWT_IMGBTN,   RESIZE_NONE,  7,  88, 109,  14,  35, SPR_IMG_COMPANY_LIST, STR_TRANSPARENT_BUILDINGS_DESC},
    72 {   WWT_IMGBTN,   RESIZE_NONE,  7,  88, 109,  14,  35, SPR_IMG_COMPANY_LIST, STR_TRANSPARENT_BUILDINGS_DESC},
    72 {   WWT_IMGBTN,   RESIZE_NONE,  7, 110, 152,  14,  35, SPR_IMG_BRIDGE,       STR_TRANSPARENT_BRIDGES_DESC},
    73 {   WWT_IMGBTN,   RESIZE_NONE,  7, 110, 152,  14,  35, SPR_IMG_BRIDGE,       STR_TRANSPARENT_BRIDGES_DESC},
    73 {   WWT_IMGBTN,   RESIZE_NONE,  7, 153, 174,  14,  35, SPR_IMG_TRANSMITTER,  STR_TRANSPARENT_STRUCTURES_DESC},
    74 {   WWT_IMGBTN,   RESIZE_NONE,  7, 153, 174,  14,  35, SPR_IMG_TRANSMITTER,  STR_TRANSPARENT_STRUCTURES_DESC},
       
    75 {   WWT_IMGBTN,   RESIZE_NONE,  7, 175, 196,  14,  35, SPR_IMG_TRAINLIST,    STR_TRANSPARENT_LOADING_DESC},
    74 
    76 
    75 {   WIDGETS_END},
    77 {   WIDGETS_END},
    76 };
    78 };
    77 
    79 
    78 static const WindowDesc _transparency_desc = {
    80 static const WindowDesc _transparency_desc = {
    79 	WDP_ALIGN_TBR, 58+36, 175, 36,
    81 	WDP_ALIGN_TBR, 58+36, 197, 36,
    80 	WC_TRANSPARENCY_TOOLBAR, WC_NONE,
    82 	WC_TRANSPARENCY_TOOLBAR, WC_NONE,
    81 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
    83 	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
    82 	_transparency_widgets,
    84 	_transparency_widgets,
    83 	TransparencyToolbWndProc
    85 	TransparencyToolbWndProc
    84 };
    86 };