public UiSideGameScreen(GraphicsDevice graphicsDevice) : base(GameManager.WIDTH, GameManager.HEIGHT) { tabs = new UiTabs(graphicsDevice, Art.DebugFont, 3, tabDrawPos, new string[3] { "Towers", "Base", "Misc" }, Art.tabTestTexture, Art.ButtonEffectTexture, new Vector2(83, 40)); unitBuild = new List<UiButton>(); baseBuild = new List<UiButton>(); miscBuild = new List<UiButton>(); //add grouped elements to uicontrollers, do not add anything that is part of a tab. Just add the tab Add(ref tabs); CreateUi(graphicsDevice); }
public UiSideGameScreen(GraphicsDevice graphicsDevice) : base(GameManager.WIDTH, GameManager.HEIGHT) { tabs = new UiTabs(graphicsDevice, Art.DebugFont, 3, tabDrawPos, new string[3] { "Towers", "Base", "Misc" }, Color.Aquamarine, new Vector2(83, 40)); unitBuild = new List <UiButton>(); baseBuild = new List <UiButton>(); miscBuild = new List <UiButton>(); //add grouped elements to uicontrollers, do not add anything that is part of a tab. Just add the tab Add(ref tabs); CreateUi(graphicsDevice); }
public InfoScreen(GraphicsDevice graphicsDevice) { tabs = new UiTabs(graphicsDevice, Art.DebugFont, 8, new Vector2(200, 200), new string[8] { "", "", "", "", "", "", "", "" }, Art.tabTestTexture, Art.ButtonEffectTexture, new Vector2(100, 50)); backButton = new UiButton(Art.UiFont, new Vector2(20, 800), new Vector2(100, 50 ), Art.TextBoxBackGround, Art.ButtonEffectTexture, "backButton", true); backButton.SetButtonState = UiButton.UiButtonStates.Button_Up; tabs.tabList[0].tabButton.TextBoxTexture = Art.ChurchilPort; tabs.tabList[1].tabButton.TextBoxTexture = Art.StalinPort; tabs.tabList[2].tabButton.TextBoxTexture = Art.FrenchiePort; tabs.tabList[3].tabButton.TextBoxTexture = Art.HitlerPort; tabs.tabList[4].tabButton.TextBoxTexture = Art.MussoPort; tabs.tabList[5].tabButton.TextBoxTexture = Art.HiroHitoPort; tabs.tabList[6].tabButton.TextBoxTexture = Art.AlliesPort; tabs.tabList[7].tabButton.TextBoxTexture = Art.AxisPort; backButton.StringText = "Back"; backButton.StringOffset = new Vector2(10); InfoBoxes.Add(new UiTextBox(Art.InfoFont, Churchill, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[0], 0); InfoBoxes.Add(new UiTextBox(Art.InfoFont, Stalin, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[1], 1); InfoBoxes.Add(new UiTextBox(Art.InfoFont, CharlesDeGaulle, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[2], 2); InfoBoxes.Add(new UiTextBox(Art.InfoFont, Hitler, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[3], 3); InfoBoxes.Add(new UiTextBox(Art.InfoFont, Mussolini, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[4], 4); InfoBoxes.Add(new UiTextBox(Art.InfoFont, HiroHito, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[5], 5); InfoBoxes.Add(new UiTextBox(Art.InfoFont, Allies, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[6], 6); InfoBoxes.Add(new UiTextBox(Art.InfoFont, Axis, new Vector2(200, 255), Color.White, Art.TextBoxBackGround, false)); tabs.Add(InfoBoxes[7], 7); foreach (UiTextBox box in InfoBoxes) { box.TextBoxSize = new Vector2(900, 500); box.StringOffset = new Vector2(20, 10); box.LineWrapper(); } }