first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using NitroxClient.GameLogic.ChatUI;
using NitroxModel.Core;
namespace NitroxClient.MonoBehaviours.Gui.Input.KeyBindings.Actions
{
public class ChatKeyBindingAction : KeyBindingAction
{
public override void Execute()
{
// If no other UWE input field is currently active then allow chat to open.
if (FPSInputModule.current.lastGroup == null)
{
NitroxServiceLocator.LocateService<PlayerChatManager>().SelectChat();
}
}
}
}

View File

@@ -0,0 +1,15 @@
using NitroxClient.MonoBehaviours.Discord;
using UnityEngine;
namespace NitroxClient.MonoBehaviours.Gui.Input.KeyBindings.Actions;
public class DiscordFocusBindingAction : KeyBindingAction
{
public override void Execute()
{
if (UnityEngine.Input.GetKey(KeyCode.LeftAlt))
{
DiscordJoinRequestGui.Select();
}
}
}

View File

@@ -0,0 +1,7 @@
namespace NitroxClient.MonoBehaviours.Gui.Input.KeyBindings.Actions
{
public abstract class KeyBindingAction
{
public abstract void Execute();
}
}

View File

@@ -0,0 +1,14 @@
namespace NitroxClient.MonoBehaviours.Gui.Input.KeyBindings
{
public class DefaultKeyBinding
{
public string Binding { get; }
public GameInput.BindingSet BindingSet { get; }
public DefaultKeyBinding(string defaultBinding, GameInput.BindingSet defaultBindingSet)
{
Binding = defaultBinding;
BindingSet = defaultBindingSet;
}
}
}

View File

@@ -0,0 +1,26 @@
using NitroxClient.MonoBehaviours.Gui.Input.KeyBindings.Actions;
using NitroxModel.Helper;
namespace NitroxClient.MonoBehaviours.Gui.Input.KeyBindings;
public class KeyBinding
{
public GameInput.Button Button { get; }
public GameInput.Device Device { get; }
public string Label { get; }
public string PrimaryKey { get; }
public string SecondaryKey { get; }
public KeyBindingAction Action { get; }
public KeyBinding(int keyBindingValue, string buttonLabel, GameInput.Device buttonDevice, KeyBindingAction buttonAction, string primaryKey, string secondaryKey = null)
{
Validate.NotNull(primaryKey);
Button = (GameInput.Button)keyBindingValue;
Device = buttonDevice;
Label = buttonLabel;
Action = buttonAction;
PrimaryKey = primaryKey;
SecondaryKey = secondaryKey;
}
}