Cycle pose directly instead of radial menu with 2 or fewer poses
With a small pose set (hunter) the pose button and C hotkey advance to the next pose immediately instead of opening the radial overlay. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
21cb0ac8ad
commit
7e9f255de5
2 files changed
+29
-2
No files matched your search
@@ -14,7 +14,8 @@ using UnityEngine.InputSystem;
|
||||
/// switch game modes (via <see cref="GameModeManager.TrySwitchTo{T}"/>) or open the session browser /
|
||||
/// match results overlay, and every click closes the panel. Mode buttons are only shown for modes present in the current role-scoped set
|
||||
/// (<see cref="GameModeManager.Modes"/>); the active mode's button is disabled. Hotkeys mirror the
|
||||
/// buttons: C toggles the pose menu, V switches to paint mode (E = taunt lives in GameModeManager). Attach to the
|
||||
/// buttons: C toggles the pose menu (or cycles the pose directly with 2 or fewer poses), V switches to
|
||||
/// paint mode (E = taunt lives in GameModeManager). Attach to the
|
||||
/// always-active canvas root; <see cref="panelRoot"/> is the toggled visual child.
|
||||
/// </summary>
|
||||
public class OverviewMenu : MonoBehaviour
|
||||
@@ -50,7 +51,8 @@ public class OverviewMenu : MonoBehaviour
|
||||
[Tooltip("Triggers the hider's manual radar ping (same as the E key) and closes the menu. Only shown " +
|
||||
"for a hider during Seek.")]
|
||||
[SerializeField] private Button tauntButton;
|
||||
[Tooltip("Opens the pose selection menu. Only shown while the local player has selectable poses.")]
|
||||
[Tooltip("Opens the pose selection menu (or cycles the pose directly with 2 or fewer poses). Only " +
|
||||
"shown while the local player has selectable poses.")]
|
||||
[SerializeField] private Button poseButton;
|
||||
|
||||
private bool _open;
|
||||
@@ -174,6 +176,13 @@ public class OverviewMenu : MonoBehaviour
|
||||
|
||||
private void OnPose()
|
||||
{
|
||||
// Small pose set (hunter): no radial menu, the button/hotkey just cycles to the next pose.
|
||||
if (poseMenu && poseMenu.CyclesDirectly)
|
||||
{
|
||||
Close(resume: true);
|
||||
poseMenu.CyclePose();
|
||||
return;
|
||||
}
|
||||
Close(resume: false);
|
||||
if (!(poseMenu && poseMenu.Open()) && gameMode)
|
||||
gameMode.SetPaused(false);
|
||||
|
||||
Reference in new issue
Block a user