public void RestartMusic() { GameCallbacks.AddMainLoopCall(() => { CuiManager.RestartMusic(); }); }
public void Unload() { GameCallbacks.AddMainLoopCall(() => { Game.CleanupScene(); }); }
public void ReloadUi() { GameCallbacks.AddMainLoopCall(() => { UtinniCore.Utinni.CuiMisc.cui_misc.ReloadUi(); }); }
public void Reload() { GameCallbacks.AddMainLoopCall(() => { GroundScene.Get().ReloadTerrain(); }); }
public void Load(string sceneName, string avatarObjectFilename) { GameCallbacks.AddMainLoopCall(() => { Game.LoadScene(sceneName, avatarObjectFilename); }); }
public void ReloadTextures() { GameCallbacks.AddMainLoopCall(() => { Graphics.ReloadTextures(); }); }
public void RenderSkeletons(bool value) { GameCallbacks.AddMainLoopCall(() => { UtinniCore.Utinni.SkeletalAppearance.skeleton.SetRenderSkeleton(value); }); }
public void EnableWireframe(bool value) { GameCallbacks.AddMainLoopCall(() => { directx9.ToggleWireframe(); }); }
private void CleanUpDragDropObject() { GameCallbacks.AddMainLoopCall(() => { dragDropObject.Remove(); dragDropObject = null; }); }
public void ProcessInput(Keys modifierKeys, Keys key, bool isGameFocused) { if (!Enabled) { return; } foreach (var pair in Hotkeys) { Hotkey hotkey = pair.Value; if (hotkey.Enabled && hotkey.ModifierKeys == modifierKeys && hotkey.Key == key) // ToDo figure out a way to have some hotkeys only work if the game has focus { if (hotkey.OnGameFocusOnly && !isGameFocused) { continue; } if (hotkey.OverrideGameInput) { // Not happy about this solution, but works, ToDo find a better way GameCallbacks.AddPreMainLoopCall(() => { UtinniCore.Utinni.CuiIo.cui_io.EnableKeyboard(false); hotkey.OnDownCallback(); // ToDo really far from perfect, occasionally doesn't proper block a call GameCallbacks.AddMainLoopCall(() => { GameCallbacks.AddPreMainLoopCall(() => { UtinniCore.Utinni.CuiIo.cui_io.EnableKeyboard(true); }); }); }); } else { hotkey.OnDownCallback(); } } } }