Add scroll buttons that appear in the production palette when icons exceed available space #7227

scroll up and down buttons: add disabled status, make dynamic, make smaller

Rename MaxIconRows to MaxIconRowOffset for clarity

Clean up scrolling logic, reset row position when switching tab
This commit is contained in:
sinaptik
2014-12-30 20:20:57 +13:00
parent b97ccc3465
commit b6b2b1a942
4 changed files with 280 additions and 32 deletions

View File

@@ -341,3 +341,33 @@ Container@PLAYER_WIDGETS:
X: 6
Y: 6
ImageCollection: production-icons
Button@SCROLL_UP_BUTTON:
Logic: AddRaceSuffixLogic
Y: 186
Width: 28
Height: 22
VisualHeight: 0
Background: sidebar-button
TooltipText: Scroll up
TooltipContainer: TOOLTIP_CONTAINER
Children:
Image@ICON:
X: 6
Y: 3
ImageCollection: scrollbar
ImageName: up_arrow
Button@SCROLL_DOWN_BUTTON:
Logic: AddRaceSuffixLogic
Y: 211
Width: 28
Height: 22
VisualHeight: 0
Background: sidebar-button
TooltipText: Scroll down
TooltipContainer: TOOLTIP_CONTAINER
Children:
Image@ICON:
X: 6
Y: 3
ImageCollection: scrollbar
ImageName: down_arrow