private void SwitchScreen(Screen screen) { if (currentScreen != null) { currentScreen.Hide(); } currentScreen = screen; currentScreen.Show(); }
public ControlScreen(Screen previousScreen) : base() { backAction = new Action(() => { RM.SaveConfig(); Fribzel.BaseGame.ShowScreen(previousScreen); }); }
/// <summary> /// Hide the current screen (if any), then show the given screen /// </summary> /// <param name="screen"></param> public void ShowScreen(Screen screen) { if (screen != null) { SwitchScreen(screen); } }
public static Screen ControlScreen(Screen screenToGoBackTo) { return new ControlScreen(screenToGoBackTo); }