コード例 #1
0
 public MenuSelectionEventArgs(MenuEntry entry, MenuScreen screen, PlayerIndex playerIndex)
     : base(playerIndex)
 {
     this.entry = entry;
     this.screen = screen;
 }
コード例 #2
0
        public MenuEntry AddMenuLabel(string text, Texture2D background, Color textColor)
        {
            MenuEntry entry = new MenuEntry(text, background, null);
            entry.Enabled = false;
            entry.TextColor = textColor;
            entry.Alignment = DefaultAlignment;

            menuEntries.Add(entry);

            return entry;
        }
コード例 #3
0
 public MenuScreen(string title)
     : base()
 {
     menuEntries = new List<MenuEntry>();
     this.title = new MenuEntry(title, null);
 }
コード例 #4
0
 public MenuEntry AddMenuEntry(string text, Texture2D background, EventHandler<MenuSelectionEventArgs> selected, bool inherit)
 {
     MenuEntry entry = new MenuEntry(text, background, selected);
     entry.Alignment = DefaultAlignment;
     if (inherit) {
         entry.TextColor = menuColor;
         entry.TextSelectedColor = menuSelectedColor;
         entry.BackgroundColor = Color.White;
         entry.BackgroundSelectedColor = menuSelectedColor;
     }
     menuEntries.Add(entry);
     return entry;
 }