public XleSubMenu( IXleGameControl gameControl, IMenuRenderer menuRenderer) { this.gameControl = gameControl; this.menuRenderer = menuRenderer; }
IMenuRenderer CreateRenderer (IMenuRenderer current) { #if NET_4_0 Type newType = null; switch (RenderingMode) { case MenuRenderingMode.Default: if (RenderingCompatibilityLessThan40) newType = typeof (MenuTableRenderer); else newType = typeof (MenuListRenderer); break; case MenuRenderingMode.Table: newType = typeof (MenuTableRenderer); break; case MenuRenderingMode.List: newType = typeof (MenuListRenderer); break; } if (newType == null) return null; if (current == null || current.GetType () != newType) return Activator.CreateInstance (newType, this) as IMenuRenderer; #else if (current == null) return new MenuTableRenderer (this); #endif return current; }
public ExitOption(Game1 game) { this.game = game; renderer = new TextMenuRenderer(game, "LeafyStencil", "EXIT"); }
public ContinueOption(Game1 game) { this.game = game; renderer = new TextMenuRenderer(game, "LeafyStencil", "RESUME"); }
public NewGameOption(Game1 game) { this.game = game; renderer = new TextMenuRenderer(game, "LeafyStencil", "NEW GAME"); }