Changeset - r4722:cd5ef93e3db8
[Not reviewed]
master
0 1 0
belugas - 18 years ago 2006-10-04 00:51:13
belugas@openttd.org
(svn r6634) -Fix(r6377): Do not change a widget state after a DrawWindowWidgets, as it is a bit useless
-Fix(r6562): Use the correct widget index for enabling
1 file changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
vehicle_gui.c
Show inline comments
 
@@ -1575,9 +1575,16 @@ static void DrawVehicleListWindow(Window
 
		default: NOT_REACHED();
 
	}
 

	
 
	DrawWindowWidgets(w);
 
	if (owner == _local_player) {
 
		bool list_isempty vl->l.list_length == 0;
 

	
 
	if (owner == _local_player && vl->l.list_length == 0) DisableWindowWidget(w, 9);
 
		SetWindowWidgetDisabledState(w, VLW_WIDGET_SEND_TO_DEPOT, list_isempty);
 
		SetWindowWidgetDisabledState(w, VLW_WIDGET_AUTOREPLACE, list_isempty);
 
		SetWindowWidgetDisabledState(w, VLW_WIDGET_STOP_ALL, list_isempty);
 
		SetWindowWidgetDisabledState(w, VLW_WIDGET_START_ALL, list_isempty);
 
	}
 

	
 
	DrawWindowWidgets(w);
 

	
 
	/* draw sorting criteria string */
 
	DrawString(85, 15, _vehicle_sort_listing[vl->l.sort_type], 0x10);
0 comments (0 inline, 0 general)