update to 1.6.0
--HG-- branch : openttd
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: viewport.cpp 27271 2015-05-08 17:30:07Z frosch $ */
|
||||
/* $Id: viewport.cpp 27344 2015-07-28 08:16:52Z alberth $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -88,7 +88,7 @@
|
||||
#include <map>
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/palettes.h"
|
||||
#include "table/string_colours.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -3141,6 +3141,13 @@ EventState VpHandlePlaceSizingDrag()
|
||||
return ES_HANDLED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the cursor and mouse click/drag handling to a mode for performing special operations like tile area selection, object placement, etc.
|
||||
* @param icon New shape of the mouse cursor.
|
||||
* @param pal Palette to use.
|
||||
* @param mode Mode to perform.
|
||||
* @param w %Window requesting the mode change.
|
||||
*/
|
||||
void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Window *w)
|
||||
{
|
||||
SetObjectToPlace(icon, pal, mode, w->window_class, w->window_number);
|
||||
@@ -3148,6 +3155,14 @@ void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Wind
|
||||
|
||||
#include "table/animcursors.h"
|
||||
|
||||
/**
|
||||
* Change the cursor and mouse click/drag handling to a mode for performing special operations like tile area selection, object placement, etc.
|
||||
* @param icon New shape of the mouse cursor.
|
||||
* @param pal Palette to use.
|
||||
* @param mode Mode to perform.
|
||||
* @param window_class %Window class of the window requesting the mode change.
|
||||
* @param window_num Number of the window in its class requesting the mode change.
|
||||
*/
|
||||
void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num)
|
||||
{
|
||||
if (_thd.window_class != WC_INVALID) {
|
||||
@@ -3192,6 +3207,7 @@ void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowC
|
||||
|
||||
}
|
||||
|
||||
/** Reset the cursor and mouse mode handling back to default (normal cursor, only clicking in windows). */
|
||||
void ResetObjectToPlace()
|
||||
{
|
||||
SetObjectToPlace(SPR_CURSOR_MOUSE, PAL_NONE, HT_NONE, WC_MAIN_WINDOW, 0);
|
||||
|
||||
Reference in New Issue
Block a user