mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2025-07-18 17:38:01 +08:00
Added UI toggler for blocking the game input, and switched some default hotkeys to match Otis_inf default hotkeys.
This commit is contained in:
@ -35,6 +35,7 @@ namespace UnityExplorer.Config
|
||||
public static ConfigElement<KeyCode> HUD_Toggle;
|
||||
public static ConfigElement<KeyCode> Freecam_Toggle;
|
||||
public static ConfigElement<KeyCode> Block_Freecam_Movement;
|
||||
public static ConfigElement<KeyCode> Toggle_Block_Games_Input;
|
||||
public static ConfigElement<KeyCode> Speed_Up_Movement;
|
||||
public static ConfigElement<KeyCode> Speed_Down_Movement;
|
||||
public static ConfigElement<KeyCode> Forwards_1;
|
||||
@ -192,10 +193,14 @@ namespace UnityExplorer.Config
|
||||
"Toggles freecamera mode.",
|
||||
KeyCode.Insert);
|
||||
|
||||
Block_Freecam_Movement = new("Block Freecam movement",
|
||||
Block_Freecam_Movement = new("Toggle block Freecam movement",
|
||||
"Blocks the freecam from moving when pressing the freecam-related hotkeys.",
|
||||
KeyCode.Home);
|
||||
|
||||
Toggle_Block_Games_Input = new("Toggle block games input",
|
||||
"Blocks the games input when the the freecam is on.",
|
||||
KeyCode.KeypadPeriod);
|
||||
|
||||
Speed_Up_Movement = new("Speed up movement",
|
||||
"Maintain this key pressed while moving the camera around to increase the freecam movement speed.",
|
||||
KeyCode.LeftShift);
|
||||
@ -246,15 +251,15 @@ namespace UnityExplorer.Config
|
||||
|
||||
Tilt_Left = new("Tilt left",
|
||||
"Tilt the camera to the left.",
|
||||
KeyCode.Q);
|
||||
KeyCode.Keypad1);
|
||||
|
||||
Tilt_Right = new("Tilt right",
|
||||
"Tilt the camera to the left.",
|
||||
KeyCode.E);
|
||||
KeyCode.Keypad3);
|
||||
|
||||
Tilt_Reset = new("Tilt reset",
|
||||
"Resets the tilt the camera.",
|
||||
KeyCode.KeypadPeriod);
|
||||
KeyCode.Keypad2);
|
||||
|
||||
Increase_FOV = new("Increase FOV",
|
||||
"Increase the field of view of the current freecam.",
|
||||
|
@ -138,6 +138,11 @@ namespace UnityExplorer
|
||||
{
|
||||
FreeCamPanel.blockFreecamMovementToggle.isOn = !FreeCamPanel.blockFreecamMovementToggle.isOn;
|
||||
}
|
||||
|
||||
if (IInputManager.GetKeyDown(ConfigManager.Toggle_Block_Games_Input.Value))
|
||||
{
|
||||
FreeCamPanel.blockGamesInputOnFreecamToggle.isOn = !FreeCamPanel.blockGamesInputOnFreecamToggle.isOn;
|
||||
}
|
||||
}
|
||||
|
||||
void stopFrameSkip(){
|
||||
|
@ -33,6 +33,7 @@ namespace UnityExplorer.Loader.Standalone
|
||||
public KeyCode HUD_Toggle;
|
||||
public KeyCode Freecam_Toggle;
|
||||
public KeyCode Block_Freecam_Movement;
|
||||
public KeyCode Toggle_Block_Games_Input;
|
||||
public KeyCode Speed_Up_Movement;
|
||||
public KeyCode Speed_Down_Movement;
|
||||
public KeyCode Forwards_1;
|
||||
@ -85,6 +86,7 @@ namespace UnityExplorer.Loader.Standalone
|
||||
ConfigManager.HUD_Toggle.Value = this.HUD_Toggle;
|
||||
ConfigManager.Freecam_Toggle.Value = this.Freecam_Toggle;
|
||||
ConfigManager.Block_Freecam_Movement.Value = this.Block_Freecam_Movement;
|
||||
ConfigManager.Toggle_Block_Games_Input.Value = this.Toggle_Block_Games_Input;
|
||||
ConfigManager.Speed_Up_Movement.Value = this.Speed_Up_Movement;
|
||||
ConfigManager.Speed_Down_Movement.Value = this.Speed_Down_Movement;
|
||||
ConfigManager.Forwards_1.Value = this.Forwards_1;
|
||||
|
@ -50,6 +50,7 @@ namespace UnityExplorer.UI.Panels
|
||||
static ButtonRef startStopButton;
|
||||
public static Toggle useGameCameraToggle;
|
||||
public static Toggle blockFreecamMovementToggle;
|
||||
public static Toggle blockGamesInputOnFreecamToggle;
|
||||
static InputFieldRef positionInput;
|
||||
static InputFieldRef moveSpeedInput;
|
||||
static Text followObjectLabel;
|
||||
@ -322,11 +323,18 @@ namespace UnityExplorer.UI.Panels
|
||||
|
||||
AddSpacer(5);
|
||||
|
||||
GameObject blockFreecamMovement = UIFactory.CreateToggle(ContentRoot, "blockFreecamMovement", out blockFreecamMovementToggle, out Text blockFreecamMovementText);
|
||||
GameObject togglesRow = UIFactory.CreateHorizontalGroup(ContentRoot, "TogglesRow", false, false, true, true, 3, default, new(1, 1, 1, 0));
|
||||
|
||||
GameObject blockFreecamMovement = UIFactory.CreateToggle(togglesRow, "blockFreecamMovement", out blockFreecamMovementToggle, out Text blockFreecamMovementText);
|
||||
UIFactory.SetLayoutElement(blockFreecamMovement, minHeight: 25, flexibleWidth: 9999);
|
||||
blockFreecamMovementToggle.isOn = false;
|
||||
blockFreecamMovementText.text = "Block Freecam movement";
|
||||
|
||||
GameObject blockGamesInputOnFreecam = UIFactory.CreateToggle(togglesRow, "blockGamesInputOnFreecam", out blockGamesInputOnFreecamToggle, out Text blockGamesInputOnFreecamText);
|
||||
UIFactory.SetLayoutElement(blockGamesInputOnFreecam, minHeight: 25, flexibleWidth: 9999);
|
||||
blockGamesInputOnFreecamToggle.isOn = true;
|
||||
blockGamesInputOnFreecamText.text = "Block games input on Freecam";
|
||||
|
||||
AddSpacer(5);
|
||||
|
||||
|
||||
@ -343,7 +351,8 @@ namespace UnityExplorer.UI.Panels
|
||||
$"- {ConfigManager.Reset_FOV.Value}: Reset FOV\n\n" +
|
||||
"Extra:\n" +
|
||||
$"- {ConfigManager.Freecam_Toggle.Value}: Freecam toggle\n" +
|
||||
$"- {ConfigManager.Block_Freecam_Movement.Value}: Block freecam movement\n" +
|
||||
$"- {ConfigManager.Block_Freecam_Movement.Value}: Toggle block Freecam\n" +
|
||||
$"- {ConfigManager.Toggle_Block_Games_Input.Value}: Toggle games input on Freecam\n" +
|
||||
$"- {ConfigManager.HUD_Toggle.Value}: HUD toggle\n" +
|
||||
$"- {ConfigManager.Pause.Value}: Pause\n" +
|
||||
$"- {ConfigManager.Frameskip.Value}: Frameskip\n";
|
||||
@ -526,7 +535,7 @@ namespace UnityExplorer.UI.Panels
|
||||
}
|
||||
|
||||
public static bool ShouldOverrideInput(){
|
||||
return inFreeCamMode;
|
||||
return inFreeCamMode && blockGamesInputOnFreecamToggle.isOn;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user