diff --git a/src/addons/gdvk/GDVK.tscn b/src/addons/gdvk/GDVK.tscn new file mode 100644 index 0000000..24c3c32 --- /dev/null +++ b/src/addons/gdvk/GDVK.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://addons/gdvk/gdvk.gdns" type="Script" id=1] + +[node name="GDVK" type="Node"] +script = ExtResource( 1 ) diff --git a/src/addons/gdvk/bin/win64/.gitignore b/src/addons/gdvk/bin/win64/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/src/addons/gdvk/bin/win64/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/src/addons/gdvk/bin/x11/.gitignore b/src/addons/gdvk/bin/x11/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/src/addons/gdvk/bin/x11/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/src/addons/gdvk/gdvk.gdnlib b/src/addons/gdvk/gdvk.gdnlib new file mode 100644 index 0000000..5c71e68 --- /dev/null +++ b/src/addons/gdvk/gdvk.gdnlib @@ -0,0 +1,17 @@ +[general] + +singleton=false +load_once=true +symbol_prefix="gdvk_" +reloadable=true + +[entry] + +X11.64="res://addons/gdvk/bin/x11/libgdvk.so" +Windows.64="res://addons/gdvk/bin/win64/libgdvk.dll" + +[dependencies] + +X11.64=[ ] +Windows.64=[ ] +OSX.64=[ ] diff --git a/src/addons/gdvk/gdvk.gdns b/src/addons/gdvk/gdvk.gdns new file mode 100644 index 0000000..4b84e82 --- /dev/null +++ b/src/addons/gdvk/gdvk.gdns @@ -0,0 +1,8 @@ +[gd_resource type="NativeScript" load_steps=2 format=2] + +[ext_resource path="res://addons/gdvk/gdvk.gdnlib" type="GDNativeLibrary" id=1] + +[resource] +resource_name = "gdvk" +class_name = "GDVK" +library = ExtResource( 1 ) diff --git a/src/addons/gdvk/gdvk_plugin.gd b/src/addons/gdvk/gdvk_plugin.gd new file mode 100644 index 0000000..3ff0173 --- /dev/null +++ b/src/addons/gdvk/gdvk_plugin.gd @@ -0,0 +1,10 @@ +tool +extends EditorPlugin + + +func _enter_tree() -> void: + add_autoload_singleton("GDVK", "res://addons/gdvk/GDVK.tscn") + + +func _exit_tree() -> void: + remove_autoload_singleton("GDVK") diff --git a/src/addons/gdvk/plugin.cfg b/src/addons/gdvk/plugin.cfg new file mode 100644 index 0000000..4315d7b --- /dev/null +++ b/src/addons/gdvk/plugin.cfg @@ -0,0 +1,9 @@ +[plugin] + +name="GDVK" +description="Godot virtual keyboard plugin + +see https://github.com/CrispyPin/gdvk" +author="CrispyPin" +version="0.1.0" +script="gdvk_plugin.gd" diff --git a/src/project.godot b/src/project.godot index 08648d1..d732527 100644 --- a/src/project.godot +++ b/src/project.godot @@ -22,6 +22,7 @@ Settings="*res://addons/settings-manager/Settings.tscn" OverlayInit="*res://addons/openvr_overlay/overlay_init.gd" OverlayInteractionRoot="*res://addons/openvr_overlay/OverlayInteractionRoot.tscn" OverlayManager="*res://OverlayManager.tscn" +GDVK="*res://addons/gdvk/GDVK.tscn" [debug] @@ -35,7 +36,7 @@ window/size/height=2048 [editor_plugins] -enabled=PoolStringArray( "res://addons/godot-openvr/plugin.cfg", "res://addons/openvr_overlay/plugin.cfg", "res://addons/ovr_utils/plugin.cfg", "res://addons/settings-manager/plugin.cfg" ) +enabled=PoolStringArray( "res://addons/gdvk/plugin.cfg", "res://addons/godot-openvr/plugin.cfg", "res://addons/openvr_overlay/plugin.cfg", "res://addons/ovr_utils/plugin.cfg", "res://addons/settings-manager/plugin.cfg" ) [gdnative]