Changeset - r16922:7350d0102cc1
[Not reviewed]
master
0 3 0
alberth - 13 years ago 2010-12-30 15:32:31
alberth@openttd.org
(svn r21667) -Codechange: Introduce _thd.Reset().
3 files changed with 14 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/tilehighlight_type.h
Show inline comments
 
@@ -74,6 +74,8 @@ struct TileHighlightData {
 
	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.
 

	
 
	void Reset();
 

	
 
	bool IsDraggingDiagonal();
 
	Window *GetCallbackWnd();
 
};
src/viewport.cpp
Show inline comments
 
@@ -2008,6 +2008,17 @@ static HighLightStyle GetAutorailHT(int 
 
}
 

	
 
/**
 
 * 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'?
 
 * @return User is dragging a rotated rectangle.
 
 */
src/window.cpp
Show inline comments
 
@@ -1366,10 +1366,7 @@ void ResetWindowSystem()
 
{
 
	UnInitWindowSystem();
 
	InitWindowSystem();
 
	_thd.pos.x = 0;
 
	_thd.pos.y = 0;
 
	_thd.new_pos.x = 0;
 
	_thd.new_pos.y = 0;
 
	_thd.Reset();
 
}
 

	
 
static void DecreaseWindowCounters()
0 comments (0 inline, 0 general)