/// <summary> /// Add new Screen /// </summary> /// <param name="screen">New screen, name must be unique</param> public static void add_screen(Screen screen) { foreach (Screen scr in _screens) { if (scr.Name == screen.Name) { return; } } _screens.Add(screen); }
/// <summary> /// Go to screen /// </summary> /// <param name="name">Screen name</param> public static void goto_screen(string name) { foreach (Screen screen in _screens) { if (screen.Name == name) { // Shutsdown Previous Screen _previous = ActiveScreen; if (ActiveScreen != null) { ActiveScreen.Shutdown(); } // Inits New Screen ActiveScreen = screen; if (_started) ActiveScreen.Init(); return; } } }