Helper class represents a single entry in a MenuScreen. By default this just draws the entry text string, but it can be customized to display menu entries in different ways. This also provides an event that will be raised when the menu entry is selected.
Пример #1
0
 public void AddMenuItem(PhysicsDemoScreen screen, Texture2D preview)
 {
     MenuEntry entry = new MenuEntry(screen.GetTitle(), screen, preview);
     _menuEntrySize.X = Math.Max(_menuEntrySize.X, entry.Size.X + 20f);
     _menuEntrySize.Y = Math.Max(_menuEntrySize.Y, entry.Size.Y);
     _menuEntries.Add(entry);
 }
Пример #2
0
 public void AddMenuItem(string name, EntryType type, GameScreen screen)
 {
     MenuEntry entry = new MenuEntry(this, name, type, screen);
     _menuEntries.Add(entry);
 }
Пример #3
0
        public void AddMenuItem(string name, EntryType type, GameScreen screen)
        {
            MenuEntry entry = new MenuEntry(this, name, type, screen);

            _menuEntries.Add(entry);
        }