Changeset - r5105:c5952d9b7fd9
[Not reviewed]
master
0 2 0
glx - 18 years ago 2006-11-16 18:41:57
glx@openttd.org
(svn r7176) -Fix: remove button was not always disabled when it should have been (rail/road build toolbar)
2 files changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rail_gui.c
Show inline comments
 
@@ -493,6 +493,8 @@ static void BuildRailToolbWndProc(Window
 

	
 
	case WE_ABORT_PLACE_OBJ:
 
		RaiseWindowButtons(w);
 
		DisableWindowWidget(w, 16);
 
		InvalidateWidget(w, 16);
 

	
 
		w = FindWindowById(WC_BUILD_STATION, 0);
 
		if (w != NULL) WP(w,def_d).close = true;
road_gui.c
Show inline comments
 
@@ -183,12 +183,11 @@ static OnButtonClick* const _build_road_
 
static void BuildRoadToolbWndProc(Window *w, WindowEvent *e)
 
{
 
	switch (e->event) {
 
	case WE_CREATE: DisableWindowWidget(w, 11); break;
 

	
 
	case WE_PAINT:
 
		if (IsWindowWidgetLowered(w, 3) || IsWindowWidgetLowered(w, 4)) {
 
			EnableWindowWidget(w, 11);
 
		} else {
 
			DisableWindowWidget(w, 11);
 
			RaiseWindowWidget(w, 11);
 
		}
 
		DrawWindowWidgets(w);
 
		break;
 
@@ -222,6 +221,8 @@ static void BuildRoadToolbWndProc(Window
 

	
 
	case WE_ABORT_PLACE_OBJ:
 
		RaiseWindowButtons(w);
 
		DisableWindowWidget(w, 11);
 
		InvalidateWidget(w, 11);
 

	
 
		w = FindWindowById(WC_BUS_STATION, 0);
 
		if (w != NULL) WP(w,def_d).close = true;
0 comments (0 inline, 0 general)