public LaunchController(IGuiHost host, ControllerConfig config, [NotNull] IDebug debug, [NotNull] UserSettings settings) { if (host == null) { throw new ArgumentNullException("host"); } this.host = host; if (config == null) { throw new ArgumentNullException("config"); } if (debug == null) { throw new ArgumentNullException("debug"); } if (settings == null) { throw new ArgumentNullException("settings"); } this.config = config; this.debug = debug; this.settings = settings; var updaterGui = new UpdaterGui(host, debug); host.SetContent(updaterGui); gui = updaterGui; }
public UpdaterGui(IGuiHost host, [NotNull] IDebug debug) : this() { if (host == null) throw new ArgumentNullException("host"); if (debug == null) throw new ArgumentNullException("debug"); this.host = host; this.debug = debug; }
public bool RemoveScreen(IGuiHost screen) { if (screen.ScreenState != ScreenState.Active) { return(false); } screen.ExitScreen(); return(true); }
public bool AddScreen(IGuiHost screen) { if (screen.ScreenState != ScreenState.Exit) { return(false); } screen.EnterScreen(); hosts.Add(screen); return(true); }
public UpdaterGui(IGuiHost host, [NotNull] IDebug debug) : this() { if (host == null) { throw new ArgumentNullException("host"); } if (debug == null) { throw new ArgumentNullException("debug"); } this.host = host; this.debug = debug; }
public LaunchController(IGuiHost host, ControllerConfig config, [NotNull] IDebug debug) { if (host == null) throw new ArgumentNullException("host"); this.host = host; if (config == null) throw new ArgumentNullException("config"); if (debug == null) throw new ArgumentNullException("debug"); this.config = config; this.debug = debug; var updaterGui = new UpdaterGui(host, debug); host.SetContent(updaterGui); gui = updaterGui; }
public void AddGuiHost(string guiHostId, IGuiHost guiHost) { Contract.Requires(!hosts.ContainsKey(guiHostId), "A GuiHost with the same id is already registered"); this.hosts.Add(guiHostId, guiHost); }
private void DrawHost(IGuiHost host) { spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend); host.Draw(spriteBatch); spriteBatch.End(); }
public bool IsShowing(IGuiHost screen) { return(hosts.Contains(screen)); }