Changeset - r9277:109a9e789573
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-05-17 16:59:12
smatz@openttd.org
(svn r13143) -Fix (r13142): the Build Waypoint window wasn't resized when it was opened
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -1464,24 +1464,25 @@ private:
 
		BRWW_WAYPOINT_2,
 
		BRWW_WAYPOINT_3,
 
		BRWW_WAYPOINT_4,
 
		BRWW_WAYPOINT_5,
 
		BRWW_SCROLL,
 
	};
 

	
 
public:
 
	BuildRailWaypointWindow(const WindowDesc *desc) : PickerWindowBase(desc)
 
	{
 
		this->hscroll.cap = 5;
 
		this->hscroll.count = _waypoint_count;
 
		this->FindWindowPlacementAndResize(desc);
 
	};
 

	
 
	virtual void OnPaint()
 
	{
 
		uint i;
 

	
 
		for (i = 0; i < this->hscroll.cap; i++) {
 
			this->SetWidgetLoweredState(i + BRWW_WAYPOINT_1, (this->hscroll.pos + i) == _cur_waypoint_type);
 
		}
 

	
 
		this->DrawWidgets();
 

	
0 comments (0 inline, 0 general)