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:
@@ -47,7 +47,7 @@ public class KeyBindingUI : MonoBehaviour
|
|||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (Keyboard.current != null && Keyboard.current[Key.F2].wasPressedThisFrame)
|
if (Keyboard.current != null && Keyboard.current[Key.Tab].wasPressedThisFrame)
|
||||||
{
|
{
|
||||||
_visible = !_visible;
|
_visible = !_visible;
|
||||||
IsVisible = _visible;
|
IsVisible = _visible;
|
||||||
@@ -132,7 +132,7 @@ public class KeyBindingUI : MonoBehaviour
|
|||||||
GUILayout.BeginHorizontal();
|
GUILayout.BeginHorizontal();
|
||||||
if (GUILayout.Button("Réinitialiser tout", ImGuiSkin.Button, GUILayout.Height(32)))
|
if (GUILayout.Button("Réinitialiser tout", ImGuiSkin.Button, GUILayout.Height(32)))
|
||||||
ResetAllBindings();
|
ResetAllBindings();
|
||||||
if (GUILayout.Button("Fermer (F2)", ImGuiSkin.Button, GUILayout.Height(32)))
|
if (GUILayout.Button("Fermer (Tab)", ImGuiSkin.Button, GUILayout.Height(32)))
|
||||||
{
|
{
|
||||||
_visible = false;
|
_visible = false;
|
||||||
CancelRebind();
|
CancelRebind();
|
||||||
@@ -146,8 +146,7 @@ public class KeyBindingUI : MonoBehaviour
|
|||||||
GUILayout.Label("Appuyez sur une touche pour assigner...", ImGuiSkin.Hint);
|
GUILayout.Label("Appuyez sur une touche pour assigner...", ImGuiSkin.Hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
// F2 hint
|
GUILayout.Label("Tab — Ouvrir / Fermer ce menu", ImGuiSkin.Footer);
|
||||||
GUILayout.Label("F2 — Ouvrir / Fermer ce menu", ImGuiSkin.Footer);
|
|
||||||
|
|
||||||
ImGuiSkin.EndWindow();
|
ImGuiSkin.EndWindow();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ public class DebugNetworkUI : MonoBehaviour
|
|||||||
_fpsCount = 0;
|
_fpsCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggle detailed panel with F1
|
// Toggle detailed panel with ` (backtick)
|
||||||
if (Keyboard.current != null && Keyboard.current[Key.F1].wasPressedThisFrame)
|
if (Keyboard.current != null && Keyboard.current[Key.Backquote].wasPressedThisFrame)
|
||||||
_detailsVisible = !_detailsVisible;
|
_detailsVisible = !_detailsVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ public class DebugNetworkUI : MonoBehaviour
|
|||||||
DrawDetailPanel(nm);
|
DrawDetailPanel(nm);
|
||||||
|
|
||||||
// Hint
|
// 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) ─────────
|
// ───────── HUD Strip (always visible) ─────────
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using UnityEngine.InputSystem;
|
|||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
/// <summary>
|
/// <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).
|
/// Polls GET /chat/history every 3s and sends via POST /chat/send (or Colyseus if connected).
|
||||||
/// Uses ImGuiSkin for visual consistency.
|
/// Uses ImGuiSkin for visual consistency.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -42,8 +42,13 @@ public class ChatUI : MonoBehaviour
|
|||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (Keyboard.current != null && Keyboard.current[Key.F3].wasPressedThisFrame)
|
if (Keyboard.current != null)
|
||||||
Toggle();
|
{
|
||||||
|
if (!_visible && Keyboard.current[Key.T].wasPressedThisFrame)
|
||||||
|
Toggle();
|
||||||
|
else if (_visible && Keyboard.current[Key.Escape].wasPressedThisFrame)
|
||||||
|
Toggle();
|
||||||
|
}
|
||||||
|
|
||||||
if (_visible)
|
if (_visible)
|
||||||
{
|
{
|
||||||
@@ -144,7 +149,7 @@ public class ChatUI : MonoBehaviour
|
|||||||
GUILayout.EndHorizontal();
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
GUILayout.Space(4f);
|
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();
|
ImGuiSkin.EndWindow();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user