mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Rename CurrentKeybind to DefaultKeybind
This commit is contained in:
1 parent
d9d0d6bc62
commit
4784b1f0ad
6 files changed
+7
-7
No files matched your search
@@ -20,7 +20,7 @@ public class FreezeButton : CustomActionButton<PlayerControl>
|
||||
public override int MaxUses => (int)OptionGroupSingleton<FreezerRoleSettings>.Instance.FreezeUses;
|
||||
|
||||
public override LoadableAsset<Sprite> Sprite => ExampleAssets.ExampleButton;
|
||||
public override KeyboardKeyCode CurrentKeybind => KeyboardKeyCode.T;
|
||||
public override KeyboardKeyCode Defaultkeybind => KeyboardKeyCode.T;
|
||||
|
||||
protected override void OnClick()
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ public class MeetingButton : CustomActionButton
|
||||
public override int MaxUses => 3;
|
||||
|
||||
public override LoadableAsset<Sprite> Sprite => ExampleAssets.ExampleButton;
|
||||
public override KeyboardKeyCode CurrentKeybind => KeyboardKeyCode.P;
|
||||
public override KeyboardKeyCode Defaultkeybind => KeyboardKeyCode.P;
|
||||
|
||||
public override bool Enabled(RoleBehaviour? role)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ public class NeutralKillerButton : CustomActionButton
|
||||
public override string Name => "Win Game";
|
||||
public override float Cooldown => 0f;
|
||||
public override LoadableAsset<Sprite> Sprite => ExampleAssets.ExampleButton;
|
||||
public override KeyboardKeyCode CurrentKeybind => KeyboardKeyCode.K;
|
||||
public override KeyboardKeyCode Defaultkeybind => KeyboardKeyCode.K;
|
||||
protected override void OnClick()
|
||||
{
|
||||
CustomGameOver.Trigger<NeutralKillerGameOver>([PlayerControl.LocalPlayer.Data]);
|
||||
|
||||
@@ -22,7 +22,7 @@ public class TeleportButton : CustomActionButton
|
||||
public override LoadableAsset<Sprite> Sprite => ExampleAssets.TeleportButton;
|
||||
public override Color TextOutlineColor => new Color32(221, 176, 152, 255);
|
||||
public static bool IsZoom { get; private set; }
|
||||
public override KeyboardKeyCode CurrentKeybind => KeyboardKeyCode.M;
|
||||
public override KeyboardKeyCode Defaultkeybind => KeyboardKeyCode.M;
|
||||
public override bool Enabled(RoleBehaviour? role)
|
||||
{
|
||||
return role is TeleporterRole;
|
||||
|
||||
@@ -56,7 +56,7 @@ public abstract class CustomActionButton
|
||||
/// <summary>
|
||||
/// Gets or sets the current key binding for this button.
|
||||
/// </summary>
|
||||
public abstract KeyboardKeyCode CurrentKeybind { get; }
|
||||
public abstract KeyboardKeyCode Defaultkeybind { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the button's text outline color.
|
||||
|
||||
@@ -138,9 +138,9 @@ public sealed class MiraPluginManager
|
||||
foreach (var button in CustomButtonManager.Buttons)
|
||||
{
|
||||
|
||||
KeybindManager.Register($"{button.Name}_Keybind", $"Keybind for {button.Name}", button.CurrentKeybind, button.ClickHandler);
|
||||
KeybindManager.Register($"{button.Name}_Keybind", $"Keybind for {button.Name}", button.Defaultkeybind, button.ClickHandler);
|
||||
|
||||
Logger<MiraApiPlugin>.Info($"Registered keybind for button '{button.GetType().Name}' with default key {button.CurrentKeybind}.");
|
||||
Logger<MiraApiPlugin>.Info($"Registered keybind for button '{button.GetType().Name}' with default key {button.Defaultkeybind}.");
|
||||
}
|
||||
|
||||
var conflicts = KeybindManager.GetConflicts();
|
||||
|
||||
Reference in new issue
Block a user