Changeset - r1006:d0eeb17855a5
[Not reviewed]
master
0 1 0
celestar - 20 years ago 2005-01-14 09:36:29
celestar@openttd.org
(svn r1505) -Fix: Refit engine button is now disabled when cargo capacity equals zero
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
train_gui.c
Show inline comments
 
@@ -813,12 +813,16 @@ static void TrainViewWndProc(Window *w, 
 
		StringID str;
 

	
 
		v = GetVehicle(w->window_number);
 

	
 
		w->disabled_state = (v->owner == _local_player) ? 0 : 0x380;
 

	
 
		if (v->cargo_cap == 0) {
 
			//we cannot refit this engine
 
			SETBIT(w->disabled_state, 12);
 
		}
 

	
 
		/* draw widgets & caption */
 
		SetDParam(0, v->string_id);
 
		SetDParam(1, v->unitnumber);
 
		DrawWindowWidgets(w);
 

	
0 comments (0 inline, 0 general)