static void sKeyUp(VirtualKeys key) { if (!GUCMenu.KeyUpUpdateMenus(key) && Active != null) { Active.KeyUp(key); } }
public void Update(long ticks) { GUCMenu.UpdateMenus(ticks); InputControl.UpdateControls(ticks); OnUpdate?.Invoke(ticks); CheckMusic(); CheckPosition(); }
static void TOMessage(string text) { //ChatMenu.Menu.AddMessage(ChatMode.Private, text); if (GUCMenu.GetActiveMenus().FirstOrDefault(m => m is Sumpfkraut.Menus.MainMenus.GUCMainMenu) == null) { ScreenScrollText.AddText(text, GUI.GUCView.Fonts.Menu); } Log.Logger.Log(text); }
public void Load() { GUCMenu.CloseActiveMenus(); var ogame = GothicGlobals.Game; ogame.OpenLoadscreen(!GUCScripts.Ingame, zString.Create(Path)); zCViewProgressBar progBar = ogame.ProgressBar; if (progBar.Address != 0) { progBar.SetPercent(0); } Logger.LogWarning($"Clearing GameState"); ogame.ClearGameState(); progBar = ogame.ProgressBar; if (progBar.Address != 0) { progBar.SetRange(0, 92); } Logger.LogWarning($"Loading world {Path}"); ogame.LoadWorld(true, Path); progBar = ogame.ProgressBar; if (progBar.Address != 0) { progBar.ResetRange(); } progBar = ogame.ProgressBar; if (progBar.Address != 0) { progBar.SetRange(92, 100); } ogame.EnterWorld(); progBar = ogame.ProgressBar; if (progBar.Address != 0) { progBar.ResetRange(); } progBar = ogame.ProgressBar; if (progBar.Address != 0) { progBar.SetPercent(100); } ogame.SetTime(Clock.Time.GetDay(), Clock.Time.GetHour(), Clock.Time.GetMinute()); GothicGlobals.Game.CloseLoadscreen(); //Gothic.CGameManager.InitScreen_Close(); }
public void Update(long ticks) { GUCMenu.UpdateMenus(ticks); InputControl.UpdateControls(ticks); OnUpdate?.Invoke(ticks); CheckMusic(); CheckPosition(); //if (Sumpfkraut.WorldSystem.WorldInst.Current != null) // Sumpfkraut.WorldSystem.WorldInst.Current.Barrier.SetNextWeight(Sumpfkraut.WorldSystem.WorldInst.Current.Clock.Time, 1); }