public LoadingScreen(FreelancerGame game, IEnumerator <object> loader) { this.game = game; this.loader = loader; manager = new XmlUIManager(game, "game", null, game.GameData.GetInterfaceXml("loading")); manager.OnConstruct(); }
public LuaMenu(FreelancerGame g) : base(g) { api = new LuaAPI(this); ui = new XmlUIManager(g, "menu", api, g.GameData.GetInterfaceXml("mainmenu")); ui.OnConstruct(); ui.Enter(); g.GameData.PopulateCursors(); g.CursorKind = CursorKind.None; intro = g.GameData.GetIntroScene(); scene = new Cutscene(intro.Scripts, Game); scene.Update(TimeSpan.FromSeconds(1f / 60f)); //Do all the setup events - smoother entrance cur = g.ResourceManager.GetCursor("arrow"); GC.Collect(); //crap g.Sound.PlayMusic(intro.Music); #if DEBUG g.Keyboard.KeyDown += Keyboard_KeyDown; #endif FadeIn(0.1, 0.3); }
public LuaMenu(FreelancerGame g) : base(g) { api = new MenuAPI(this); ui = new XmlUIManager(g, g.GameData.GetInterfaceXml("mainmenu"), new LuaAPI("menu", api), new LuaAPI("options", new OptionsAPI(this))); ui.OnConstruct(); ui.Enter(); g.GameData.PopulateCursors(); g.CursorKind = CursorKind.None; intro = g.GameData.GetIntroScene(); scene = new Cutscene(new ThnScriptContext(intro.Scripts), Game.GameData, Game.Viewport, Game); scene.Update(TimeSpan.FromSeconds(1f / 60f)); //Do all the setup events - smoother entrance FLLog.Info("Thn", "Playing " + intro.ThnName); cur = g.ResourceManager.GetCursor("arrow"); GC.Collect(); //crap g.Sound.PlayMusic(intro.Music); #if DEBUG g.Keyboard.KeyDown += Keyboard_KeyDown; #endif FadeIn(0.1, 0.3); }
public void Init() { UI.OnConstruct(); chatbox = UI.Elements.OfType <XmlChatBox>().First(); }