Changeset - r19646:8c2c8b774dc8
[Not reviewed]
master
0 1 0
planetmaker - 12 years ago 2012-10-08 21:27:21
planetmaker@openttd.org
(svn r24577) -Fix [FS#5324]: Draw the window resize sprite bottom-aligned (sbr)
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -477,15 +477,17 @@ static inline void DrawDebugBox(const Re
 
 * @param clicked Box is lowered.
 
 */
 
static inline void DrawResizeBox(const Rect &r, Colours colour, bool at_left, bool clicked)
 
{
 
	DrawFrameRect(r.left, r.top, r.right, r.bottom, colour, (clicked) ? FR_LOWERED : FR_NONE);
 
	if (at_left) {
 
		DrawSprite(SPR_WINDOW_RESIZE_LEFT, PAL_NONE, r.left + WD_RESIZEBOX_RIGHT + clicked, r.top + WD_RESIZEBOX_TOP + clicked);
 
		DrawSprite(SPR_WINDOW_RESIZE_LEFT, PAL_NONE, r.left + WD_RESIZEBOX_RIGHT + clicked,
 
				 r.bottom - WD_RESIZEBOX_BOTTOM - GetSpriteSize(SPR_WINDOW_RESIZE_LEFT).height + clicked);
 
	} else {
 
		DrawSprite(SPR_WINDOW_RESIZE_RIGHT, PAL_NONE, r.left + WD_RESIZEBOX_LEFT + clicked, r.top + WD_RESIZEBOX_TOP + clicked);
 
		DrawSprite(SPR_WINDOW_RESIZE_RIGHT, PAL_NONE, r.left + WD_RESIZEBOX_LEFT + clicked,
 
				 r.bottom - WD_RESIZEBOX_BOTTOM - GetSpriteSize(SPR_WINDOW_RESIZE_RIGHT).height + clicked);
 
	}
 
}
 

	
 
/**
 
 * Draw a close box.
 
 * @param r      Rectangle of the box.
0 comments (0 inline, 0 general)