split scrollthumb/button in chrome data; fixes screwed up RA scrollthumbs

This commit is contained in:
Chris Forbes
2011-05-22 21:05:12 +12:00
parent d8ff3b8d3a
commit 66c72d14d8
5 changed files with 103 additions and 12 deletions

View File

@@ -79,13 +79,13 @@ namespace OpenRA.Widgets
WidgetUtils.DrawPanel(Background, backgroundRect);
WidgetUtils.DrawPanel("scrollpanel-bg", scrollbarRect);
ButtonWidget.DrawBackground(upButtonRect, (thumbHeight == 0 || ListOffset >= 0),
ButtonWidget.DrawBackground("button", upButtonRect, (thumbHeight == 0 || ListOffset >= 0),
UpPressed, upButtonRect.Contains(Viewport.LastMousePos));
ButtonWidget.DrawBackground(downButtonRect, (thumbHeight == 0 || ListOffset <= Bounds.Height - ContentHeight),
ButtonWidget.DrawBackground("button", downButtonRect, (thumbHeight == 0 || ListOffset <= Bounds.Height - ContentHeight),
DownPressed, downButtonRect.Contains(Viewport.LastMousePos));
if (thumbHeight > 0)
ButtonWidget.DrawBackground(thumbRect, false, (Focused && thumbRect.Contains(Viewport.LastMousePos)),
ButtonWidget.DrawBackground("scrollthumb", thumbRect, false, (Focused && thumbRect.Contains(Viewport.LastMousePos)),
thumbRect.Contains(Viewport.LastMousePos));
var upDisabled = thumbHeight == 0 || ListOffset >= 0;