Changeset - r11682:de4530e142ab
[Not reviewed]
master
0 1 0
alberth - 15 years ago 2009-04-17 19:47:21
alberth@openttd.org
(svn r16072) -Codechange: Adding widget number constants to subsidy list window.
1 file changed with 17 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/subsidy_gui.cpp
Show inline comments
 
@@ -17,6 +17,16 @@
 

	
 
#include "table/strings.h"
 

	
 
/** Widget numbers for the subsidy list window. */
 
enum SubsidyListWidgets {
 
	SLW_CLOSEBOX,
 
	SLW_CAPTION,
 
	SLW_STICKYBOX,
 
	SLW_PANEL,
 
	SLW_SCROLLBAR,
 
	SLW_RESIZEBOX,
 
};
 

	
 
struct SubsidyListWindow : Window {
 
	SubsidyListWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
 
	{
 
@@ -25,7 +35,7 @@ struct SubsidyListWindow : Window {
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	{
 
		if (widget != 3) return;
 
		if (widget != SLW_PANEL) return;
 

	
 
		int y = pt.y - 25;
 

	
 
@@ -157,12 +167,12 @@ struct SubsidyListWindow : Window {
 
};
 

	
 
static const Widget _subsidies_list_widgets[] = {
 
{   WWT_CLOSEBOX, RESIZE_NONE,   COLOUR_BROWN,   0,  10,   0,  13, STR_00C5,           STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION, RESIZE_RIGHT,  COLOUR_BROWN,  11, 307,   0,  13, STR_2025_SUBSIDIES, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{  WWT_STICKYBOX, RESIZE_LR,     COLOUR_BROWN, 308, 319,   0,  13, STR_NULL,           STR_STICKY_BUTTON},
 
{      WWT_PANEL, RESIZE_RB,     COLOUR_BROWN,   0, 307,  14, 126, 0x0,                STR_01FD_CLICK_ON_SERVICE_TO_CENTER},
 
{  WWT_SCROLLBAR, RESIZE_LRB,    COLOUR_BROWN, 308, 319,  14, 114, 0x0,                STR_0190_SCROLL_BAR_SCROLLS_LIST},
 
{  WWT_RESIZEBOX, RESIZE_LRTB,   COLOUR_BROWN, 308, 319, 115, 126, 0x0,                STR_RESIZE_BUTTON},
 
{   WWT_CLOSEBOX, RESIZE_NONE,   COLOUR_BROWN,   0,  10,   0,  13, STR_00C5,           STR_018B_CLOSE_WINDOW},               // SLW_CLOSEBOX
 
{    WWT_CAPTION, RESIZE_RIGHT,  COLOUR_BROWN,  11, 307,   0,  13, STR_2025_SUBSIDIES, STR_018C_WINDOW_TITLE_DRAG_THIS},     // SLW_CAPTION
 
{  WWT_STICKYBOX, RESIZE_LR,     COLOUR_BROWN, 308, 319,   0,  13, STR_NULL,           STR_STICKY_BUTTON},                   // SLW_STICKYBOX
 
{      WWT_PANEL, RESIZE_RB,     COLOUR_BROWN,   0, 307,  14, 126, 0x0,                STR_01FD_CLICK_ON_SERVICE_TO_CENTER}, // SLW_PANEL
 
{  WWT_SCROLLBAR, RESIZE_LRB,    COLOUR_BROWN, 308, 319,  14, 114, 0x0,                STR_0190_SCROLL_BAR_SCROLLS_LIST},    // SLW_SCROLLBAR
 
{  WWT_RESIZEBOX, RESIZE_LRTB,   COLOUR_BROWN, 308, 319, 115, 126, 0x0,                STR_RESIZE_BUTTON},                   // SLW_RESIZEBOX
 

	
 
{   WIDGETS_END},
 
};
0 comments (0 inline, 0 general)