public override void Initialize(bool addToManagers) { base.Initialize(addToManagers); screenTitle = new Text(); screenTitle.DisplayText = "Options"; Vector2 titlePosition = PositionHelper.percentToCoordSprite(0.0f, 50.0f); screenTitle.Y = titlePosition.Y; screenTitle.HorizontalAlignment = HorizontalAlignment.Center; TextManager.AddText(screenTitle); GuiManager.IsUIEnabled = true; listBox = GuiManager.AddListBox(); listBox.ScaleX = 20; listBox.ScaleY = 12; // The first argument to AddItem is the text to show for the item // The second argument is the object that the Item will store. // The second argment is optional, but we'll use it to reference // the background color that we want to use. listBox.AddItem("Red", Color.Red); listBox.AddItem("Blue", Color.Blue); listBox.AddItem("Yellow", Color.Yellow); for (int i = 0; i < 200; i++) { listBox.AddItem("BLAAA" + i); } if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { base.Initialize(addToManagers); screenTitle = new Text(); screenTitle.DisplayText = "Song Selection"; Vector2 titlePosition = PositionHelper.percentToCoordSprite(0.0f, 80.0f); screenTitle.Y = titlePosition.Y; screenTitle.HorizontalAlignment = HorizontalAlignment.Center; TextManager.AddText(screenTitle); GuiManager.IsUIEnabled = true; listBox = GuiManager.AddListBox(); listBox.ScaleX = 10; listBox.ScaleY = 20; for (int i = 0; i < 200; i++) { listBox.AddItem("Song " + i); } if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { base.Initialize(addToManagers); screenTitle = new Text(); screenTitle.DisplayText = "Main Menu"; Vector2 titlePosition = PositionHelper.percentToCoordSprite(0.0f, 50.0f); screenTitle.Y = titlePosition.Y; screenTitle.HorizontalAlignment = HorizontalAlignment.Center; TextManager.AddText(screenTitle); GuiManager.IsUIEnabled = true; menuList = GuiManager.AddListBox(); menuList.ScaleX = 10; menuList.ScaleY = 10; menuList.ScrollBarVisible = false; Vector2 menuPosition = PositionHelper.percentToCoordGUI(50.0f, 50.0f); menuList.Y = menuPosition.Y; menuList.AddItem("Single Player", GameState.SongSelection); menuList.AddItem("Options", GameState.Options); menuList.AddItem("Quit", GameState.QuitGame); menuList.HighlightItem("Single Player"); menuList.CallClick(); if (addToManagers) { AddToManagers(); } }