public ScrollBox(ContentManager content, ControlConstants.UIBOX_INFO info) { this.content = content; UIBox scrollBox = new UIBox(content, info); this.Add(scrollBox); this.scrollBox = scrollBox; structureCards = new List <StructureCard>(); }
public void Initialize(Town town) { titleFont = content.Load <SpriteFont>(ControlConstants.STRUCTURE_CARD_TITLE_FONT); resourceFont = content.Load <SpriteFont>(ControlConstants.STRUCTURE_CARD_RESOURCE_FONT); this.town = town; Button scrollBoxUpArrow = new Button(content, ControlConstants.BUILD_SCROLLBOX_UP); scrollBoxUpArrow.Click += ScrollBoxUpArrow_Click; scrollBoxUpArrow.HoverColour = ControlConstants.BUILD_SCROLLBOX_UPDOWN_HOVER_COLOR; this.Add(scrollBoxUpArrow); buttonUp = scrollBoxUpArrow; Button scrollBoxDownArrow = new Button(content, ControlConstants.BUILD_SCROLLBOX_DOWN); scrollBoxDownArrow.Click += ScrollBoxDownArrow_Click; scrollBoxDownArrow.HoverColour = ControlConstants.BUILD_SCROLLBOX_UPDOWN_HOVER_COLOR; this.Add(scrollBoxDownArrow); buttonDown = scrollBoxDownArrow; UIBox scrollBoxSlider = new UIBox(content, ControlConstants.BUILD_SCROLLBOX_SLIDER); this.Add(scrollBoxSlider); slider = scrollBoxSlider; }