public WndClass(HeroClass cl) { var tabPerks = new PerksTab(cl); Add(tabPerks); Tab tab = new RankingTab(this, Utils.Capitalize(cl.Title()), tabPerks); tab.SetSize(TabWidth, TabHeight()); Add(tab); if (Badge.IsUnlocked(cl.MasteryBadge())) { var tabMastery = new MasteryTab(cl); Add(tabMastery); tab = new RankingTab(this, TxtMastery, tabMastery); tab.SetSize(TabWidth, TabHeight()); Add(tab); Resize((int)Math.Max(tabPerks.Width, tabMastery.Width), (int)Math.Max(tabPerks.Height, tabMastery.Height)); } else { Resize((int)tabPerks.Width, (int)tabPerks.Height); } Select(0); }
public ClassShield(HeroClass cl, StartScene startScene) { _cl = cl; _startScene = startScene; _avatar.Frame(((int)cl.Ordinal()) * WIDTH, 0, WIDTH, HEIGHT); _avatar.Scale.Set(SCALE); _name.Text(cl.Title()); _name.Measure(); _brightness = MinBrightness; UpdateBrightness(); }