Button remapping work
This commit is contained in:
19
Zennysoft.Game.Ma/src/options/InputMapButton.cs
Normal file
19
Zennysoft.Game.Ma/src/options/InputMapButton.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Godot;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
public abstract partial class InputMapButton : Button
|
||||
{
|
||||
[Signal] public delegate void RemapEventHandler(InputMapButton buttonBeingRemapped);
|
||||
|
||||
public string Action { get; set; }
|
||||
|
||||
public InputEvent InputEvent { get; set; }
|
||||
|
||||
public InputMapButton()
|
||||
{
|
||||
Pressed += RemapButton_Pressed;
|
||||
}
|
||||
|
||||
private void RemapButton_Pressed() => EmitSignal(SignalName.Remap, this);
|
||||
}
|
||||
Reference in New Issue
Block a user