File diff r8107:82461791b7a2 → r8108:1d5bdeea7e20
src/order_gui.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file order_gui.cpp */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "road_map.h"
 
#include "station_map.h"
 
#include "table/sprites.h"
 
#include "table/strings.h"
 
#include "strings.h"
 
#include "functions.h"
 
#include "map.h"
 
#include "tile.h"
 
#include "gui.h"
 
#include "window_gui.h"
 
#include "gfx.h"
 
#include "vehicle.h"
 
#include "station.h"
 
#include "town.h"
 
#include "command.h"
 
#include "viewport.h"
 
#include "depot.h"
 
#include "waypoint.h"
 
#include "train.h"
 
#include "water_map.h"
 
#include "vehicle_gui.h"
 
#include "timetable.h"
 
#include "cargotype.h"
 
#include "order.h"
 

	
 
enum OrderWindowWidgets {
 
	ORDER_WIDGET_CLOSEBOX = 0,
 
	ORDER_WIDGET_CAPTION,
 
	ORDER_WIDGET_TIMETABLE_VIEW,
 
	ORDER_WIDGET_ORDER_LIST,
 
	ORDER_WIDGET_SCROLLBAR,
 
	ORDER_WIDGET_SKIP,
 
	ORDER_WIDGET_DELETE,
 
	ORDER_WIDGET_NON_STOP,
 
	ORDER_WIDGET_GOTO,
 
	ORDER_WIDGET_FULL_LOAD,
 
	ORDER_WIDGET_UNLOAD,
 
	ORDER_WIDGET_REFIT,
 
	ORDER_WIDGET_TRANSFER,
 
	ORDER_WIDGET_SHARED_ORDER_LIST,
 
	ORDER_WIDGET_RESIZE_BAR,
 
	ORDER_WIDGET_RESIZE,
 
};
 

	
 
/**
 
 * Return the memorised selected order.
 
 *
 
 * @param w current window
 
 * @return the memorised order if it is a vaild one
 
 *  else return the number of orders
 
 */
 
static int OrderGetSel(const Window *w)
 
{
 
	const Vehicle *v = GetVehicle(w->window_number);
 
	int num = WP(w, order_d).sel;