//totalbars - maxShown = max topBar internal BarracksScrollList(Barracks b, Vector2f start) { //int x = (overallRect.Height - 2 * 25) / champBarRect.Height; //scroll = overallRect.Height - (x * champBarRect.Height); maxShown = (int)((overallRect.Height - 2 * scroll) / champBarRect.Height - 1); totalBars = b.getTotalChamps(); mBarracks = b; this.start = start; disabledButtons = new List<int>(); champsItemIcons = new List<IconToolTip>(); for(int i=0;i<totalBars;i++){ ItemID item = mBarracks.getChamps()[i].item; Sprite itemS = new Sprite(Item.getItemTexture(item), new IntRect(0, 0, Item.ICON_WIDTH, Item.ICON_WIDTH)); if (item == ItemID.none) { IconToolTip itt = new IconToolTip(itemS, "none", "none"); champsItemIcons.Add(itt); } else { Item ite = new Item(item); champsItemIcons.Add(new IconToolTip(itemS, ite.name, ite.description)); } } champBarSprite = new Sprite(champBarTexture); unitIconSprite = new Sprite(); topBarDebugText = new Text(topBar + " ",GameBox.corbalFont,30U); topBarDebugText.Color = Color.Yellow; playerClassText = new Text("playerclass", GameBox.corbalFont, 15U); playerItemText = new Text("playeritem", GameBox.corbalFont, 15U); }