mirror of https://github.com/OpenTTD/OpenTTD
(svn r21667) -Codechange: Introduce _thd.Reset().
parent
cedb07bba3
commit
661e13a86a
|
@ -74,6 +74,8 @@ struct TileHighlightData {
|
||||||
ViewportPlaceMethod select_method; ///< The method which governs how tiles are selected.
|
ViewportPlaceMethod select_method; ///< The method which governs how tiles are selected.
|
||||||
ViewportDragDropSelectionProcess select_proc; ///< The procedure that has to be called when the selection is done.
|
ViewportDragDropSelectionProcess select_proc; ///< The procedure that has to be called when the selection is done.
|
||||||
|
|
||||||
|
void Reset();
|
||||||
|
|
||||||
bool IsDraggingDiagonal();
|
bool IsDraggingDiagonal();
|
||||||
Window *GetCallbackWnd();
|
Window *GetCallbackWnd();
|
||||||
};
|
};
|
||||||
|
|
|
@ -2007,6 +2007,17 @@ static HighLightStyle GetAutorailHT(int x, int y)
|
||||||
return HT_RAIL | _autorail_piece[x & TILE_UNIT_MASK][y & TILE_UNIT_MASK];
|
return HT_RAIL | _autorail_piece[x & TILE_UNIT_MASK][y & TILE_UNIT_MASK];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset tile highlighting.
|
||||||
|
*/
|
||||||
|
void TileHighlightData::Reset()
|
||||||
|
{
|
||||||
|
this->pos.x = 0;
|
||||||
|
this->pos.y = 0;
|
||||||
|
this->new_pos.x = 0;
|
||||||
|
this->new_pos.y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the user dragging a 'diagonal rectangle'?
|
* Is the user dragging a 'diagonal rectangle'?
|
||||||
* @return User is dragging a rotated rectangle.
|
* @return User is dragging a rotated rectangle.
|
||||||
|
|
|
@ -1366,10 +1366,7 @@ void ResetWindowSystem()
|
||||||
{
|
{
|
||||||
UnInitWindowSystem();
|
UnInitWindowSystem();
|
||||||
InitWindowSystem();
|
InitWindowSystem();
|
||||||
_thd.pos.x = 0;
|
_thd.Reset();
|
||||||
_thd.pos.y = 0;
|
|
||||||
_thd.new_pos.x = 0;
|
|
||||||
_thd.new_pos.y = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DecreaseWindowCounters()
|
static void DecreaseWindowCounters()
|
||||||
|
|
Loading…
Reference in New Issue