added dialogue close command

This commit is contained in:
2023-02-24 12:53:44 +01:00
parent fef7db9b7a
commit 2c7a696821
4 changed files with 46 additions and 30 deletions

View File

@@ -10,8 +10,11 @@ public partial class essential : Node
//Checks if using Keyboard or controller and giving out current controller
if (@event is InputEventKey || @event is InputEventMouseButton || currentController == "")
currentController = "PC";
if (@event is InputEventJoypadButton)
if (@event is InputEventJoypadButton && currentController != Input.GetJoyName(0))
{
currentController = Input.GetJoyName(0);
console.Print("Current controller device: " + currentController);
}
}
public override void _Process(double delta)
{