forked from mirror/OpenTTD
(svn r3247) - Fix: "[ 1335580 ] sticky windows not sticky anymore"
Determine clicked status of sticky icon from window flags rather than the widget click state. This keeps the status in one place where it can't get out of sync.
This commit is contained in:
2
widget.c
2
widget.c
@@ -394,6 +394,8 @@ void DrawWindowWidgets(const Window *w)
|
||||
|
||||
case WWT_STICKYBOX: {
|
||||
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
|
||||
|
||||
clicked = !!(w->flags4 & WF_STICKY);
|
||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : 0);
|
||||
DrawSprite((clicked) ? SPR_PIN_UP : SPR_PIN_DOWN, r.left + 2 + clicked, r.top + 3 + clicked);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user