fix: remapper F1/F2/F3 -> backtick/Tab/T pour compatibilite WebGL navigateur

- DebugNetworkUI: F1 -> backtick (`)
- KeyBindingUI: F2 -> Tab
- ChatUI: F3 -> T (ouvrir seulement), Escape pour fermer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 20:53:07 +02:00
parent b993c6b3e6
commit 7327f073d8
3 changed files with 15 additions and 11 deletions

View File

@@ -47,7 +47,7 @@ public class KeyBindingUI : MonoBehaviour
void Update()
{
if (Keyboard.current != null && Keyboard.current[Key.F2].wasPressedThisFrame)
if (Keyboard.current != null && Keyboard.current[Key.Tab].wasPressedThisFrame)
{
_visible = !_visible;
IsVisible = _visible;
@@ -132,7 +132,7 @@ public class KeyBindingUI : MonoBehaviour
GUILayout.BeginHorizontal();
if (GUILayout.Button("Réinitialiser tout", ImGuiSkin.Button, GUILayout.Height(32)))
ResetAllBindings();
if (GUILayout.Button("Fermer (F2)", ImGuiSkin.Button, GUILayout.Height(32)))
if (GUILayout.Button("Fermer (Tab)", ImGuiSkin.Button, GUILayout.Height(32)))
{
_visible = false;
CancelRebind();
@@ -146,8 +146,7 @@ public class KeyBindingUI : MonoBehaviour
GUILayout.Label("Appuyez sur une touche pour assigner...", ImGuiSkin.Hint);
}
// F2 hint
GUILayout.Label("F2 — Ouvrir / Fermer ce menu", ImGuiSkin.Footer);
GUILayout.Label("Tab — Ouvrir / Fermer ce menu", ImGuiSkin.Footer);
ImGuiSkin.EndWindow();
}

View File

@@ -29,8 +29,8 @@ public class DebugNetworkUI : MonoBehaviour
_fpsCount = 0;
}
// Toggle detailed panel with F1
if (Keyboard.current != null && Keyboard.current[Key.F1].wasPressedThisFrame)
// Toggle detailed panel with ` (backtick)
if (Keyboard.current != null && Keyboard.current[Key.Backquote].wasPressedThisFrame)
_detailsVisible = !_detailsVisible;
}
@@ -47,7 +47,7 @@ public class DebugNetworkUI : MonoBehaviour
DrawDetailPanel(nm);
// Hint
GUI.Label(new Rect(10, Screen.height - 25, 300, 20), "F1 — Debug details", ImGuiSkin.Footer);
GUI.Label(new Rect(10, Screen.height - 25, 300, 20), "` — Debug details", ImGuiSkin.Footer);
}
// ───────── HUD Strip (always visible) ─────────

View File

@@ -6,7 +6,7 @@ using UnityEngine.InputSystem;
using UnityEngine.Networking;
/// <summary>
/// General chat panel. Toggle with F3.
/// General chat panel. T to open, Escape to close.
/// Polls GET /chat/history every 3s and sends via POST /chat/send (or Colyseus if connected).
/// Uses ImGuiSkin for visual consistency.
/// </summary>
@@ -42,8 +42,13 @@ public class ChatUI : MonoBehaviour
void Update()
{
if (Keyboard.current != null && Keyboard.current[Key.F3].wasPressedThisFrame)
Toggle();
if (Keyboard.current != null)
{
if (!_visible && Keyboard.current[Key.T].wasPressedThisFrame)
Toggle();
else if (_visible && Keyboard.current[Key.Escape].wasPressedThisFrame)
Toggle();
}
if (_visible)
{
@@ -144,7 +149,7 @@ public class ChatUI : MonoBehaviour
GUILayout.EndHorizontal();
GUILayout.Space(4f);
GUILayout.Label("F3 — Ouvrir / Fermer · Entrée — Envoyer", ImGuiSkin.Footer);
GUILayout.Label("T — Ouvrir · Échap — Fermer · Entrée — Envoyer", ImGuiSkin.Footer);
ImGuiSkin.EndWindow();