32 lines
650 B
C#
32 lines
650 B
C#
|
|
using Godot;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Rokojori
|
|
{
|
|
[Tool]
|
|
[GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorGroup.svg")]
|
|
public partial class KeyboardDevice: SensorDevice
|
|
{
|
|
public override LocalizedString GetDeviceName()
|
|
{
|
|
return LocaleText.Create( "Keyboard" );
|
|
}
|
|
|
|
public override bool ContainsSensor( Sensor sensor )
|
|
{
|
|
return ReflectionHelper.IsTypeOneOf( sensor,
|
|
typeof( KeySensor )
|
|
);
|
|
}
|
|
|
|
public override bool ContainsIcon( InputIcon icon )
|
|
{
|
|
return ReflectionHelper.IsTypeOneOf( icon,
|
|
typeof( KeyIcon )
|
|
);
|
|
}
|
|
|
|
|
|
}
|
|
} |