diff --git a/Icons/LocaleManager.svg b/Icons/LocaleManager.svg
new file mode 100644
index 0000000..20e085b
--- /dev/null
+++ b/Icons/LocaleManager.svg
@@ -0,0 +1,91 @@
+
+
diff --git a/Icons/LocaleManager.svg.import b/Icons/LocaleManager.svg.import
new file mode 100644
index 0000000..fde17d2
--- /dev/null
+++ b/Icons/LocaleManager.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bsm7qny5mvlo3"
+path="res://.godot/imported/LocaleManager.svg-99f36ef341f5e7ee54b895bbac31c4da.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/LocaleManager.svg"
+dest_files=["res://.godot/imported/LocaleManager.svg-99f36ef341f5e7ee54b895bbac31c4da.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/LocalizedString.svg b/Icons/LocalizedString.svg
new file mode 100644
index 0000000..01688f2
--- /dev/null
+++ b/Icons/LocalizedString.svg
@@ -0,0 +1,88 @@
+
+
diff --git a/Icons/LocalizedString.svg.import b/Icons/LocalizedString.svg.import
new file mode 100644
index 0000000..c0f1dac
--- /dev/null
+++ b/Icons/LocalizedString.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://lcmu0013ne2h"
+path="res://.godot/imported/LocalizedString.svg-3a59d02d2bc7086c51a04f8a6bdbf103.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/LocalizedString.svg"
+dest_files=["res://.godot/imported/LocalizedString.svg-3a59d02d2bc7086c51a04f8a6bdbf103.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/UI.svg b/Icons/UI.svg
new file mode 100644
index 0000000..bbda55d
--- /dev/null
+++ b/Icons/UI.svg
@@ -0,0 +1,91 @@
+
+
diff --git a/Icons/UI.svg.import b/Icons/UI.svg.import
new file mode 100644
index 0000000..5514a88
--- /dev/null
+++ b/Icons/UI.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://ckkgs7jyu6mln"
+path="res://.godot/imported/UI.svg-2c1dbd29acf8bed567f460a1a3f0addd.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/UI.svg"
+dest_files=["res://.godot/imported/UI.svg-2c1dbd29acf8bed567f460a1a3f0addd.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/UIBorderImage.svg b/Icons/UIBorderImage.svg
new file mode 100644
index 0000000..d62706c
--- /dev/null
+++ b/Icons/UIBorderImage.svg
@@ -0,0 +1,97 @@
+
+
diff --git a/Icons/UIBorderImage.svg.import b/Icons/UIBorderImage.svg.import
new file mode 100644
index 0000000..ef693d7
--- /dev/null
+++ b/Icons/UIBorderImage.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dog4illbbf485"
+path="res://.godot/imported/UIBorderImage.svg-f6615c79aa5e9b955ba62ad71b18f6b3.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/UIBorderImage.svg"
+dest_files=["res://.godot/imported/UIBorderImage.svg-f6615c79aa5e9b955ba62ad71b18f6b3.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/UIImage.svg b/Icons/UIImage.svg
new file mode 100644
index 0000000..00e32cb
--- /dev/null
+++ b/Icons/UIImage.svg
@@ -0,0 +1,126 @@
+
+
diff --git a/Icons/UIImage.svg.import b/Icons/UIImage.svg.import
new file mode 100644
index 0000000..4691dcb
--- /dev/null
+++ b/Icons/UIImage.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://rmumn1ofnjcn"
+path="res://.godot/imported/UIImage.svg-6f379e8066b7c9ce860269da60e5f378.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/UIImage.svg"
+dest_files=["res://.godot/imported/UIImage.svg-6f379e8066b7c9ce860269da60e5f378.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/UIInputIcon.svg b/Icons/UIInputIcon.svg
new file mode 100644
index 0000000..d413911
--- /dev/null
+++ b/Icons/UIInputIcon.svg
@@ -0,0 +1,306 @@
+
+
diff --git a/Icons/UIInputIcon.svg.import b/Icons/UIInputIcon.svg.import
new file mode 100644
index 0000000..0f124c6
--- /dev/null
+++ b/Icons/UIInputIcon.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://c8t6wo7phh6hv"
+path="res://.godot/imported/UIInputIcon.svg-a74c1ff64f04f884d6c9c1865a8a9a48.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/UIInputIcon.svg"
+dest_files=["res://.godot/imported/UIInputIcon.svg-a74c1ff64f04f884d6c9c1865a8a9a48.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/UIRegion.svg b/Icons/UIRegion.svg
new file mode 100644
index 0000000..372425b
--- /dev/null
+++ b/Icons/UIRegion.svg
@@ -0,0 +1,81 @@
+
+
diff --git a/Icons/UIRegion.svg.import b/Icons/UIRegion.svg.import
new file mode 100644
index 0000000..56bf6e3
--- /dev/null
+++ b/Icons/UIRegion.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://35m7k7knlg6j"
+path="res://.godot/imported/UIRegion.svg-742ebe6956a1a25b816d45d4e44b7631.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/UIRegion.svg"
+dest_files=["res://.godot/imported/UIRegion.svg-742ebe6956a1a25b816d45d4e44b7631.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Icons/UIText.svg b/Icons/UIText.svg
new file mode 100644
index 0000000..67b4d7c
--- /dev/null
+++ b/Icons/UIText.svg
@@ -0,0 +1,87 @@
+
+
diff --git a/Icons/UIText.svg.import b/Icons/UIText.svg.import
new file mode 100644
index 0000000..a342d01
--- /dev/null
+++ b/Icons/UIText.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://d3vdg0k44d7gs"
+path="res://.godot/imported/UIText.svg-3361615dbe2bc7106602a6f3edf78cb7.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Icons/UIText.svg"
+dest_files=["res://.godot/imported/UIText.svg-3361615dbe2bc7106602a6f3edf78cb7.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Actions/ActionList.cs b/Runtime/Actions/ActionList.cs
index 6a6e70a..2d439a6 100644
--- a/Runtime/Actions/ActionList.cs
+++ b/Runtime/Actions/ActionList.cs
@@ -25,7 +25,7 @@ namespace Rokojori
/** Actions to execute*/
[Export]
- public Action[] actions;
+ public Action[] actions = new Action[ 0 ];
/** Whether to execute Action child nodes*/
[Export]
diff --git a/Runtime/Actions/ActionSequence.cs b/Runtime/Actions/ActionSequence.cs
index 08e8c1b..889e30f 100644
--- a/Runtime/Actions/ActionSequence.cs
+++ b/Runtime/Actions/ActionSequence.cs
@@ -193,7 +193,7 @@ namespace Rokojori
{
/** Actions to execute*/
[Export]
- public Action[] actions;
+ public Action[] actions = new Action[ 0 ];
[Export]
public bool triggerDirectChildren = true;
diff --git a/Runtime/Actions/Node/SetNodeState.cs b/Runtime/Actions/Node/SetNodeState.cs
index 00081c1..93e5743 100644
--- a/Runtime/Actions/Node/SetNodeState.cs
+++ b/Runtime/Actions/Node/SetNodeState.cs
@@ -8,10 +8,10 @@ namespace Rokojori
public partial class SetNodeState : Action
{
[Export]
- public Node[] enable;
+ public Node[] enable = new Node[ 0 ];
[Export]
- public Node[] disable;
+ public Node[] disable = new Node[ 0 ];
protected override void _OnTrigger()
diff --git a/Runtime/Actions/OnPhysicsProcess.cs b/Runtime/Actions/OnPhysicsProcess.cs
index a0fe273..9340f2e 100644
--- a/Runtime/Actions/OnPhysicsProcess.cs
+++ b/Runtime/Actions/OnPhysicsProcess.cs
@@ -9,7 +9,7 @@ namespace Rokojori
{
/** Actions to execute*/
[Export]
- public Action[] actions;
+ public Action[] actions = new Action[ 0 ];
/** Whether to execute Action child nodes*/
[Export]
diff --git a/Runtime/Actions/OnProcess.cs b/Runtime/Actions/OnProcess.cs
index 89d99a4..f453f21 100644
--- a/Runtime/Actions/OnProcess.cs
+++ b/Runtime/Actions/OnProcess.cs
@@ -9,7 +9,7 @@ namespace Rokojori
{
/** Actions to execute*/
[Export]
- public Action[] actions;
+ public Action[] actions = new Action[ 0 ];
/** Whether to execute Action child nodes*/
[Export]
diff --git a/Runtime/Actions/OnReady.cs b/Runtime/Actions/OnReady.cs
index 562e37b..28fe0c1 100644
--- a/Runtime/Actions/OnReady.cs
+++ b/Runtime/Actions/OnReady.cs
@@ -9,7 +9,7 @@ namespace Rokojori
{
/** Actions to execute*/
[Export]
- public Action[] actions;
+ public Action[] actions = new Action[ 0 ];
/** Whether to execute Action child nodes*/
[Export]
diff --git a/Runtime/Actions/Time/TimeLooper.cs b/Runtime/Actions/OnTick.cs
similarity index 89%
rename from Runtime/Actions/Time/TimeLooper.cs
rename to Runtime/Actions/OnTick.cs
index 555c99b..11da33a 100644
--- a/Runtime/Actions/Time/TimeLooper.cs
+++ b/Runtime/Actions/OnTick.cs
@@ -5,10 +5,12 @@ using Godot;
namespace Rokojori
{
[Tool]
- [GlobalClass]
- public partial class TimeLooper : Node
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ]
+ public partial class OnTick : Node
{
+ [Export]
+ public Action action;
bool _active = false;
@@ -31,9 +33,6 @@ namespace Rokojori
[Export]
public TimeLine timeLine;
- [Export]
- public Action action;
-
int _eventID = -1;
void SetActive( bool active )
diff --git a/Runtime/Actions/Sequence/Parallel.cs b/Runtime/Actions/Sequence/Parallel.cs
index cb93a9a..148eb94 100644
--- a/Runtime/Actions/Sequence/Parallel.cs
+++ b/Runtime/Actions/Sequence/Parallel.cs
@@ -17,7 +17,7 @@ namespace Rokojori
public Mode mode = Mode.Wait_For_All_To_Finish;
[Export]
- public Action[] actions;
+ public Action[] actions = new Action[ 0 ];
[Export]
public bool triggerDirectChildren = true;
diff --git a/Runtime/Actions/SequenceAction.cs b/Runtime/Actions/SequenceAction.cs
index 828d7fc..9b63f6f 100644
--- a/Runtime/Actions/SequenceAction.cs
+++ b/Runtime/Actions/SequenceAction.cs
@@ -13,25 +13,7 @@ namespace Rokojori
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SequenceAction.svg")]
public partial class SequenceAction : Action
- {
-
- /*
-
- int dispatchStart();
- void dispatchCancelled( int id );
- void dispatchEnd( int id );
-
- int getLastSequenceActionID();
- GDVIRTUAL1( cancelAction, int );
-
- /* signal onSequenceDone * /
-
-
-
- */
-
-
-
+ {
int _dispatchCounter = 0;
public int GetLastSequenceActionID()
diff --git a/Runtime/Actions/Time/DelayedList.cs b/Runtime/Actions/Time/DelayedList.cs
index 0d512b7..c14c2de 100644
--- a/Runtime/Actions/Time/DelayedList.cs
+++ b/Runtime/Actions/Time/DelayedList.cs
@@ -19,7 +19,7 @@ namespace Rokojori
public TimeLine timeLine;
[Export]
- public Action[] actions;
+ public Action[] actions = new Action[ 0 ];
/** Whether to execute Action child nodes*/
[Export]
diff --git a/Runtime/Animation/Flash/Flash.cs b/Runtime/Animation/Flash/Flash.cs
index bc1f659..ca0a1f8 100644
--- a/Runtime/Animation/Flash/Flash.cs
+++ b/Runtime/Animation/Flash/Flash.cs
@@ -14,7 +14,7 @@ namespace Rokojori
public FlashEffect flashEffect;
[Export]
- public Node3D[] targets;
+ public Node3D[] targets = new Node3D[ 0 ];
int animationID = -1;
int actionID = -1;
diff --git a/Runtime/Animation/Highlight/Highlight.cs b/Runtime/Animation/Highlight/Highlight.cs
index e5878e8..9a665d7 100644
--- a/Runtime/Animation/Highlight/Highlight.cs
+++ b/Runtime/Animation/Highlight/Highlight.cs
@@ -18,7 +18,7 @@ namespace Rokojori
public HighlightEffect highlighter;
[Export]
- public Node3D[] targets;
+ public Node3D[] targets = new Node3D[ 0 ];
protected override void _OnTrigger()
{
diff --git a/Runtime/Animation/Highlight/HighlightEffect.cs b/Runtime/Animation/Highlight/HighlightEffect.cs
index 8eda146..3ae701f 100644
--- a/Runtime/Animation/Highlight/HighlightEffect.cs
+++ b/Runtime/Animation/Highlight/HighlightEffect.cs
@@ -15,7 +15,7 @@ namespace Rokojori
public class HighlightAnimation
{
- public Node3D[] targets;
+ public Node3D[] targets = new Node3D[ 0 ];
public int tweenID = -1;
public List materials = new List();
diff --git a/Runtime/Animation/Shake/Shake.cs b/Runtime/Animation/Shake/Shake.cs
index 3d97edc..1e9bb72 100644
--- a/Runtime/Animation/Shake/Shake.cs
+++ b/Runtime/Animation/Shake/Shake.cs
@@ -14,7 +14,7 @@ namespace Rokojori
public ShakeEffect shakeEffect;
[Export]
- public Node3D[] targets;
+ public Node3D[] targets = new Node3D[ 0 ];
List _targetValues;
diff --git a/Runtime/Animation/Transform/TransformAnimations.cs b/Runtime/Animation/Transform/TransformAnimations.cs
index 23b03bb..a39c464 100644
--- a/Runtime/Animation/Transform/TransformAnimations.cs
+++ b/Runtime/Animation/Transform/TransformAnimations.cs
@@ -11,7 +11,7 @@ namespace Rokojori
public partial class TransformAnimations:Resource
{
[Export]
- public TransformCurve[] curves;
+ public TransformCurve[] curves = new TransformCurve[ 0 ];
[Export]
public TimeLine timeline;
diff --git a/Runtime/App/App.cs b/Runtime/App/App.cs
new file mode 100644
index 0000000..0ce3c8a
--- /dev/null
+++ b/Runtime/App/App.cs
@@ -0,0 +1,53 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public enum AppPlatformOS
+ {
+ Windows,
+ MacOS,
+ iOS,
+ Android,
+ MetaHorizonOS,
+ Switch,
+ Switch2,
+ PS4,
+ PS5,
+ XBoxOne,
+ XBoxSeriesXS
+ }
+
+ public enum AppLauncher
+ {
+ Native,
+ Steam,
+ Epic,
+ Web
+ }
+
+ [Tool]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorManager.svg")]
+ public partial class App: Node
+ {
+ [Export]
+ public AppPlatformOS os;
+
+ [Export]
+ public AppLauncher launcher;
+
+ int _fps = 60;
+
+ [Export]
+ public int fps
+ {
+ get => _fps;
+ set { _fps = value; Engine.MaxFps = _fps; }
+ }
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs b/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs
index de5bb95..223392e 100644
--- a/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs
+++ b/Runtime/Audio/AudioGraph/Generators/BandLimitedWaveTable.cs
@@ -7,7 +7,7 @@ namespace Rokojori
{
public class DuoWaveTable
{
- float[] _samples;
+ float[] _samples = new float[ 0 ];
float _lowPitch;
float _highPitch;
int _maxSamples;
diff --git a/Runtime/Audio/AudioGraph/Generators/WaveTable.cs b/Runtime/Audio/AudioGraph/Generators/WaveTable.cs
index dc7ecaf..5acfbfe 100644
--- a/Runtime/Audio/AudioGraph/Generators/WaveTable.cs
+++ b/Runtime/Audio/AudioGraph/Generators/WaveTable.cs
@@ -7,7 +7,7 @@ namespace Rokojori
{
public class WaveTable:iPhaseGenerator
{
- float[] _samples;
+ float[] _samples = new float[ 0 ];
public float[] samples => _samples;
diff --git a/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs b/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs
index 9b9e3d8..a635955 100644
--- a/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs
+++ b/Runtime/Audio/AudioGraph/Structure/AudioGraph.cs
@@ -82,7 +82,7 @@ namespace Rokojori
_nodes.ForEach( n => n.UpdateBuffserSize() );
}
- float[] _zeroBuffer;
+ float[] _zeroBuffer = new float[ 0 ];
public float[] ClearBuffer( float[] buffer )
{
diff --git a/Runtime/Bits/BitView__.cs b/Runtime/Bits/BitView__.cs
index ff400b0..e58474e 100644
--- a/Runtime/Bits/BitView__.cs
+++ b/Runtime/Bits/BitView__.cs
@@ -6,7 +6,7 @@ namespace Rokojori
{
public partial class BitView
{
- byte[] _data;
+ byte[] _data = new byte[ 0 ];
int _internalViewOffset = 0;
public int bitOffset => _internalViewOffset;
diff --git a/Runtime/Bits/ByteView.cs b/Runtime/Bits/ByteView.cs
index 75aa361..b5d4ff1 100644
--- a/Runtime/Bits/ByteView.cs
+++ b/Runtime/Bits/ByteView.cs
@@ -7,7 +7,7 @@ namespace Rokojori
{
public class ByteView
{
- byte[] _data;
+ byte[] _data = new byte[ 0 ];
int _start;
int _size;
diff --git a/Runtime/Files/FilePath.cs b/Runtime/Files/FilePath.cs
index fe2e722..454df57 100644
--- a/Runtime/Files/FilePath.cs
+++ b/Runtime/Files/FilePath.cs
@@ -54,7 +54,7 @@ namespace Rokojori
}
}
- public bool hasFileExtension( string extension, bool forceDot = true )
+ public bool HasFileExtension( string extension, bool forceDot = true )
{
if ( fileExtension == null )
{
@@ -118,6 +118,31 @@ namespace Rokojori
return rp;
}
+ public string absoluteParentPath
+ {
+ get
+ {
+ return RegexUtility.ParentPath( fullPath );
+ }
+ }
+
+ public FilePath ChangeFileName( string fileName )
+ {
+ var parentPath = absoluteParentPath;
+
+ if ( ! parentPath.EndsWith( "/" ) )
+ {
+ parentPath += "/";
+ }
+
+ return Absolute( parentPath + fileName + fileExtension );
+ }
+
+ public FilePath AddToFileName( string fileNameAddition )
+ {
+ return ChangeFileName( fileName + fileNameAddition );
+ }
+
public static FilePath Absolute( string path )
{
return FilePath.Create( path, FilePathType.Absolute );
diff --git a/Runtime/Godot/Generated/GodotClassGenerator.cs b/Runtime/Godot/Generated/GodotClassGenerator.cs
index b6a205e..1ae4ec6 100644
--- a/Runtime/Godot/Generated/GodotClassGenerator.cs
+++ b/Runtime/Godot/Generated/GodotClassGenerator.cs
@@ -17,11 +17,7 @@ namespace Rokojori
[Export]
public string testClass;
- public override void _Ready()
- {
- ExportFiles();
- }
-
+
public override void _Process( double delta )
{
if ( exportFlag )
diff --git a/Runtime/Godot/HierarchyName.cs b/Runtime/Godot/HierarchyName.cs
index 594af31..f2153c3 100644
--- a/Runtime/Godot/HierarchyName.cs
+++ b/Runtime/Godot/HierarchyName.cs
@@ -6,6 +6,32 @@ namespace Rokojori
{
public class HierarchyName
{
+ public static string Of( Resource resource, string seperator = " ▸ " )
+ {
+ var path = resource.ResourcePath;
+
+ path = RegexUtility.Replace( path, "::.*$", "" );
+ path = RegexUtility.Replace( path, "^res:\\/\\/", "" );
+
+ var splitted = RegexUtility.SplitPaths( path );
+
+
+ var sb = new StringBuilder();
+
+ for ( int i = 0; i < splitted.Count; i++ )
+ {
+ if ( i != 0 )
+ {
+ sb.Append( seperator );
+ }
+
+ sb.Append( splitted[ i ] );
+ }
+
+ return sb.ToString();
+
+ }
+
public static string Of( Node node, string seperator = " ▸ " )
{
if ( node == null )
diff --git a/Runtime/Godot/Nodes.cs b/Runtime/Godot/Nodes.cs
index 7b918b8..09adb48 100644
--- a/Runtime/Godot/Nodes.cs
+++ b/Runtime/Godot/Nodes.cs
@@ -81,9 +81,29 @@ namespace Rokojori
return default(T);
}
+ public static void ForEachInRoot( this Node node, Action callback ) where T:class
+ {
+ if ( node == null )
+ {
+ return;
+ }
+
+ var tree = node.IsInsideTree() ? node.GetTree() : null;
+
+ if ( tree == null )
+ {
+ return;
+ }
+
+
+ var root = tree.Root;
+ ForEach( root, callback );
+ }
+
public static void ForEachInScene( Action callback ) where T:class
{
- var root = Root.Get().GetWindow();
+ var root = Root.Window();
+ RJLog.Log( "Iterating:", root );
ForEach( root, callback );
}
@@ -210,6 +230,17 @@ namespace Rokojori
RJLog.Error( node, messages );
}
+ public static void LogInfo( this Resource resource, params object[] messages )
+ {
+ RJLog.Log( resource, messages );
+ }
+
+ public static void LogError( this Resource resource, params object[] messages )
+ {
+ RJLog.Error( resource, messages );
+ }
+
+
public static Node DeepCopyTo( this Node node, Node parent )
{
return CopyNodeHierarchy( node, parent );
@@ -463,6 +494,16 @@ namespace Rokojori
return list;
}
+ public static T FindInParents( Node child )
+ {
+ return (T) (object) NodesWalker.Get().GetInParents( child, c => c is T );
+ }
+
+ public static T FindParentThatIs( this Node child )
+ {
+ return FindInParents( child );
+ }
+
public static int TypeIndex( Node parent, T child ) where T:Node
{
var counter = 0;
diff --git a/Runtime/Godot/Root.cs b/Runtime/Godot/Root.cs
index b062dd9..09041e1 100644
--- a/Runtime/Godot/Root.cs
+++ b/Runtime/Godot/Root.cs
@@ -35,9 +35,10 @@ namespace Rokojori
return tree.Root;
}
- public static Root Get()
+ static Root Get()
{
var r = Window();
+
return _singleton;
}
}
diff --git a/Runtime/Godot/Scenes/Exporters/HTML/SceneFIleHTMLScriptJS.cs b/Runtime/Godot/Scenes/Exporters/HTML/SceneFIleHTMLScriptJS.cs
new file mode 100644
index 0000000..d747499
--- /dev/null
+++ b/Runtime/Godot/Scenes/Exporters/HTML/SceneFIleHTMLScriptJS.cs
@@ -0,0 +1,86 @@
+using Godot;
+
+using System;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public class SceneFileHTMLScriptJS
+ {
+ public static string script =
+ @"
+ function main()
+ {
+ let elements = document.querySelectorAll( '.closeable' );
+
+ for ( let i = 0; i < elements.length; i++ )
+ {
+ let element = elements[ i ];
+
+ element.addEventListener( 'click',
+ ( ev )=>
+ {
+
+ let target = element.getAttribute( 'data-close-target' );
+
+ let targetElement = element;
+
+ let parentRegex = /^\.\.\s/;
+
+ while ( parentRegex.test( target ) )
+ {
+ target = target.replace( parentRegex, '' );
+ targetElement = targetElement.parentElement;
+ }
+
+ let rootRegex = /^\.\.\.\s/;
+
+ if ( rootRegex.test( target ) )
+ {
+ target = target.replace( rootRegex, '' );
+ targetElement = document.documentElement;
+ }
+
+ let closeTarget = element.parentElement.querySelector( target );
+
+ console.log( ev, target, closeTarget);
+ closeTarget.style.display = closeTarget.style.display === 'none' ? 'block' : 'none';
+
+ element.setAttribute( 'data-close-state', closeTarget.style.display );
+
+ ev.preventDefault();
+ return false;
+ },
+ true
+ );
+ }
+
+ let references = document.querySelectorAll( 'gd-reference' );
+
+ for ( let i = 0; i < references.length; i++ )
+ {
+ let reference = references[ i ];
+
+ reference.addEventListener( 'click',
+ ( ev )=>
+ {
+ let ref = reference.getAttribute( 'reference' );
+ let selector = `[id=##${ref}##]`;
+
+ console.log( 'querying', selector );
+ let referenced = document.querySelector( selector );
+
+ referenced.scrollIntoView( { 'behavior': 'smooth' });
+ }
+ );
+ }
+
+
+ }
+
+ window.addEventListener( 'load', () => { main(); });
+
+
+ ".Replace( "##", "\"");
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLExporter.cs b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLExporter.cs
new file mode 100644
index 0000000..7665bdc
--- /dev/null
+++ b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLExporter.cs
@@ -0,0 +1,243 @@
+using Godot;
+
+using System;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public class SceneFileHTMLExporter
+ {
+ public static readonly XMLElementNodeName GD_ExternalResource = XMLElementNodeName.Create( "gd-external-resource" );
+ public static readonly XMLElementNodeName GD_SubResource = XMLElementNodeName.Create( "gd-sub-resource" );
+
+ public static readonly XMLElementNodeName GD_Node = XMLElementNodeName.Create( "gd-node" );
+ public static readonly XMLElementNodeName GD_Name = XMLElementNodeName.Create( "gd-name" );
+ public static readonly XMLElementNodeName GD_Type = XMLElementNodeName.Create( "gd-type" );
+ public static readonly XMLElementNodeName GD_Script = XMLElementNodeName.Create( "gd-script" );
+ public static readonly XMLElementNodeName GD_Members = XMLElementNodeName.Create( "gd-members" );
+ public static readonly XMLElementNodeName GD_Member = XMLElementNodeName.Create( "gd-member" );
+ public static readonly XMLElementNodeName GD_Children = XMLElementNodeName.Create( "gd-children" );
+ public static readonly XMLElementNodeName GD_Reference = XMLElementNodeName.Create( "gd-reference" );
+
+ SceneFileParser _parser;
+ XMLDocument _htmlDoc;
+ XMLElementNode body;
+ XMLElementNode head;
+
+ public static void Convert( string inputPath, string outputPath )
+ {
+ var text = FilesSync.LoadUTF8( inputPath );
+
+ var parser = new SceneFileParser();
+
+ parser.Parse( text );
+
+ Export( parser, outputPath );
+ }
+
+ public static void Export( SceneFileParser parser, string path )
+ {
+ new SceneFileHTMLExporter().ParseAndExport( parser, path );
+ }
+
+ public void ParseAndExport( SceneFileParser parser, string path )
+ {
+ _parser = parser;
+ CreateHTMLDocument();
+
+ AddExternalResources();
+ AddNodes();
+
+ var exportPath = path.EndsWith( ".html" ) ? path : ( path + ".html" );
+
+ FilesSync.SaveUTF8( exportPath, new XMLSerializer().SerializeHtml( _htmlDoc.documentElement ) );
+ }
+
+
+ void CreateHTMLDocument()
+ {
+ var doc = XMLDocument.HTML();
+ var html = doc.documentElement;
+
+ body = html.querySelector( HTMLElementName.body );
+ head = html.querySelector( HTMLElementName.head );
+
+ head.AddHTMLScript( SceneFileHTMLScriptJS.script );
+ head.AddHTMLStyle( SceneFileHTMLStyle.style );
+
+
+ _htmlDoc = doc;
+ }
+
+ void AddExternalResources()
+ {
+ var extResources = _parser.sceneFile.extResources;
+ RJLog.Log( "External Resources:", extResources.Count );
+
+ for ( int i = 0; i < extResources.Count; i++ )
+ {
+ var resource = extResources[ i ];
+ var attachmentElement = body;
+
+ var resourceElement = _htmlDoc.Create( GD_ExternalResource );
+
+ resourceElement.SetAttribute( "class", "resource" );
+
+ attachmentElement.AppendChild( resourceElement );
+
+ var nameElement = resourceElement.AddElement( GD_Name, resource.path.value );
+
+ resourceElement.AddElement( GD_Type, resource.id.value + " " + resource.uid.value + " " + resource.type.value );
+
+ resourceElement.SetAttribute( "id", resource.id.value );
+ attachmentElement.AddElement( HTMLElementName.br );
+ }
+
+ var subResources = _parser.sceneFile.subResources;
+ RJLog.Log( "Sub Resources:", subResources.Count );
+
+ for ( int i = 0; i < subResources.Count; i++ )
+ {
+ var resource = subResources[ i ];
+ var attachmentElement = body;
+
+ var resourceElement = _htmlDoc.Create( GD_SubResource );
+
+ resourceElement.SetAttribute( "class", "resource" );
+
+ attachmentElement.AppendChild( resourceElement );
+
+
+ var nameElement = resourceElement.AddElement( GD_Name, resource.id.value + " " + resource.type.value );
+
+ var scriptOrShaderMember = resource.GetMember( "script" );
+
+ if ( scriptOrShaderMember == null )
+ {
+ scriptOrShaderMember = resource.GetMember( "shader" );
+ }
+
+ if ( scriptOrShaderMember != null )
+ {
+ var scriptEntry = _parser.sceneFile.extResources.Find( e => e.id.value == scriptOrShaderMember.valueData.reference );
+ var scriptType = scriptEntry == null ? "Null" : scriptEntry.path.value;
+ resourceElement.AddElement( GD_Type, scriptType + "@" + scriptOrShaderMember.valueData.reference );
+ }
+
+ resourceElement.SetAttribute( "id", resource.id.value );
+ attachmentElement.AddElement( HTMLElementName.br );
+ }
+ }
+
+ void AddNodes()
+ {
+ var nodes = _parser.sceneFile.nodes;
+ RJLog.Log( "Nodes:", nodes.Count );
+
+ var elementMap = new Dictionary();
+
+
+ for ( int i = 0; i < nodes.Count; i++ )
+ {
+ var node = nodes[ i ];
+
+ //RJLog.Log( i, node.name.value );
+
+ var attachmentElement = body;
+
+ var elementPath = node.elementPath;
+
+ var parent = node.parent.value;
+
+ if ( parent != null && elementMap.ContainsKey( parent ) )
+ {
+ attachmentElement = elementMap[ parent ].querySelector( GD_Children );
+ }
+
+ var nodeElement = _htmlDoc.Create( GD_Node );
+
+ nodeElement.SetAttribute( "class", "node" );
+
+ var nameElement = nodeElement.AddElement( GD_Name, node.name.value );
+ nameElement.SetAttribute( "class", "closeable" );
+ nameElement.SetAttribute( "data-close-target", ".. " + GD_Children.selector );
+
+ var scriptMember = node.GetMember( "script" );
+
+ if ( scriptMember != null )
+ {
+ var scriptEntry = _parser.sceneFile.extResources.Find( e => e.id.value == scriptMember.valueData.reference );
+ var scriptType = scriptEntry == null ? "Null" : scriptEntry.path.value;
+ nodeElement.AddElement( GD_Type, scriptType + "@" + scriptMember.valueData.reference + "(" + node.type.value + ")" );
+ }
+ else
+ {
+ nodeElement.AddElement( GD_Type, node.type.value );
+ }
+
+
+ string scriptValue = null ;
+
+ if ( scriptValue != null )
+ {
+ nodeElement.AddElement( GD_Script, scriptValue );
+ }
+
+ var membersElement = nodeElement.AddElement( GD_Members, "" );
+
+ var memberData = node.data;
+
+ memberData.ForEach(
+ m =>
+ {
+ if ( m.member != null )
+ {
+ var mem = m.member;
+
+ if ( mem.valuesData != null )
+ {
+
+ }
+ else if ( mem.valueData != null )
+ {
+
+ if ( SceneFileValueType.Variant == mem.valueData.type )
+ {
+ membersElement.AddElement( GD_Member, mem.name + ": " + mem.valueData );
+ }
+ else
+ {
+ var member = membersElement.AddElement( GD_Member, mem.name );
+ var reference = member.AddElement( GD_Reference, mem.valueData.reference );
+ reference.SetAttribute( "reference", mem.valueData.reference );
+ }
+
+ }
+
+ }
+ else
+ {
+ // membersElement.AddElement( GD_Member, "Type: " + m.type + " {" + m.line + "}");
+ }
+
+ }
+ );
+
+ nodeElement.AddElement( GD_Children );
+
+
+
+ elementMap[ elementPath ] = nodeElement;
+
+ // RJLog.Log( "'" + elementPath + "'", node.name.value );
+
+ attachmentElement.AppendChild( nodeElement );
+
+
+ }
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLStyle.cs b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLStyle.cs
new file mode 100644
index 0000000..151dbf5
--- /dev/null
+++ b/Runtime/Godot/Scenes/Exporters/HTML/SceneFileHTMLStyle.cs
@@ -0,0 +1,86 @@
+using Godot;
+
+using System;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public class SceneFileHTMLStyle
+ {
+ public static string style =
+ @"
+
+ body
+ {
+ overflow-x: hidden;
+ margin: 2em 0em;
+ font-family: Helvetica, Arial, sans;
+ background: hsl(0,0%,10%);
+ color: hsl(0,0%,80%)
+ }
+
+ .closeable
+ {
+ cursor: pointer;
+ opacity:1;
+ transition: opacity 300ms ease;
+ }
+
+ .closeable[data-close-state='none']
+ {
+ opacity: 0.7;
+ }
+
+ .node
+ {
+ display: block;
+ position: relative;
+ left: 2em;
+ }
+
+ .resource
+ {
+ display: block;
+ position: relative;
+ left: 2em;
+ }
+
+
+
+ gd-name
+ {
+ border-radius: 0.5em;
+ padding: 1em 1em;
+ background-color: hsl(0,0%,20%);
+ margin: 0.5em 1em;
+ display: inline-block;
+ font-weight: bold;
+ }
+
+ gd-external-resource gd-name
+ {
+ background-color: hsl(0,50%,20%);
+ }
+
+ gd-sub-resource gd-name
+ {
+ background-color: hsl(120,50%,20%);
+ }
+
+
+ gd-type
+ {
+ display: inline-block;
+ opacity: 0.5;
+ }
+
+ gd-reference
+ {
+ cursor:pointer;
+ text-decoration:underline;
+
+ }
+
+ " ;
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs b/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs
index 50eb16d..6e98b4e 100644
--- a/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs
+++ b/Runtime/Godot/Scenes/Objects/ExtResourceSFO.cs
@@ -10,6 +10,6 @@ namespace Rokojori
public readonly SFHStringAttribute path = new SFHStringAttribute( "path" );
public readonly SFHStringAttribute uid = new SFHStringAttribute( "uid" );
public readonly SFHStringAttribute type = new SFHStringAttribute( "type" );
-
+ public readonly SFHStringAttribute id = new SFHStringAttribute( "id" );
}
}
\ No newline at end of file
diff --git a/Runtime/Godot/Scenes/Objects/SceneFileObject.cs b/Runtime/Godot/Scenes/Objects/SceneFileObject.cs
index 476d345..0850730 100644
--- a/Runtime/Godot/Scenes/Objects/SceneFileObject.cs
+++ b/Runtime/Godot/Scenes/Objects/SceneFileObject.cs
@@ -7,17 +7,37 @@ namespace Rokojori
{
protected SceneFileEntry _headerEntry;
protected List _attributes = new List();
+ protected List _data = new List();
+
+ public List data => _data;
public SceneFileObject()
{
SetAttributes();
}
+ public SceneFileNamedValue GetMember( string name )
+ {
+ var entry = _data.Find( d => d.member != null && d.member.name == name );
+ return entry == null ? null : entry.member;
+ }
+
+
+ public void AddData( SceneFileEntry se )
+ {
+ if ( SceneFileLinesLexer.SeperatorMatcher.Matches( se.type ) )
+ {
+ return;
+ }
+
+ _data.Add( se );
+ }
+
public void CreateFromHeaderEntry( SceneFileEntry headerEntry )
{
ReadAttributes( headerEntry.header );
- _CreateFromHeaderEntry( headerEntry);
+ _CreateFromHeaderEntry( headerEntry );
}
protected virtual void _CreateFromHeaderEntry( SceneFileEntry headerEntry )
diff --git a/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs b/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs
index 07f837c..9df12fb 100644
--- a/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs
+++ b/Runtime/Godot/Scenes/Objects/SubResourceSFO.cs
@@ -7,7 +7,7 @@ namespace Rokojori
{
public static readonly string headerType = "sub_resource";
- public readonly SFHStringAttribute id = new SFHStringAttribute( "uid" );
+ public readonly SFHStringAttribute id = new SFHStringAttribute( "id" );
public readonly SFHStringAttribute type = new SFHStringAttribute( "type" );
}
}
\ No newline at end of file
diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs b/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs
index e1daba9..0ebf480 100644
--- a/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs
+++ b/Runtime/Godot/Scenes/Parsers/SceneFileLinesLexer.cs
@@ -4,11 +4,11 @@ using System.Text.RegularExpressions;
namespace Rokojori
{
- public class GodotTextSceneLexer:Lexer
+ public class SceneFileLinesLexer:Lexer
{
public static List Lex( string source )
{
- var lexer = new GodotTextSceneLexer();
+ var lexer = new SceneFileLinesLexer();
var events = lexer.LexToList( source );
if ( lexer.hasError )
@@ -50,15 +50,15 @@ namespace Rokojori
"SubMemberEnd", "\\}\\]"
);
- public GodotTextSceneLexer()
+ public SceneFileLinesLexer()
{
AddAllMatchers(
- GodotTextSceneLexer.HeaderMatcher,
- GodotTextSceneLexer.SeperatorMatcher,
- GodotTextSceneLexer.SubMemberStartMatcher,
- GodotTextSceneLexer.SubMemberEndMatcher,
- GodotTextSceneLexer.SubMemberMatcher,
- GodotTextSceneLexer.MemberMatcher,
+ SceneFileLinesLexer.HeaderMatcher,
+ SceneFileLinesLexer.SeperatorMatcher,
+ SceneFileLinesLexer.SubMemberStartMatcher,
+ SceneFileLinesLexer.SubMemberEndMatcher,
+ SceneFileLinesLexer.SubMemberMatcher,
+ SceneFileLinesLexer.MemberMatcher,
LexerMatcherLibrary.AnySymbolMatcher
);
}
diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileMemberParser.cs b/Runtime/Godot/Scenes/Parsers/SceneFileMemberParser.cs
new file mode 100644
index 0000000..a99e60e
--- /dev/null
+++ b/Runtime/Godot/Scenes/Parsers/SceneFileMemberParser.cs
@@ -0,0 +1,127 @@
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public class SceneFileMemberParser
+ {
+ public bool hasError = true;
+ public string errorMessage;
+ string line;
+
+ public void Parse( SceneFileEntry entry )
+ {
+ line = entry.line;
+
+ var lexer = new SceneFileLexer();
+ var tokens = lexer.LexToList( line );
+
+ if ( lexer.hasError || tokens.Count == 0)
+ {
+ errorMessage = "Lexing failed";
+ return;
+ }
+
+ tokens.RemoveAll( t => t.isDone );
+
+
+
+ lexer.GrabMatches( tokens, line );
+
+ if ( ! tokens[ 0 ].Is( LexerMatcherLibrary.CwordMatcher ) )
+ {
+ hasError = true;
+ errorMessage = RJLog.Stringify( "Expected name as first token, got:", tokens[ 0 ].type, ">>",tokens[ 0 ].match );
+
+ return;
+ }
+
+ var assignmentOpResult = LexerEvent.Find( tokens, 1,
+ t =>
+ {
+ if ( t.Is( LexerMatcherLibrary.OperatorMatcher, "=" ) )
+ {
+ return LexerEvent.FindResultType.Found;
+ }
+
+ if ( t.Is( LexerMatcherLibrary.WhiteSpaceMatcher ) )
+ {
+ return LexerEvent.FindResultType.KeepSearching;
+ }
+
+ return LexerEvent.FindResultType.Error;
+
+ }
+ );
+
+ if ( LexerEvent.FindResultType.Found != assignmentOpResult.type )
+ {
+ hasError = true;
+ errorMessage = RJLog.Stringify( "Expected assignment operator:", tokens ) ;
+ return;
+ }
+
+ var namedValue = new SceneFileNamedValue();
+ entry.member = namedValue;
+
+
+ namedValue.name = tokens[ 0 ].match;
+
+ var valueIndexResult = LexerEvent.Find( tokens, assignmentOpResult.index + 1,
+ ( t )=>
+ {
+ if ( t.Is( LexerMatcherLibrary.WhiteSpaceMatcher ) )
+ {
+ return LexerEvent.FindResultType.KeepSearching;
+ }
+
+ return LexerEvent.FindResultType.Found;
+ }
+ );
+
+ if ( LexerEvent.FindResultType.Found != valueIndexResult.type )
+ {
+ hasError = true;
+ errorMessage = RJLog.Stringify( "Expected value after assignment at ", assignmentOpResult.index, "in", tokens ) ;
+ return;
+ }
+
+ namedValue.value = LexerEvent.GetMatchFromRange( tokens, valueIndexResult.index );
+
+ var isList = tokens[ valueIndexResult.index ].Is( LexerMatcherLibrary.BracketMatcher, "[" );
+
+ if ( ! isList )
+ {
+ namedValue.valueData = new SceneFileValue();
+ namedValue.valueData.ParseValue( tokens, valueIndexResult.index, tokens.Count - valueIndexResult.index );
+ return;
+ }
+
+ if ( isList ){ return; }
+
+ var separators = LexerEvent.GetSeparatorsInBrackets( tokens, valueIndexResult.index );
+
+ var lastIndex = valueIndexResult.index + 1;
+
+ namedValue.valuesData = new List();
+
+ for ( int i = 0; i < separators.Count; i++ )
+ {
+ var v = new SceneFileValue();
+ v.ParseValue( tokens, lastIndex, separators[ i ] - lastIndex );
+ namedValue.valuesData.Add( v );
+
+ lastIndex = separators[ i ] + 1;
+ }
+
+ var lastV = new SceneFileValue();
+ lastV.ParseValue( tokens, lastIndex, ( tokens.Count - 1 ) - lastIndex );
+
+
+
+
+
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs b/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs
index 1b5dc4a..da0b6b9 100644
--- a/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs
+++ b/Runtime/Godot/Scenes/Parsers/SceneFileParser.cs
@@ -13,7 +13,7 @@ namespace Rokojori
this.source = source;
var lines = RegexUtility.SplitLines( source );
- var lexer = new GodotTextSceneLexer();
+ var lexer = new SceneFileLinesLexer();
var lineIndex = 1;
diff --git a/Runtime/Godot/Scenes/SceneFile.cs b/Runtime/Godot/Scenes/SceneFile.cs
index 98f321c..a1dbf51 100644
--- a/Runtime/Godot/Scenes/SceneFile.cs
+++ b/Runtime/Godot/Scenes/SceneFile.cs
@@ -17,18 +17,30 @@ namespace Rokojori
public static SceneFileEntry Seperator()
{
- return Create( GodotTextSceneLexer.SeperatorMatcher.type, "" );
+ return Create( SceneFileLinesLexer.SeperatorMatcher.type, "" );
}
+ // Parsed lines
public List entries = new List();
+
+ // Combined objects of parsed lines
public List objects = new List();
+
public GDSceneSFO gdScene;
public NodeSFO rootNode;
+
+ // Nodes of the scene
public List nodes = new List();
- public Dictionary nodeMap = new Dictionary();
+
+ // NodePath -> Node
+ public Dictionary nodePathMap = new Dictionary();
+
+ // External Resources
public List extResources = new List();
- public List subResourceSFOs = new List();
+
+ // Built-In Resources
+ public List subResources = new List();
public SceneFile GetSerializableJSONVersion()
{
@@ -40,11 +52,14 @@ namespace Rokojori
public void CreateObjects()
{
+ SceneFileObject lastSFO = null;
+
entries.ForEach(
( e )=>
{
if ( ! e.hasHeader )
{
+ lastSFO.AddData( e );
return;
}
@@ -55,6 +70,8 @@ namespace Rokojori
return;
}
+ lastSFO = sfo;
+
if ( sfo is GDSceneSFO )
{
gdScene = (GDSceneSFO) sfo;
@@ -69,7 +86,7 @@ namespace Rokojori
rootNode = node;
}
- nodeMap[ node.elementPath ] = node;
+ nodePathMap[ node.elementPath ] = node;
// RJLog.Log( "'" + node.elementPath + "'", node.name.value );
@@ -80,7 +97,7 @@ namespace Rokojori
}
else if ( sfo is SubResourceSFO )
{
- subResourceSFOs.Add( (SubResourceSFO) sfo );
+ subResources.Add( (SubResourceSFO) sfo );
}
objects.Add( sfo );
@@ -90,7 +107,7 @@ namespace Rokojori
nodes.ForEach(
( n )=>
{
- n.ResolveParent( nodeMap, rootNode );
+ n.ResolveParent( nodePathMap, rootNode );
}
);
}
diff --git a/Runtime/Godot/Scenes/SceneFileEntry.cs b/Runtime/Godot/Scenes/SceneFileEntry.cs
index efa307f..673f887 100644
--- a/Runtime/Godot/Scenes/SceneFileEntry.cs
+++ b/Runtime/Godot/Scenes/SceneFileEntry.cs
@@ -22,7 +22,7 @@ namespace Rokojori
public void Parse()
{
- if ( type == GodotTextSceneLexer.HeaderMatcher.type )
+ if ( type == SceneFileLinesLexer.HeaderMatcher.type )
{
var headerParser = new SceneFileHeaderParser();
headerParser.Parse( this );
@@ -32,6 +32,16 @@ namespace Rokojori
hasError = true;
}
}
+ else if ( type == SceneFileLinesLexer.MemberMatcher.type )
+ {
+ var memberParser = new SceneFileMemberParser();
+ memberParser.Parse( this );
+
+ if ( memberParser.hasError )
+ {
+ hasError = true;
+ }
+ }
}
}
diff --git a/Runtime/Godot/Scenes/SceneFileNamedValue.cs b/Runtime/Godot/Scenes/SceneFileNamedValue.cs
index 5212bc5..4f64f39 100644
--- a/Runtime/Godot/Scenes/SceneFileNamedValue.cs
+++ b/Runtime/Godot/Scenes/SceneFileNamedValue.cs
@@ -2,12 +2,17 @@ using Godot;
using System.Collections.Generic;
namespace Rokojori
-{
+{
+
public class SceneFileNamedValue
{
public string name;
public string value;
+ public SceneFileValue valueData;
+ public List valuesData;
+
+
public static SceneFileNamedValue Create( string name, string value )
{
var nv = new SceneFileNamedValue();
diff --git a/Runtime/Godot/Scenes/SceneFileReader.cs b/Runtime/Godot/Scenes/SceneFileReader.cs
index c008c25..6e37257 100644
--- a/Runtime/Godot/Scenes/SceneFileReader.cs
+++ b/Runtime/Godot/Scenes/SceneFileReader.cs
@@ -13,7 +13,11 @@ namespace Rokojori
public string path = "";
[Export]
- public bool load = false;
+ public bool load
+ {
+ get => false;
+ set { if ( value ) LoadScene(); }
+ }
[Export]
public bool exportJSON = false;
@@ -21,20 +25,8 @@ namespace Rokojori
[Export]
public bool exportHTML = false;
-
- public override void _Process( double delta )
- {
- LoadScene();
- }
-
void LoadScene()
{
- if ( ! load )
- {
- return;
- }
-
- load = false;
var text = FilesSync.LoadUTF8( path );
@@ -49,171 +41,11 @@ namespace Rokojori
if ( exportHTML )
{
- var nodes = parser.sceneFile.nodes;
- RJLog.Log( "Nodes:", nodes.Count );
-
- var doc = new XMLDocument();
- var html = doc.documentElement;
- var body = html.querySelector( HTMLElementName.body );
- var head = html.querySelector( HTMLElementName.head );
-
- head.AddHTMLScript(
- @"
-
- function main()
- {
- let elements = document.querySelectorAll( '.closeable' );
-
- for ( let i = 0; i < elements.length; i++ )
- {
- let element = elements[ i ];
-
- element.addEventListener( 'click',
- ( ev )=>
- {
-
- let target = element.getAttribute( 'data-close-target' );
-
- let targetElement = element;
-
- let parentRegex = /^\.\.\s/;
-
- while ( parentRegex.test( target ) )
- {
- target = target.replace( parentRegex, '' );
- targetElement = targetElement.parentElement;
- }
-
- let rootRegex = /^\.\.\.\s/;
-
- if ( rootRegex.test( target ) )
- {
- target = target.replace( rootRegex, '' );
- targetElement = document.documentElement;
- }
-
- let closeTarget = element.parentElement.querySelector( target );
-
- console.log( ev, target, closeTarget);
- closeTarget.style.display = closeTarget.style.display === 'none' ? 'block' : 'none';
-
- element.setAttribute( 'data-close-state', closeTarget.style.display );
-
- ev.preventDefault();
- return false;
- },
- true
- );
- }
- }
-
- window.addEventListener( 'load', () => { main(); });
-
- "
- );
-
- head.AddHTMLStyle(
- @"
- body
- {
- overflow-x: hidden;
- margin: 2em 0em;
- font-family: Helvetica, Arial, sans;
- background: hsl(0,0%,10%);
- color: hsl(0,0%,80%)
- }
-
- .closeable
- {
- cursor: pointer;
- opacity:1;
- transition: opacity 300ms ease;
- }
-
- .closeable[data-close-state='none']
- {
- opacity: 0.7;
- }
-
- .node
- {
- display: block;
- position: relative;
- left: 2em;
- }
-
- gd-name
- {
- border-radius: 0.5em;
- padding: 1em 1em;
- background-color: hsl(0,0%,20%);
- margin: 0.5em 1em;
- display: inline-block;
- font-weight: bold;
-
- }
-
- gd-type
- {
- display: inline-block;
- opacity: 0.5;
- }
-
- " );
-
-
-
- var elementMap = new Dictionary();
-
- var GD_Node = XMLElementNodeName.Create( "gd-node" );
- var GD_Name = XMLElementNodeName.Create( "gd-name" );
- var GD_Type = XMLElementNodeName.Create( "gd-type" );
- var GD_Children = XMLElementNodeName.Create( "gd-children" );
-
- for ( int i = 0; i < nodes.Count; i++ )
- {
- var node = nodes[ i ];
-
- //RJLog.Log( i, node.name.value );
-
- var attachmentElement = body;
-
- var elementPath = node.elementPath;
-
- var parent = node.parent.value;
-
- if ( parent != null && elementMap.ContainsKey( parent ) )
- {
- attachmentElement = elementMap[ parent ].querySelector( GD_Children );
- }
-
- var nodeElement = doc.Create( GD_Node );
-
- nodeElement.SetAttribute( "class", "node" );
-
- var nameElement = nodeElement.AddElement( GD_Name, node.name.value );
- nameElement.SetAttribute( "class", "closeable" );
- nameElement.SetAttribute( "data-close-target", ".. " + GD_Children.selector );
-
- nodeElement.AddElement( GD_Type, node.type.value );
-
- nodeElement.AddElement( GD_Children );
-
-
-
- elementMap[ elementPath ] = nodeElement;
-
- // RJLog.Log( "'" + elementPath + "'", node.name.value );
-
- attachmentElement.AppendChild( nodeElement );
-
-
- }
-
-
- FilesSync.SaveUTF8( path + ".html", new XMLSerializer().SerializeHtml( doc.documentElement ) );
+ var exporter = new SceneFileHTMLExporter();
+ exporter.ParseAndExport( parser, path );
}
}
+
}
}
\ No newline at end of file
diff --git a/Runtime/Godot/Scenes/SceneFileValue.cs b/Runtime/Godot/Scenes/SceneFileValue.cs
new file mode 100644
index 0000000..c2f45a8
--- /dev/null
+++ b/Runtime/Godot/Scenes/SceneFileValue.cs
@@ -0,0 +1,91 @@
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public enum SceneFileValueType
+ {
+ Variant,
+ ExtResource,
+ SubResource,
+ NodePath
+ }
+
+ public class SceneFileValue
+ {
+ public SceneFileValueType type;
+ public Variant variant;
+ public string reference;
+
+ public static readonly List referenceTypes = new List
+ {
+ SceneFileValueType.ExtResource,
+ SceneFileValueType.SubResource,
+ SceneFileValueType.NodePath
+ };
+
+ public static readonly List referenceStringTypes = Lists.Map(
+ referenceTypes, ( s, i ) => s + ""
+ );
+
+
+ public void ParseValue( List tokens, int start, int length )
+ {
+
+ var startToken = tokens[ start ];
+ var startTokenInfo = LexerEvent.GetMatchFromRange( tokens, start, length );
+
+ // RJLog.Log( "ParseValue", startToken.type, startToken.IsAny( LexerMatcherLibrary.CwordMatcher ), startTokenInfo );
+
+ if ( startToken.IsAny( LexerMatcherLibrary.CFunctionMatcher ) )
+ {
+ var referenceStringIndex = referenceStringTypes.IndexOf( startToken.match );
+
+ if ( referenceStringIndex != -1 )
+ {
+ type = referenceTypes[ referenceStringIndex ];
+ reference = JSONStringConverter.Read( tokens[ start + 2 ].match );
+
+ // RJLog.Log( "Reference type:", type, reference );
+
+ return;
+ }
+
+ // RJLog.Log( "Not a reference type:", startToken );
+ }
+
+ type = SceneFileValueType.Variant;
+
+ variant = VariantFromTokens( tokens, start, length );
+
+ //RJLog.Log( "Variant type:", variant );
+ }
+
+ public static Variant VariantFromTokens( List tokens, int start, int length )
+ {
+ var startToken = tokens[ start ];
+
+ if ( length == 1 )
+ {
+ if ( startToken.Is( LexerMatcherLibrary.NumberMatcher ) )
+ {
+ return Variant.From( RegexUtility.ParseDouble( startToken.match ) );
+ }
+
+ if ( startToken.Is( LexerMatcherLibrary.DoubleQuotedStringMatcher ) )
+ {
+ return Variant.From( JSONStringConverter.Read( startToken.match ) );
+ }
+
+ if ( startToken.IsAny( LexerMatcherLibrary.CwordMatcher, "true", "false" ) )
+ {
+ return Variant.From( startToken.match == "true" ) ;
+ }
+ }
+
+ return Variant.From( "" );
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Godot/Unique.cs b/Runtime/Godot/Unique.cs
index 0e04f61..8d70542 100644
--- a/Runtime/Godot/Unique.cs
+++ b/Runtime/Godot/Unique.cs
@@ -14,20 +14,32 @@ namespace Rokojori
if ( _singleton != null )
{
return _singleton;
- }
+ }
- var rootWindow = n == null ? Root.Window() : n.Owner;
-
- // RJLog.Log( "ROOT", rootWindow );
+ var rootWindow = n == null ? Root.Window() : n.Owner;
if ( rootWindow == null )
{
- return null;
+ if ( Engine.IsEditorHint() )
+ {
+ rootWindow = EditorInterface.Singleton.GetEditedSceneRoot();
+ }
+ else
+ {
+ return null;
+ }
}
_singleton = Nodes.GetAnyChild( rootWindow );
- // RJLog.Log( "_singleton", _singleton );
+ if ( _singleton == null )
+ {
+ if ( Engine.IsEditorHint() )
+ {
+ rootWindow = EditorInterface.Singleton.GetEditedSceneRoot();
+ _singleton = Nodes.GetAnyChild( rootWindow );
+ }
+ }
return _singleton;
}
diff --git a/Runtime/Interactions/Pointable.cs b/Runtime/Interactions/Pointable.cs
index 67db10f..3f0d59c 100644
--- a/Runtime/Interactions/Pointable.cs
+++ b/Runtime/Interactions/Pointable.cs
@@ -29,12 +29,12 @@ namespace Rokojori
public HighlightEffect highlightEffect;
[Export]
- public Node3D[] highlightTargets;
+ public Node3D[] highlightTargets = new Node3D[ 0 ];
[ExportGroup("Read Only")]
[Export]
- public Pointer[] pointers;
+ public Pointer[] pointers = new Pointer[ 0 ];
List _pointers = new List();
diff --git a/Runtime/LOD/LODArrangement.cs b/Runtime/LOD/LODArrangement.cs
index 5ba2b7d..32a913a 100644
--- a/Runtime/LOD/LODArrangement.cs
+++ b/Runtime/LOD/LODArrangement.cs
@@ -10,7 +10,7 @@ namespace Rokojori
public partial class LODArrangement:Resource
{
[Export]
- public LODLevel[] levels;
+ public LODLevel[] levels = new LODLevel[ 0 ];
public LODLevel GetLevel( LODNode node )
{
diff --git a/Runtime/LOD/LODLevel.cs b/Runtime/LOD/LODLevel.cs
index e319ed8..5169da3 100644
--- a/Runtime/LOD/LODLevel.cs
+++ b/Runtime/LOD/LODLevel.cs
@@ -10,7 +10,7 @@ namespace Rokojori
public partial class LODLevel:Resource
{
[Export]
- public LODLevelVisibilityRule[] visibilityRules;
+ public LODLevelVisibilityRule[] visibilityRules = new LODLevelVisibilityRule[ 0 ];
[Export]
public Mesh mesh;
diff --git a/Runtime/LOD/LODParent.cs b/Runtime/LOD/LODParent.cs
index 43ef97b..c7c823e 100644
--- a/Runtime/LOD/LODParent.cs
+++ b/Runtime/LOD/LODParent.cs
@@ -22,7 +22,7 @@ namespace Rokojori
[Export]
public bool arrayCulling = true;
[Export]
- public float[] arrayTresholds;
+ public float[] arrayTresholds = new float[ 0 ];
[ExportGroup("Curve Mode")]
[Export]
@@ -36,7 +36,7 @@ namespace Rokojori
[ExportGroup("LODs")]
[Export]
- public Node3D[] lods;
+ public Node3D[] lods = new Node3D[ 0 ];
[Export]
public float updateDistance = 10;
diff --git a/Runtime/Localization/LocaleCode.cs b/Runtime/Localization/LocaleCode.cs
index 3164efc..af56f00 100644
--- a/Runtime/Localization/LocaleCode.cs
+++ b/Runtime/Localization/LocaleCode.cs
@@ -7,31 +7,80 @@ namespace Rokojori
{
public enum LocaleCode
{
- EN,
- JA,
- DE,
- ES,
- FR,
- PT,
- IT,
- KO,
- ZH,
- RU,
- PL,
- TU,
- AR,
- NL,
- SV,
- HI,
- TH,
- ID,
- VI,
- EL,
- CS,
- FI,
- UK,
- RO,
- HU
-
+ af, // Afrikaans (South Africa, Namibia)
+ am, // Amharic (Ethiopia)
+ ar, // Arabic (Saudi Arabia, Egypt, UAE, Iraq, Morocco, Algeria, Jordan, and many more)
+ az, // Azerbaijani (Azerbaijan)
+ be, // Belarusian (Belarus)
+ bg, // Bulgarian (Bulgaria)
+ bn, // Bengali (Bangladesh, India)
+ bs, // Bosnian (Bosnia and Herzegovina)
+ ca, // Catalan (Spain - Catalonia, Andorra)
+ cs, // Czech (Czech Republic)
+ cy, // Welsh (Wales - UK)
+ da, // Danish (Denmark, Greenland)
+ de, // German (Germany, Austria, Switzerland, Liechtenstein, Belgium)
+ el, // Greek (Greece, Cyprus)
+ en, // English (UK, US, Australia, Canada, India, South Africa, and many more)
+ es, // Spanish (Spain, Mexico, Argentina, Colombia, and many more)
+ et, // Estonian (Estonia)
+ eu, // Basque (Spain - Basque Country, France - Basque areas)
+ fa, // Persian (Iran, Afghanistan, Tajikistan)
+ fi, // Finnish (Finland)
+ fil, // Filipino (Philippines)
+ fr, // French (France, Canada, Belgium, Switzerland, many African countries)
+ ga, // Irish (Ireland)
+ gl, // Galician (Spain - Galicia)
+ gu, // Gujarati (India, some in Pakistan)
+ he, // Hebrew (Israel)
+ hi, // Hindi (India, Fiji)
+ hr, // Croatian (Croatia, Bosnia and Herzegovina)
+ hu, // Hungarian (Hungary, some parts of Romania and Slovakia)
+ hy, // Armenian (Armenia)
+ id, // Indonesian (Indonesia)
+ @is, // Icelandic (Iceland)
+ it, // Italian (Italy, Switzerland, San Marino, Vatican City)
+ ja, // Japanese (Japan)
+ ka, // Georgian (Georgia)
+ kk, // Kazakh (Kazakhstan)
+ km, // Khmer (Cambodia)
+ kn, // Kannada (India - Karnataka)
+ ko, // Korean (South Korea, North Korea)
+ ky, // Kyrgyz (Kyrgyzstan)
+ lo, // Lao (Laos)
+ lt, // Lithuanian (Lithuania)
+ lv, // Latvian (Latvia)
+ mk, // Macedonian (North Macedonia)
+ ml, // Malayalam (India - Kerala)
+ mn, // Mongolian (Mongolia)
+ mr, // Marathi (India - Maharashtra)
+ ms, // Malay (Malaysia, Brunei, Singapore, Indonesia)
+ mt, // Maltese (Malta)
+ my, // Burmese (Myanmar)
+ ne, // Nepali (Nepal, India - Sikkim and West Bengal)
+ nl, // Dutch (Netherlands, Belgium, Suriname, Caribbean Netherlands)
+ no, // Norwegian (Norway)
+ pa, // Punjabi (India, Pakistan)
+ pl, // Polish (Poland)
+ ps, // Pashto (Afghanistan, Pakistan)
+ pt, // Portuguese (Portugal, Brazil, Mozambique, Angola, and others)
+ ro, // Romanian (Romania, Moldova)
+ ru, // Russian (Russia, Belarus, Kazakhstan, Kyrgyzstan, and others)
+ si, // Sinhala (Sri Lanka)
+ sk, // Slovak (Slovakia)
+ sl, // Slovenian (Slovenia)
+ sq, // Albanian (Albania, Kosovo, North Macedonia)
+ sr, // Serbian (Serbia, Bosnia and Herzegovina, Montenegro)
+ sv, // Swedish (Sweden, Finland - Åland)
+ sw, // Swahili (Tanzania, Kenya, Uganda, DRC, and others)
+ ta, // Tamil (India - Tamil Nadu, Sri Lanka, Singapore, Malaysia)
+ te, // Telugu (India - Andhra Pradesh, Telangana)
+ th, // Thai (Thailand)
+ tr, // Turkish (Turkey, Cyprus)
+ uk, // Ukrainian (Ukraine)
+ ur, // Urdu (Pakistan, India)
+ uz, // Uzbek (Uzbekistan)
+ vi, // Vietnamese (Vietnam)
+ zh, // Chinese (China, Taiwan, Singapore, Malaysia)
}
-}
\ No newline at end of file
+}
diff --git a/Runtime/Localization/LocaleLabel3D.cs b/Runtime/Localization/LocaleLabel3D.cs
new file mode 100644
index 0000000..2ccb71f
--- /dev/null
+++ b/Runtime/Localization/LocaleLabel3D.cs
@@ -0,0 +1,42 @@
+using Godot;
+using System.Collections;
+using System.Collections.Generic;
+using Godot.Collections;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass]
+ public partial class LocaleLabel3D:Label3D, iLocalizable
+ {
+ LocalizedString _locale;
+
+ [Export]
+ public LocalizedString locale
+ {
+ get
+ {
+ return _locale;
+ }
+
+ set
+ {
+ _locale = value;
+ UpdateLocalization();
+ }
+ }
+
+ [Export]
+ public bool refreshText
+ {
+ get => false;
+ set { if ( value ) UpdateLocalization(); }
+ }
+
+ public void UpdateLocalization()
+ {
+ Text = locale.currentValue;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Localization/LocaleManager.cs b/Runtime/Localization/LocaleManager.cs
index 0ed69df..b582755 100644
--- a/Runtime/Localization/LocaleManager.cs
+++ b/Runtime/Localization/LocaleManager.cs
@@ -6,10 +6,54 @@ using Godot.Collections;
namespace Rokojori
{
[Tool]
- [GlobalClass]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/LocaleManager.svg")]
public partial class LocaleManager:Node
{
+ LocaleCode _languageLocale = LocaleCode.en;
+ static LocaleCode _editorLanguageLocale = LocaleCode.en;
+
[Export]
- public LocaleCode languageLocale;
+ public LocaleCode languageLocale
+ {
+ get => _languageLocale;
+ set { _languageLocale = value; _editorLanguageLocale = value; UpdateLocalization(); }
+ }
+
+ public override void _Ready()
+ {
+ RJLog.Log( "_Ready >>", _languageLocale );
+ UpdateLocalization();
+ }
+
+ public void UpdateLocalization()
+ {
+ RJLog.Log( "Updating Language >>>", _languageLocale );
+ this.ForEachInRoot( i => { i.UpdateLocalization(); } );
+ }
+
+ public static LocaleCode currentLanguage
+ {
+ get
+ {
+ if ( Engine.IsEditorHint() )
+ {
+ return _editorLanguageLocale;
+ }
+
+
+
+ var lm = Unique.Get();
+ var lc = LocaleCode.en;
+
+ if ( lm != null )
+ {
+ lc = lm.languageLocale;
+ }
+
+ RJLog.Log( "currentLanguage", lc );
+
+ return lc;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/Runtime/Localization/LocaleText.cs b/Runtime/Localization/LocaleText.cs
index 34ee63b..6d29318 100644
--- a/Runtime/Localization/LocaleText.cs
+++ b/Runtime/Localization/LocaleText.cs
@@ -6,7 +6,7 @@ using Godot.Collections;
namespace Rokojori
{
[Tool]
- [GlobalClass]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/LocalizedString.svg")]
public partial class LocaleText:LocalizedString
{
[Export(PropertyHint.MultilineText)]
@@ -14,20 +14,28 @@ namespace Rokojori
[ExportGroup("Translations")]
[Export]
- public LocaleTextEntry[] entries;
+ public LocaleTextEntry[] entries = new LocaleTextEntry[ 0 ];
[ExportGroup("Context")]
[Export(PropertyHint.MultilineText)]
public string context;
+ public static LocaleText Create( string en )
+ {
+ var lt = new LocaleText();
+ lt.en = en;
+
+ return lt;
+ }
public override string GetLocalizedString( LocaleCode localeCode )
{
- if ( localeCode == LocaleCode.EN )
+ if ( localeCode == LocaleCode.en || entries == null )
{
return en;
}
+
var entry = Arrays.Find( entries, e => e.code == localeCode );
if ( entry != null )
diff --git a/Runtime/Localization/LocaleTextEntry.cs b/Runtime/Localization/LocaleTextEntry.cs
index 4603e66..4a012c1 100644
--- a/Runtime/Localization/LocaleTextEntry.cs
+++ b/Runtime/Localization/LocaleTextEntry.cs
@@ -6,8 +6,8 @@ using Godot.Collections;
namespace Rokojori
{
[Tool]
- [GlobalClass]
- public partial class LocaleTextEntry:LocalizedString
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/LocalizedString.svg")]
+ public partial class LocaleTextEntry:Resource
{
[Export]
public LocaleCode code;
diff --git a/Runtime/Localization/LocalizedString.cs b/Runtime/Localization/LocalizedString.cs
index 07e9264..fd6f08e 100644
--- a/Runtime/Localization/LocalizedString.cs
+++ b/Runtime/Localization/LocalizedString.cs
@@ -6,7 +6,7 @@ using Godot.Collections;
namespace Rokojori
{
[Tool]
- [GlobalClass]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/LocalizedString.svg")]
public partial class LocalizedString:Resource
{
public virtual string GetLocalizedString( LocaleCode localeCode )
@@ -14,5 +14,20 @@ namespace Rokojori
return "";
}
+ public string currentValue
+ {
+ get
+ {
+ return GetLocalizedString( LocaleManager.currentLanguage );
+ }
+ }
+
+ public static string Get( LocalizedString ls, string alternative = "")
+ {
+ return ls == null ? alternative : ls.currentValue;
+ }
+
+
+
}
}
\ No newline at end of file
diff --git a/Runtime/Localization/iLocalizable.cs b/Runtime/Localization/iLocalizable.cs
new file mode 100644
index 0000000..d729ffe
--- /dev/null
+++ b/Runtime/Localization/iLocalizable.cs
@@ -0,0 +1,12 @@
+using Godot;
+using System.Collections;
+using System.Collections.Generic;
+using Godot.Collections;
+
+namespace Rokojori
+{
+ public interface iLocalizable
+ {
+ public void UpdateLocalization();
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Logging/RJLog.cs b/Runtime/Logging/RJLog.cs
index 44cdefc..31ca7da 100644
--- a/Runtime/Logging/RJLog.cs
+++ b/Runtime/Logging/RJLog.cs
@@ -10,6 +10,33 @@ namespace Rokojori
public class RJLog
{
+ public static string GetInfo( object obj, params object[] values )
+ {
+
+ if ( obj == null )
+ {
+ return "";
+ }
+
+ var sb = new StringBuilder();
+ sb.Append( obj.GetType().Name );
+ sb.Append( "{ " );
+
+ for ( int i = 0; i < values.Length; i++ )
+ {
+ if ( i != 0 )
+ {
+ sb.Append( ", " );
+ }
+
+ Stringify( values[ i ], sb );
+ }
+
+ sb.Append( " }" );
+
+ return sb.ToString();
+ }
+
public static string Stringify( object obj )
{
var sb = new StringBuilder();
@@ -38,6 +65,33 @@ namespace Rokojori
if ( obj is double )
{
output.Append( RegexUtility.NumberToString( (double)obj ) );
+ return;
+ }
+
+ if ( obj.GetType().IsArray )
+ {
+ var array = (Array)obj;
+
+ output.Append( "[" );
+
+ var first = true;
+
+ foreach ( var it in array )
+ {
+ if ( first )
+ {
+ first = false;
+ }
+ else
+ {
+ output.Append( ", " );
+ }
+
+ Stringify( it, output );
+ }
+
+ output.Append( "]" );
+
return;
}
@@ -45,7 +99,7 @@ namespace Rokojori
{
var list = (IList)obj;
- output.Append( "[" );
+ output.Append( "[" );
var first = true;
@@ -64,7 +118,7 @@ namespace Rokojori
Stringify( it, output );
}
- output.Append( "]" );
+ output.Append( "]" );
return;
}
@@ -72,17 +126,22 @@ namespace Rokojori
output.Append( obj.ToString() );
}
+ public static string Stringify( params object[] objects )
+ {
+ return GetLogString( objects );
+ }
+
static void LogMessage( string message, int frameIndex = 3 )
{
var trace = GetTrace( frameIndex );
- GD.PrintRich("\n[b]" + message + "[/b]" );
+ GD.PrintRich("\n[b]" + message );
GD.PrintRich( trace );
}
static void LogMessageWithFullTrace( string message )
{
var trace = GetFullTrace();
- GD.PrintRich("\n[b]" + message + "[/b]" );
+ GD.PrintRich("\n[b]" + message );
GD.PrintRich( trace );
}
@@ -131,7 +190,7 @@ namespace Rokojori
var trace = className + "." + frame.GetMethod().Name + "() ln."+ frame.GetFileLineNumber();
- return "[color=gray] " + trace + "[/color]" ;
+ return "[color=#888888] " + trace + "[/color]" ;
}
public static void LogWithFullTrace( params object[] objects)
@@ -146,7 +205,12 @@ namespace Rokojori
public static void Log( Node node, params object[] objects)
{
- LogMessage( "[color=#55aaff][ " + HierarchyName.Of( node ) + " ][/color] " + GetLogString( objects ), 4 );
+ LogMessage( "[color=#55aaff]" + HierarchyName.Of( node ) + "[/color]\n" + GetLogString( objects ), 4 );
+ }
+
+ public static void Log( Resource resource, params object[] objects)
+ {
+ LogMessage( "[color=#55ffaa]" + HierarchyName.Of( resource ) + "[/color]\n" + GetLogString( objects ), 4 );
}
public static void Error( params object[] objects)
@@ -156,11 +220,17 @@ namespace Rokojori
public static void Error( Node node, params object[] objects)
{
- LogErrorMessage( "[ " + HierarchyName.Of( node ) + " ] " + GetLogString( objects ), 4 );
+ LogErrorMessage( "" + HierarchyName.Of( node ) + "\n" + GetLogString( objects ), 4 );
}
+ public static void Error( Resource resource, params object[] objects)
+ {
+ LogErrorMessage( "" + HierarchyName.Of( resource ) + "\n" + GetLogString( objects ), 4 );
+ }
- public static string GetLogString( object[] objects)
+
+
+ public static string GetLogString( object[] objects )
{
var sb = new StringBuilder();
diff --git a/Runtime/Math/FFT.cs b/Runtime/Math/FFT.cs
index 910daba..fac3c8d 100644
--- a/Runtime/Math/FFT.cs
+++ b/Runtime/Math/FFT.cs
@@ -6,7 +6,7 @@ namespace Rokojori
{
class FloatSineTable
{
- public float[] sineValues;
+ public float[] sineValues = new float[ 0 ];
public FloatSineTable( int numBits )
{
@@ -22,7 +22,7 @@ namespace Rokojori
class BitReverseTable
{
- public int[] reversedBits;
+ public int[] reversedBits = new int[ 0 ];
public BitReverseTable( int numBits )
{
diff --git a/Runtime/Networking/Data/NetClass.cs b/Runtime/Networking/Data/NetClass.cs
index 4acc8e8..55f23d3 100644
--- a/Runtime/Networking/Data/NetClass.cs
+++ b/Runtime/Networking/Data/NetClass.cs
@@ -6,7 +6,7 @@ namespace Rokojori
{
public abstract class NetClassDefinition
{
- protected NetMember[] _members;
+ protected NetMember[] _members = new NetMember[ 0 ];
public void SetMembers( params NetMember[] members )
{
diff --git a/Runtime/Networking/Nodes/AddNetworkingNodes.cs b/Runtime/Networking/Nodes/AddNetworkingNodes.cs
index 988eb17..0daf5dc 100644
--- a/Runtime/Networking/Nodes/AddNetworkingNodes.cs
+++ b/Runtime/Networking/Nodes/AddNetworkingNodes.cs
@@ -8,7 +8,7 @@ namespace Rokojori
public partial class AddNetworkNodes:Action
{
[Export]
- public Node[] nodes;
+ public Node[] nodes = new Node[ 0 ];
protected override void _OnTrigger()
{
diff --git a/Runtime/Procedural/Assets/Grass/GrassPatch.cs b/Runtime/Procedural/Assets/Grass/GrassPatch.cs
index 2c05b62..77c71a3 100644
--- a/Runtime/Procedural/Assets/Grass/GrassPatch.cs
+++ b/Runtime/Procedural/Assets/Grass/GrassPatch.cs
@@ -187,7 +187,7 @@ namespace Rokojori
[ExportGroup("LOD Levels")]
[Export]
- public GrassPatchLODLevel[] lodLevels;
+ public GrassPatchLODLevel[] lodLevels = new GrassPatchLODLevel[ 0 ];
[Export]
public int currentLODLevel = -1;
diff --git a/Runtime/Procedural/Baking/TextureMerger.cs b/Runtime/Procedural/Baking/TextureMerger.cs
index b0fa127..6519dcc 100644
--- a/Runtime/Procedural/Baking/TextureMerger.cs
+++ b/Runtime/Procedural/Baking/TextureMerger.cs
@@ -39,11 +39,11 @@ namespace Rokojori
public Node sourceViewportsContainer = null;
[Export]
- public SubViewport[] sourceViewports;
+ public SubViewport[] sourceViewports = new SubViewport[ 0 ];
[ExportGroup("Source/Textures")]
[Export]
- public Texture2D[] sourceTextures;
+ public Texture2D[] sourceTextures = new Texture2D[ 0 ];
[ExportGroup("Output")]
[Export]
@@ -60,10 +60,10 @@ namespace Rokojori
[ExportGroup("Output/Custom")]
[Export]
- public Vector2[] customPositions;
+ public Vector2[] customPositions = new Vector2[ 0 ];
[Export]
- public Vector2[] customSizes;
+ public Vector2[] customSizes = new Vector2[ 0 ];
[ExportGroup("Viewport")]
[Export]
diff --git a/Runtime/Procedural/Baking/Textures.cs b/Runtime/Procedural/Baking/Textures.cs
index 6884ca7..596b350 100644
--- a/Runtime/Procedural/Baking/Textures.cs
+++ b/Runtime/Procedural/Baking/Textures.cs
@@ -32,9 +32,9 @@ namespace Rokojori
var output = ".png";
if (
- fp.hasFileExtension( ".jpg" ) ||
- fp.hasFileExtension( ".exr" ) ||
- fp.hasFileExtension( ".webp" )
+ fp.HasFileExtension( ".jpg" ) ||
+ fp.HasFileExtension( ".exr" ) ||
+ fp.HasFileExtension( ".webp" )
)
{
output = fp.fileExtension;
diff --git a/Runtime/Procedural/HeightMap/HeightMapData.cs b/Runtime/Procedural/HeightMap/HeightMapData.cs
index 96be375..e0b0fcb 100644
--- a/Runtime/Procedural/HeightMap/HeightMapData.cs
+++ b/Runtime/Procedural/HeightMap/HeightMapData.cs
@@ -9,7 +9,7 @@ namespace Rokojori
{
int width;
int height;
- float[] data;
+ float[] data = new float[ 0 ];
public static HeightMapData Create( int w, int h, float[] data = null)
{
diff --git a/Runtime/Procedural/Mesh/MassRenderer.cs b/Runtime/Procedural/Mesh/MassRenderer.cs
index 89fce11..a9fce4b 100644
--- a/Runtime/Procedural/Mesh/MassRenderer.cs
+++ b/Runtime/Procedural/Mesh/MassRenderer.cs
@@ -33,13 +33,13 @@ namespace Rokojori
[ExportGroup("Layout")]
[Export]
- public Vector3[] positions;
+ public Vector3[] positions = new Vector3[ 0 ];
[Export]
- public Vector4[] rotations;
+ public Vector4[] rotations = new Vector4[ 0 ];
[Export]
- public Vector3[] scales;
+ public Vector3[] scales = new Vector3[ 0 ];
[ExportGroup("Outputs")]
[Export]
diff --git a/Runtime/Procedural/Mesh/MeshCombiner.cs b/Runtime/Procedural/Mesh/MeshCombiner.cs
index fe8737a..509719f 100644
--- a/Runtime/Procedural/Mesh/MeshCombiner.cs
+++ b/Runtime/Procedural/Mesh/MeshCombiner.cs
@@ -12,7 +12,7 @@ namespace Rokojori
public partial class MeshCombiner:Node3D
{
[Export]
- public Node3D[] sourceNodes;
+ public Node3D[] sourceNodes = new Node3D[ 0 ];
[ExportGroup( "Mesh")]
[Export]
@@ -51,7 +51,7 @@ namespace Rokojori
[Export]
public MeshInstance3D outputMesh;
[Export]
- public Material[] outputMaterials;
+ public Material[] outputMaterials = new Material[ 0 ];
[Export]
public bool combine = false;
diff --git a/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs b/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs
index 0327973..f3e3c99 100644
--- a/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs
+++ b/Runtime/Procedural/Mesh/Modifiers/SplinesDeformer/SplinesDeformerModifier.cs
@@ -17,8 +17,8 @@ namespace Rokojori
public class SplinesDeformModifier
{
- public SplineCurve[] sourceSplines;
- public SplineCurve[] targetSplines;
+ public SplineCurve[] sourceSplines = new SplineCurve[ 0 ];
+ public SplineCurve[] targetSplines = new SplineCurve[ 0 ];
public SplinesDeformerSettings settings;
diff --git a/Runtime/Procedural/MeshCreationTest.cs b/Runtime/Procedural/MeshCreationTest.cs
index 61e5849..8549f2b 100644
--- a/Runtime/Procedural/MeshCreationTest.cs
+++ b/Runtime/Procedural/MeshCreationTest.cs
@@ -54,7 +54,7 @@ namespace Rokojori
public bool createNavMesh = false;
[Export]
- public Node3D[] countries;
+ public Node3D[] countries = new Node3D[ 0 ];
[Export]
public float navMeshRadius = 100;
diff --git a/Runtime/Procedural/Parametric/Deformer/Deformer.cs b/Runtime/Procedural/Parametric/Deformer/Deformer.cs
index 84496ce..5b1fb63 100644
--- a/Runtime/Procedural/Parametric/Deformer/Deformer.cs
+++ b/Runtime/Procedural/Parametric/Deformer/Deformer.cs
@@ -36,7 +36,7 @@ namespace Rokojori
[ExportGroup( "Input")]
[Export]
- public Spline[] sourceSplines;
+ public Spline[] sourceSplines = new Spline[ 0 ];
[Export]
public MeshInstance3D sourceMesh;
@@ -46,7 +46,7 @@ namespace Rokojori
[ExportGroup( "Output")]
[Export]
- public Spline[] deformerSplines;
+ public Spline[] deformerSplines = new Spline[ 0 ];
[Export]
public MeshInstance3D outputMesh;
@@ -72,7 +72,7 @@ namespace Rokojori
- DeformerMappingData[] deformerMappings;
+ DeformerMappingData[] deformerMappings = new DeformerMappingData[ 0 ];
MeshGeometry meshGeometry;
DeformerMappingData CreateSourceMapping( Spline s, Vector3 worldPosition, Vector3 worldNormal )
diff --git a/Runtime/Procedural/Parametric/Tube/Tube.cs b/Runtime/Procedural/Parametric/Tube/Tube.cs
index 80e9736..38d3b0d 100644
--- a/Runtime/Procedural/Parametric/Tube/Tube.cs
+++ b/Runtime/Procedural/Parametric/Tube/Tube.cs
@@ -68,7 +68,7 @@ namespace Rokojori
public bool scaleRadiusByPathTransforms = true;
[Export]
- public TubeShape[] shapes;
+ public TubeShape[] shapes = new TubeShape[ 0 ];
[Export]
public bool update;
diff --git a/Runtime/Procedural/Scatter/Scatterer.cs b/Runtime/Procedural/Scatter/Scatterer.cs
index a7c1f45..8a9e60a 100644
--- a/Runtime/Procedural/Scatter/Scatterer.cs
+++ b/Runtime/Procedural/Scatter/Scatterer.cs
@@ -21,7 +21,7 @@ namespace Rokojori
[Export]
public bool removeDiscarded = false;
[Export]
- public Node3D[] streamSources;
+ public Node3D[] streamSources = new Node3D[ 0 ];
[Export]
public float streamCullDistance = 100;
@@ -34,7 +34,7 @@ namespace Rokojori
[ExportGroup("Clean Up")]
[Export]
- public Node3D[] containersToClearNodes;
+ public Node3D[] containersToClearNodes = new Node3D[ 0 ];
[Export]
public bool clearContainers = false;
[Export]
diff --git a/Runtime/Sensors/CombineSensor.cs b/Runtime/Sensors/CombineSensor.cs
index 614d3fe..0dc3904 100644
--- a/Runtime/Sensors/CombineSensor.cs
+++ b/Runtime/Sensors/CombineSensor.cs
@@ -1,6 +1,6 @@
using Godot;
-
+using System.Collections.Generic;
namespace Rokojori
{
@@ -9,8 +9,14 @@ namespace Rokojori
public partial class CombineSensor : Sensor
{
[Export]
- public Sensor[] sensors;
-
+ public Sensor[] sensors = new Sensor[ 0 ];
+
+ [ExportGroup("UI")]
+ [Export]
+ public bool showOnlyVisibleIcons = false;
+
+ [Export]
+ public int numVisible = 0;
protected override void UpdateValue()
{
@@ -23,5 +29,33 @@ namespace Rokojori
SetFloatValue( value );
}
+
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, sensors );
+ }
+
+ [Export]
+ public InputIcon[] inputIcons = new InputIcon[ 0 ];
+
+ [Export]
+ public bool useInputIconsFromSensors = true;
+
+ public override List GetInputIcons()
+ {
+ var list = Lists.From( inputIcons );
+
+ if ( useInputIconsFromSensors )
+ {
+ var visible = showOnlyVisibleIcons ? numVisible : sensors.Length;
+
+ for ( int i = 0; i < visible; i++ )
+ {
+ list.AddRange( sensors[ i ].GetInputIcons() );
+ }
+ }
+
+ return list;
+ }
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/Default-Sensors/Default-Input-Icons-Library.tres b/Runtime/Sensors/Default-Sensors/Default-Input-Icons-Library.tres
new file mode 100644
index 0000000..117a529
--- /dev/null
+++ b/Runtime/Sensors/Default-Sensors/Default-Input-Icons-Library.tres
@@ -0,0 +1,358 @@
+[gd_resource type="Resource" script_class="InputIconsLibrary" load_steps=74 format=3 uid="uid://dq52vhnqr5m6"]
+
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs" id="1_64knt"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/InputIconsLibrary.cs" id="1_urlfx"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs" id="1_vsgl5"]
+[ext_resource type="SystemFont" uid="uid://bakiyyiix68n1" path="res://Research/Fonts/Jost-Font.tres" id="1_xrnc5"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/UI/Styling/UINumber.cs" id="2_4sutq"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs" id="2_g15ft"]
+[ext_resource type="Texture2D" uid="uid://eqplg4ydtkpf" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg" id="2_q818g"]
+[ext_resource type="Texture2D" uid="uid://chcls1g13v7it" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg" id="3_pm2rw"]
+[ext_resource type="Texture2D" uid="uid://dcb0bhq84rs77" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg" id="3_u1h0x"]
+[ext_resource type="Texture2D" uid="uid://d3q5n6ocgar6w" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg" id="4_5b8av"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs" id="4_6ycsi"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs" id="4_y5jfh"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs" id="5_a3fep"]
+[ext_resource type="Texture2D" uid="uid://eki8sp0x0gmf" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg" id="5_amgur"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs" id="5_sn8hr"]
+[ext_resource type="Texture2D" uid="uid://ct3k2tds4d26" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg" id="5_ycc70"]
+[ext_resource type="Texture2D" uid="uid://clg28ph2pawvq" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg" id="6_0hfff"]
+[ext_resource type="Texture2D" uid="uid://bip5s0jfo5ddm" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg" id="6_6nxcf"]
+[ext_resource type="Texture2D" uid="uid://b48h8j7flhwyb" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg" id="6_qyc6e"]
+[ext_resource type="Texture2D" uid="uid://de5ewtb72pmdu" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg" id="7_n1ega"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs" id="7_y0txw"]
+[ext_resource type="Texture2D" uid="uid://6fkkrsbdjdf" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg" id="9_eeamd"]
+[ext_resource type="Texture2D" uid="uid://bih02uuga3j2u" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg" id="10_3i85w"]
+[ext_resource type="Texture2D" uid="uid://bmtwa1p6j1tu8" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg" id="10_q44jo"]
+[ext_resource type="Texture2D" uid="uid://b73u16wm1h5gr" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg" id="12_mf3bj"]
+[ext_resource type="Texture2D" uid="uid://dg52t67wh6h54" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg" id="13_ijjqw"]
+[ext_resource type="Texture2D" uid="uid://dxwnbh3a3fy8w" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg" id="13_omll7"]
+[ext_resource type="Texture2D" uid="uid://1pfyxi7wifn8" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg" id="14_6vom6"]
+[ext_resource type="Texture2D" uid="uid://bgi8cbw57gka0" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg" id="14_n68qo"]
+[ext_resource type="Texture2D" uid="uid://cb8ldiej8234h" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg" id="18_amimm"]
+[ext_resource type="Texture2D" uid="uid://ddfvjmi7sva6f" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg" id="19_7x4g0"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="20_55eoq"]
+[ext_resource type="Texture2D" uid="uid://bajhvs0qnuj5q" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg" id="20_r1y6a"]
+[ext_resource type="Texture2D" uid="uid://b2123dcu46oy0" path="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg" id="21_hcyk3"]
+
+[sub_resource type="Resource" id="Resource_m53ti"]
+script = ExtResource("1_vsgl5")
+button = 4
+
+[sub_resource type="Resource" id="Resource_a3cu1"]
+script = ExtResource("1_vsgl5")
+button = 5
+
+[sub_resource type="Resource" id="Resource_xpfqu"]
+script = ExtResource("2_g15ft")
+icons = [SubResource("Resource_m53ti"), SubResource("Resource_a3cu1")]
+texture = ExtResource("3_pm2rw")
+widthScale = 1.0
+orderMode = 2
+isUpperCase = false
+fontSizeScale = 0.0
+
+[sub_resource type="Resource" id="Resource_xbpgk"]
+script = ExtResource("4_y5jfh")
+button = 13
+
+[sub_resource type="Resource" id="Resource_laa4d"]
+script = ExtResource("4_y5jfh")
+button = 14
+
+[sub_resource type="Resource" id="Resource_28c0y"]
+script = ExtResource("2_g15ft")
+icons = [SubResource("Resource_xbpgk"), SubResource("Resource_laa4d")]
+texture = ExtResource("5_ycc70")
+widthScale = 1.0
+orderMode = 2
+isUpperCase = false
+fontSizeScale = 0.0
+
+[sub_resource type="Resource" id="Resource_4mvgb"]
+script = ExtResource("4_y5jfh")
+button = 11
+
+[sub_resource type="Resource" id="Resource_l8cwl"]
+script = ExtResource("4_y5jfh")
+button = 12
+
+[sub_resource type="Resource" id="Resource_oje1t"]
+script = ExtResource("2_g15ft")
+icons = [SubResource("Resource_4mvgb"), SubResource("Resource_l8cwl")]
+texture = ExtResource("6_6nxcf")
+widthScale = 1.0
+orderMode = 2
+isUpperCase = false
+fontSizeScale = 0.0
+
+[sub_resource type="Resource" id="Resource_8bcch"]
+script = ExtResource("7_y0txw")
+axis = 0
+type = 0
+
+[sub_resource type="Resource" id="Resource_rlnb1"]
+script = ExtResource("7_y0txw")
+axis = 0
+type = 1
+
+[sub_resource type="Resource" id="Resource_fmatu"]
+script = ExtResource("20_55eoq")
+en = "L"
+entries = []
+context = ""
+
+[sub_resource type="Resource" id="Resource_tqg5p"]
+script = ExtResource("2_g15ft")
+icons = [SubResource("Resource_8bcch"), SubResource("Resource_rlnb1")]
+texture = ExtResource("9_eeamd")
+widthScale = 1.0
+orderMode = 2
+label = SubResource("Resource_fmatu")
+isUpperCase = false
+fontSizeScale = 0.8
+
+[sub_resource type="Resource" id="Resource_vi3u1"]
+script = ExtResource("7_y0txw")
+axis = 1
+type = 1
+
+[sub_resource type="Resource" id="Resource_vjbhe"]
+script = ExtResource("7_y0txw")
+axis = 1
+type = 0
+
+[sub_resource type="Resource" id="Resource_q8dch"]
+script = ExtResource("20_55eoq")
+en = "L"
+entries = []
+context = ""
+
+[sub_resource type="Resource" id="Resource_3oyc0"]
+script = ExtResource("2_g15ft")
+icons = [SubResource("Resource_vi3u1"), SubResource("Resource_vjbhe")]
+texture = ExtResource("10_3i85w")
+widthScale = 1.0
+orderMode = 2
+label = SubResource("Resource_q8dch")
+isUpperCase = true
+fontSizeScale = 0.8
+
+[sub_resource type="Resource" id="Resource_wd2xx"]
+script = ExtResource("7_y0txw")
+axis = 2
+type = 0
+
+[sub_resource type="Resource" id="Resource_h3a17"]
+script = ExtResource("7_y0txw")
+axis = 2
+type = 1
+
+[sub_resource type="Resource" id="Resource_07ljj"]
+script = ExtResource("20_55eoq")
+en = "R"
+entries = []
+context = ""
+
+[sub_resource type="Resource" id="Resource_c6gt5"]
+script = ExtResource("2_g15ft")
+icons = [SubResource("Resource_wd2xx"), SubResource("Resource_h3a17")]
+texture = ExtResource("9_eeamd")
+widthScale = 1.0
+orderMode = 2
+label = SubResource("Resource_07ljj")
+isUpperCase = false
+fontSizeScale = 0.8
+
+[sub_resource type="Resource" id="Resource_qmgk3"]
+script = ExtResource("7_y0txw")
+axis = 3
+type = 1
+
+[sub_resource type="Resource" id="Resource_4ro5i"]
+script = ExtResource("20_55eoq")
+en = "R"
+entries = []
+context = ""
+
+[sub_resource type="Resource" id="Resource_812y6"]
+script = ExtResource("2_g15ft")
+icons = [SubResource("Resource_qmgk3"), SubResource("Resource_vjbhe")]
+texture = ExtResource("10_3i85w")
+widthScale = 1.0
+orderMode = 2
+label = SubResource("Resource_4ro5i")
+isUpperCase = true
+fontSizeScale = 0.8
+
+[sub_resource type="Resource" id="Resource_udrbd"]
+script = ExtResource("4_6ycsi")
+combined = [SubResource("Resource_xpfqu"), SubResource("Resource_28c0y"), SubResource("Resource_oje1t"), SubResource("Resource_tqg5p"), SubResource("Resource_3oyc0"), SubResource("Resource_c6gt5"), SubResource("Resource_812y6")]
+
+[sub_resource type="Resource" id="Resource_s3w6q"]
+script = ExtResource("5_sn8hr")
+backgroundTexture = ExtResource("5_amgur")
+directionUpTexture = ExtResource("6_0hfff")
+directionalOffset = 0.0
+fontSizeScale = 1.0
+isUpperCase = true
+
+[sub_resource type="Resource" id="Resource_40bf3"]
+script = ExtResource("2_4sutq")
+value = 0.7
+unit = "em"
+isAnimated = false
+animationDuration = 0.0
+animationOffset = 0.0
+
+[sub_resource type="Resource" id="Resource_xrtll"]
+script = ExtResource("1_64knt")
+backgroundTexture = ExtResource("10_q44jo")
+widthScale = 1.0
+fontSizeScale = 1.0
+fontSizeCharacterMultiply = 0.9
+fontIsUpperCase = true
+hasLabel = false
+borderLeft = 0.0
+borderRight = 0.0
+borderTop = 0.0
+borderBottom = 0.0
+
+[sub_resource type="Resource" id="Resource_nkgsq"]
+script = ExtResource("1_64knt")
+backgroundTexture = ExtResource("12_mf3bj")
+widthScale = 1.0
+fontSizeScale = 1.0
+fontSizeCharacterMultiply = 0.9
+fontIsUpperCase = true
+hasLabel = true
+borderLeft = 40.0
+borderRight = 40.0
+borderTop = 40.0
+borderBottom = 40.0
+
+[sub_resource type="Resource" id="Resource_wrdp7"]
+script = ExtResource("1_64knt")
+backgroundTexture = ExtResource("12_mf3bj")
+widthScale = 2.0
+fontSizeScale = 0.7
+fontSizeCharacterMultiply = 1.0
+fontIsUpperCase = true
+hasLabel = true
+borderLeft = 40.0
+borderRight = 40.0
+borderTop = 40.0
+borderBottom = 40.0
+leftIndicatorTexture = ExtResource("13_ijjqw")
+rightIndicatorTexture = ExtResource("13_ijjqw")
+
+[sub_resource type="Resource" id="Resource_mf61p"]
+script = ExtResource("1_64knt")
+backgroundTexture = ExtResource("14_6vom6")
+widthScale = 2.0
+fontSizeScale = 1.0
+fontSizeCharacterMultiply = 0.9
+fontIsUpperCase = true
+hasLabel = false
+borderLeft = 0.0
+borderRight = 0.0
+borderTop = 0.0
+borderBottom = 0.0
+
+[sub_resource type="Resource" id="Resource_qt31g"]
+script = ExtResource("20_55eoq")
+en = "L"
+entries = []
+context = ""
+
+[sub_resource type="Resource" id="Resource_4s1kq"]
+script = ExtResource("5_sn8hr")
+backgroundTexture = ExtResource("18_amimm")
+directionUpTexture = ExtResource("20_r1y6a")
+directionalOffset = 0.0
+label = SubResource("Resource_qt31g")
+fontSizeScale = 0.8
+isUpperCase = true
+buttonPressTexture = ExtResource("19_7x4g0")
+
+[sub_resource type="Resource" id="Resource_dr7bt"]
+script = ExtResource("1_64knt")
+backgroundTexture = ExtResource("13_omll7")
+widthScale = 1.0
+fontSizeScale = 1.0
+fontSizeCharacterMultiply = 0.9
+fontIsUpperCase = true
+hasLabel = true
+borderLeft = 0.0
+borderRight = 0.0
+borderTop = 0.0
+borderBottom = 0.0
+
+[sub_resource type="Resource" id="Resource_2rh0g"]
+script = ExtResource("1_64knt")
+backgroundTexture = ExtResource("14_n68qo")
+widthScale = 1.0
+fontSizeScale = 1.0
+fontSizeCharacterMultiply = 0.9
+fontIsUpperCase = true
+hasLabel = true
+borderLeft = 0.0
+borderRight = 0.0
+borderTop = 0.0
+borderBottom = 0.0
+
+[sub_resource type="Resource" id="Resource_34cgw"]
+script = ExtResource("5_a3fep")
+leftButtonTexture = ExtResource("2_q818g")
+middleButtonTexture = ExtResource("3_u1h0x")
+rightButtonTexture = ExtResource("4_5b8av")
+wheelUpTexture = ExtResource("7_n1ega")
+wheelDownTexture = ExtResource("6_qyc6e")
+
+[sub_resource type="Resource" id="Resource_5ywoi"]
+script = ExtResource("20_55eoq")
+en = "R"
+entries = []
+context = ""
+
+[sub_resource type="Resource" id="Resource_jl0ql"]
+script = ExtResource("5_sn8hr")
+backgroundTexture = ExtResource("18_amimm")
+directionUpTexture = ExtResource("20_r1y6a")
+directionalOffset = 0.0
+label = SubResource("Resource_5ywoi")
+fontSizeScale = 0.8
+isUpperCase = true
+buttonPressTexture = ExtResource("19_7x4g0")
+
+[sub_resource type="Resource" id="Resource_b5rf1"]
+script = ExtResource("1_64knt")
+backgroundTexture = ExtResource("21_hcyk3")
+widthScale = 1.0
+fontSizeScale = 1.0
+fontSizeCharacterMultiply = 0.9
+fontIsUpperCase = true
+hasLabel = true
+borderLeft = 0.0
+borderRight = 0.0
+borderTop = 0.0
+borderBottom = 0.0
+
+[resource]
+script = ExtResource("1_urlfx")
+font = ExtResource("1_xrnc5")
+fontSize = SubResource("Resource_40bf3")
+iconHeightInEm = 1.5
+mouseInputIcon = SubResource("Resource_34cgw")
+keyboardKeys = SubResource("Resource_nkgsq")
+keyboardModifiers = SubResource("Resource_wrdp7")
+keyboardSpaceKey = SubResource("Resource_mf61p")
+keyboardEnterKey = SubResource("Resource_xrtll")
+mainButtons = SubResource("Resource_2rh0g")
+leftShouldersButtons = SubResource("Resource_dr7bt")
+rightShouldersButtons = SubResource("Resource_b5rf1")
+digitalPad = SubResource("Resource_s3w6q")
+leftJoystick = SubResource("Resource_4s1kq")
+rightJoystick = SubResource("Resource_jl0ql")
+combinedInputs = SubResource("Resource_udrbd")
+locales = []
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Negative.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Negative.tres
index 53d31b3..466777f 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Negative.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Negative.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_t42o5")
axis = 0
-type = 0
+type = 1
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Positive.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Positive.tres
index 6b740db..2778929 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Positive.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick X-Positive.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_y2djh")
axis = 0
-type = 1
+type = 0
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Negative.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Negative.tres
index d484874..dfc4c31 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Negative.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Negative.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_yy4wi")
axis = 0
-type = 0
+type = 1
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Positive.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Positive.tres
index 56c2235..3d78a3d 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Positive.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Left-Joystick Y-Positive.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_wej7c")
axis = 1
-type = 1
+type = 0
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Negative.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Negative.tres
index 5a8fea0..72036e6 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Negative.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Negative.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_22ykp")
axis = 2
-type = 0
+type = 1
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Positive.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Positive.tres
index 6c29646..20e85ea 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Positive.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick X-Positive.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_pxirv")
axis = 2
-type = 1
+type = 0
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Negative.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Negative.tres
index ab0204f..2b02f3e 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Negative.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Negative.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_nrdau")
axis = 3
-type = 0
+type = 1
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Positive.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Positive.tres
index 5315f10..aa1199c 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Positive.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Right-Joystick Y-Positive.tres
@@ -5,7 +5,7 @@
[resource]
script = ExtResource("1_xf3mc")
axis = 3
-type = 1
+type = 0
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Left, LT, PS L2, Nin ZL.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Left, LT, PS L2, Nin ZL.tres
index 4de7b8e..10687e6 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Left, LT, PS L2, Nin ZL.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Left, LT, PS L2, Nin ZL.tres
@@ -4,8 +4,8 @@
[resource]
script = ExtResource("1_ow83o")
-axis = 5
-type = 1
+axis = 4
+type = 0
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Right, RT, PS R2, Nin ZR.tres b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Right, RT, PS R2, Nin ZR.tres
index d00b674..ccd6e1a 100644
--- a/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Right, RT, PS R2, Nin ZR.tres
+++ b/Runtime/Sensors/Default-Sensors/Gamepad/Axis/Trigger Right, RT, PS R2, Nin ZR.tres
@@ -4,8 +4,8 @@
[resource]
script = ExtResource("1_63g6c")
-axis = 3
-type = 1
+axis = 5
+type = 0
continous = true
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Default - Keyboard & Mouse.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Default - Keyboard & Mouse.tres
index f3d0200..f96da17 100644
--- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Default - Keyboard & Mouse.tres
+++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Default - Keyboard & Mouse.tres
@@ -7,12 +7,12 @@
[ext_resource type="Resource" uid="uid://chwstub7bnlpp" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Wheel Down.tres" id="5_diio6"]
[ext_resource type="Resource" uid="uid://b52horrdbgyaa" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Wheel Up.tres" id="6_3kcki"]
[ext_resource type="Resource" uid="uid://mbnb46tah4i7" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Forward.tres" id="7_1jado"]
-[ext_resource type="Resource" uid="uid://ds1rrltuj0mse" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Fly Up.tres" id="7_if4l6"]
[ext_resource type="Resource" uid="uid://c5ueac4xt7oyb" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Back.tres" id="8_0us2c"]
-[ext_resource type="Resource" uid="uid://dwigqkllvj8dq" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Fly Down.tres" id="8_r5hwi"]
+[ext_resource type="Resource" uid="uid://ds1rrltuj0mse" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Down.tres" id="8_r5hwi"]
[ext_resource type="Resource" uid="uid://bfxeh1y1vgkiu" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Left.tres" id="9_xdx7j"]
[ext_resource type="Resource" uid="uid://bm2d6nhevcjel" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Right.tres" id="10_cwkpy"]
+[ext_resource type="Resource" uid="uid://ds1rrltuj0mse" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Down.tres" id="11_33hna"]
[resource]
script = ExtResource("1_168ay")
-sensors = [ExtResource("2_fxahp"), ExtResource("3_6x0mm"), ExtResource("4_4gj3k"), ExtResource("5_diio6"), ExtResource("6_3kcki"), ExtResource("7_1jado"), ExtResource("8_0us2c"), ExtResource("9_xdx7j"), ExtResource("10_cwkpy"), ExtResource("7_if4l6"), ExtResource("8_r5hwi")]
+sensors = [ExtResource("2_fxahp"), ExtResource("3_6x0mm"), ExtResource("4_4gj3k"), ExtResource("5_diio6"), ExtResource("6_3kcki"), ExtResource("7_1jado"), ExtResource("8_0us2c"), ExtResource("9_xdx7j"), ExtResource("10_cwkpy"), ExtResource("11_33hna"), ExtResource("8_r5hwi")]
diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Back.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Back.tres
index d73c883..a8f5a49 100644
--- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Back.tres
+++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Back.tres
@@ -6,6 +6,7 @@
[sub_resource type="Resource" id="Resource_bf8g7"]
script = ExtResource("2_p2364")
key = 83
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -19,6 +20,7 @@ _activeTreshold = 0.5
[sub_resource type="Resource" id="Resource_bi0fk"]
script = ExtResource("2_p2364")
key = 4194322
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -31,7 +33,11 @@ _activeTreshold = 0.5
[resource]
script = ExtResource("1_xxflt")
-sensors = Array[Object]([SubResource("Resource_bf8g7"), SubResource("Resource_bi0fk")])
+sensors = [SubResource("Resource_bf8g7"), SubResource("Resource_bi0fk")]
+showOnlyVisibleIcons = true
+numVisible = 1
+inputIcons = []
+useInputIconsFromSensors = true
continous = false
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Fly Up.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Down.tres
similarity index 77%
rename from Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Fly Up.tres
rename to Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Down.tres
index b7337bf..220e3b7 100644
--- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Fly Up.tres
+++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Down.tres
@@ -1,10 +1,11 @@
[gd_resource type="Resource" script_class="KeySensor" load_steps=2 format=3 uid="uid://ds1rrltuj0mse"]
-[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/KeySensor.cs" id="1_2vgvk"]
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Sensors/KeySensor.cs" id="1_r0t8l"]
[resource]
-script = ExtResource("1_2vgvk")
+script = ExtResource("1_r0t8l")
key = 69
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Forward.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Forward.tres
index 7b3744d..3626134 100644
--- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Forward.tres
+++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Forward.tres
@@ -6,6 +6,7 @@
[sub_resource type="Resource" id="Resource_uixae"]
script = ExtResource("2_rjp34")
key = 87
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -19,6 +20,7 @@ _activeTreshold = 0.5
[sub_resource type="Resource" id="Resource_grqa0"]
script = ExtResource("2_rjp34")
key = 4194320
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -31,7 +33,11 @@ _activeTreshold = 0.5
[resource]
script = ExtResource("1_vohv8")
-sensors = Array[Object]([SubResource("Resource_uixae"), SubResource("Resource_grqa0")])
+sensors = [SubResource("Resource_uixae"), SubResource("Resource_grqa0")]
+showOnlyVisibleIcons = true
+numVisible = 1
+inputIcons = []
+useInputIconsFromSensors = true
continous = false
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Fly Down.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Up.tres
similarity index 100%
rename from Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Fly Down.tres
rename to Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Move Up.tres
diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Left.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Left.tres
index 11691f8..21786f4 100644
--- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Left.tres
+++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Left.tres
@@ -6,6 +6,7 @@
[sub_resource type="Resource" id="Resource_m3515"]
script = ExtResource("2_m4lpr")
key = 65
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -19,6 +20,7 @@ _activeTreshold = 0.5
[sub_resource type="Resource" id="Resource_ejgie"]
script = ExtResource("2_m4lpr")
key = 4194319
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -32,6 +34,10 @@ _activeTreshold = 0.5
[resource]
script = ExtResource("1_xuikh")
sensors = [SubResource("Resource_m3515"), SubResource("Resource_ejgie")]
+showOnlyVisibleIcons = true
+numVisible = 1
+inputIcons = []
+useInputIconsFromSensors = true
continous = false
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Right.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Right.tres
index 1ee9418..5a2b13f 100644
--- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Right.tres
+++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Movement/Strafe Right.tres
@@ -6,6 +6,7 @@
[sub_resource type="Resource" id="Resource_n5k5a"]
script = ExtResource("2_uy5s5")
key = 68
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -19,6 +20,7 @@ _activeTreshold = 0.5
[sub_resource type="Resource" id="Resource_8vsbn"]
script = ExtResource("2_uy5s5")
key = 4194321
+keyLocation = 0
ctrlHold = 2
altHold = 2
shiftHold = 2
@@ -31,7 +33,11 @@ _activeTreshold = 0.5
[resource]
script = ExtResource("1_t65bw")
-sensors = Array[Object]([SubResource("Resource_n5k5a"), SubResource("Resource_8vsbn")])
+sensors = [SubResource("Resource_n5k5a"), SubResource("Resource_8vsbn")]
+showOnlyVisibleIcons = true
+numVisible = 1
+inputIcons = []
+useInputIconsFromSensors = true
continous = false
_value = 0.0
_wasActive = false
diff --git a/Runtime/Sensors/DeviceFilters/DeviceFilter.cs b/Runtime/Sensors/DeviceFilters/DeviceFilter.cs
new file mode 100644
index 0000000..c2a1629
--- /dev/null
+++ b/Runtime/Sensors/DeviceFilters/DeviceFilter.cs
@@ -0,0 +1,16 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorGroup.svg")]
+ public partial class DeviceFilter : Resource
+ {
+ public virtual bool BelongsToDevice( InputIcon icon )
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/DeviceFilters/LastActiveDeviceFilter.cs b/Runtime/Sensors/DeviceFilters/LastActiveDeviceFilter.cs
new file mode 100644
index 0000000..7cea961
--- /dev/null
+++ b/Runtime/Sensors/DeviceFilters/LastActiveDeviceFilter.cs
@@ -0,0 +1,31 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorGroup.svg")]
+ public partial class LastActiveDeviceFilter : DeviceFilter
+ {
+ public override bool BelongsToDevice( InputIcon icon )
+ {
+ var sm = Unique.Get();
+
+ if ( sm == null )
+ {
+ this.LogInfo( "No SensorManager" );
+ return false;
+ }
+
+ var device = sm.lastActiveDevice;
+
+ if ( device == null )
+ {
+ return false;
+ }
+
+ return device.ContainsIcon( icon );
+ }
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/Devices/GamePadDevice.cs b/Runtime/Sensors/Devices/GamePadDevice.cs
new file mode 100644
index 0000000..b03c60a
--- /dev/null
+++ b/Runtime/Sensors/Devices/GamePadDevice.cs
@@ -0,0 +1,49 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public enum GamePadDeviceType
+ {
+ XBox,
+ PS,
+ Switch
+ }
+
+ [Tool]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorGroup.svg")]
+ public partial class GamePadDevice: SensorDevice
+ {
+ [Export]
+ public int deviceIndex = 0;
+
+ [Export]
+ public string deviceName;
+
+ [Export]
+ public GamePadDeviceType deviceType = GamePadDeviceType.XBox;
+
+
+ public override LocalizedString GetDeviceName()
+ {
+ return LocaleText.Create( deviceName );
+ }
+
+ public override bool ContainsSensor( Sensor sensor )
+ {
+ return ReflectionHelper.IsTypeOneOf( sensor,
+ typeof( GamePadAxisSensor ),
+ typeof( GamePadButtonSensor )
+ );
+ }
+
+ public override bool ContainsIcon( InputIcon icon )
+ {
+ return ReflectionHelper.IsTypeOneOf( icon,
+ typeof( GamePadAxisIcon ),
+ typeof( GamePadButtonIcon )
+ );
+ }
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/Devices/KeyboardDevice.cs b/Runtime/Sensors/Devices/KeyboardDevice.cs
new file mode 100644
index 0000000..262357f
--- /dev/null
+++ b/Runtime/Sensors/Devices/KeyboardDevice.cs
@@ -0,0 +1,32 @@
+
+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 )
+ );
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/Devices/MouseDevice.cs b/Runtime/Sensors/Devices/MouseDevice.cs
new file mode 100644
index 0000000..3b92149
--- /dev/null
+++ b/Runtime/Sensors/Devices/MouseDevice.cs
@@ -0,0 +1,32 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorGroup.svg")]
+ public partial class MouseDevice: SensorDevice
+ {
+ public override LocalizedString GetDeviceName()
+ {
+ return LocaleText.Create( "Mouse" );
+ }
+
+ public override bool ContainsSensor( Sensor sensor )
+ {
+ return ReflectionHelper.IsTypeOneOf( sensor,
+ typeof( MouseButtonSensor ),
+ typeof( MouseMotionDelta ),
+ typeof( MouseScreenRelative )
+ );
+ }
+
+ public override bool ContainsIcon( InputIcon icon )
+ {
+ return ReflectionHelper.IsTypeOneOf( icon,
+ typeof( MouseInputIcon )
+ );
+ }
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/Devices/MultiSensorDevice.cs b/Runtime/Sensors/Devices/MultiSensorDevice.cs
new file mode 100644
index 0000000..02a9cab
--- /dev/null
+++ b/Runtime/Sensors/Devices/MultiSensorDevice.cs
@@ -0,0 +1,43 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorGroup.svg")]
+ public partial class MultiSensorDevice: SensorDevice
+ {
+ [Export]
+ public SensorDevice[] devices = new SensorDevice[ 0 ];
+
+ [Export]
+ public Sensor[] sensors = new Sensor[ 0 ];
+
+ public override bool ContainsSensor( Sensor sensor )
+ {
+ for ( int i = 0; i < devices.Length; i++ )
+ {
+ if ( devices[ i ].ContainsSensor( sensor ) )
+ {
+ return true;
+ }
+ }
+
+ return Arrays.Contains( sensors, sensor );
+ }
+
+ public override bool ContainsIcon( InputIcon icon )
+ {
+ for ( int i = 0; i < devices.Length; i++ )
+ {
+ if ( devices[ i ].ContainsIcon( icon ) )
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/Devices/SensorDevice.cs b/Runtime/Sensors/Devices/SensorDevice.cs
new file mode 100644
index 0000000..f11d7a0
--- /dev/null
+++ b/Runtime/Sensors/Devices/SensorDevice.cs
@@ -0,0 +1,26 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorGroup.svg")]
+ public partial class SensorDevice: Resource
+ {
+ public virtual LocalizedString GetDeviceName()
+ {
+ return LocaleText.Create( "---" );
+ }
+
+ public virtual bool ContainsSensor( Sensor sensor )
+ {
+ return false;
+ }
+
+ public virtual bool ContainsIcon( InputIcon icon )
+ {
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/GamePadAxisSensor.cs b/Runtime/Sensors/GamePadAxisSensor.cs
index aa9db3c..b08a057 100644
--- a/Runtime/Sensors/GamePadAxisSensor.cs
+++ b/Runtime/Sensors/GamePadAxisSensor.cs
@@ -1,6 +1,6 @@
using Godot;
-
+using System.Collections.Generic;
namespace Rokojori
{
@@ -13,16 +13,13 @@ namespace Rokojori
public override bool isMultiDevice => true;
- public enum AxisType
- {
- Negative,
- Positive
- }
-
-
[Export]
- public AxisType type;
+ public GamePadAxisType type;
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, axis, type );
+ }
float _lastInput = 0;
@@ -45,10 +42,22 @@ namespace Rokojori
return;
}
- _lastInput = Mathf.Max( (AxisType.Negative == type ? -1 : 1 ) * joypadAxisEvent.AxisValue, 0 );
+ _lastInput = Mathf.Max( (GamePadAxisType.Negative == type ? -1 : 1 ) * joypadAxisEvent.AxisValue, 0 );
+
+ UpdateSensorUsage( joypadAxisEvent.Device );
}
+ public override List GetInputIcons()
+ {
+ var icon = new GamePadAxisIcon();
+ icon.axis = axis;
+ icon.type = type;
+
+ return new List(){ icon };
+ }
+
+
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/GamePadAxisType.cs b/Runtime/Sensors/GamePadAxisType.cs
new file mode 100644
index 0000000..bf68fd0
--- /dev/null
+++ b/Runtime/Sensors/GamePadAxisType.cs
@@ -0,0 +1,12 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ public enum GamePadAxisType
+ {
+ Positive,
+ Negative
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/GamePadButtonSensor.cs b/Runtime/Sensors/GamePadButtonSensor.cs
index e8c7a61..965cb86 100644
--- a/Runtime/Sensors/GamePadButtonSensor.cs
+++ b/Runtime/Sensors/GamePadButtonSensor.cs
@@ -1,6 +1,6 @@
using Godot;
-
+using System.Collections.Generic;
namespace Rokojori
{
@@ -20,6 +20,11 @@ namespace Rokojori
SetFloatValue( _lastInput );
}
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, button );
+ }
+
public void _Input( InputEvent ev )
{
var joypadButtonEvent = ev as InputEventJoypadButton;
@@ -35,9 +40,18 @@ namespace Rokojori
}
_lastInput = joypadButtonEvent.IsPressed() ? 1 : 0;
+
+ UpdateSensorUsage( joypadButtonEvent.Device );
}
+ public override List GetInputIcons()
+ {
+ var icon = new GamePadButtonIcon();
+ icon.button = button;
+
+ return new List(){ icon };
+ }
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs
new file mode 100644
index 0000000..3ccf93e
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/CombinedIconsDefinition.cs
@@ -0,0 +1,94 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class CombinedIconsDefinition: InputIconDefinition
+ {
+ [Export]
+ public CombinedInputIconsTexture[] combined = new CombinedInputIconsTexture[ 0 ];
+
+
+
+ public override int ResolveIcons( int offset, List icons )
+ {
+ // this.LogInfo( "ResolveIcons", offset, icons );
+
+ var resolved = GetIconFor( offset, icons );
+
+ if ( resolved == null )
+ {
+ return -1;
+ }
+
+ return resolved.icons.Length;
+ }
+
+ public CombinedInputIconsTexture GetIconFor( int offset, List icons )
+ {
+ for ( int i = 0; i < combined.Length; i++ )
+ {
+ var isIcon = combined[ i ].IsIcon( offset, icons );
+
+ // RJLog.Log( "isIcon -> offset:", offset, "isIcon:", isIcon, "icons:", icons );
+
+ if ( isIcon )
+ {
+ return combined[ i ];
+ }
+ }
+
+ return null;
+ }
+
+ public override List GetIconElementsForIcon( InputIcon icon )
+ {
+ var ci = icon as CombinedIcon;
+
+ if ( ci == null )
+ {
+ return null;
+ }
+
+ var resolved = GetIconFor( 0, Lists.From( ci.icons ) );
+
+ if ( resolved == null )
+ {
+ // RJLog.Log( "CombinedIcon: null");
+ return null;
+ }
+
+
+
+ var resolvedList = new List();
+ resolvedList.Add( TextureIconElement.Create( resolved.texture, resolved.widthScale ) );
+
+ if ( resolved.label != null )
+ {
+ var labelText = LabelIconElement.Create( resolved.label, resolved.fontSizeScale, resolved.isUpperCase );
+ resolvedList.Add( labelText );
+ }
+
+
+ return resolvedList;
+
+ }
+
+ public override bool HasIconFor( InputIcon icon )
+ {
+ if ( ! ( icon is CombinedIcon ci ) )
+ {
+ return false;
+ }
+
+ var ic = GetIconFor( 0, Lists.From( ci.icons ) );
+
+ return ic != null;
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs b/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs
new file mode 100644
index 0000000..990ec3d
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/CombinedInputIconsTexture.cs
@@ -0,0 +1,80 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class CombinedInputIconsTexture: Resource
+ {
+ [Export]
+ public InputIcon[] icons = new InputIcon[ 0 ];
+
+ [Export]
+ public Texture2D texture;
+
+ [Export]
+ public float widthScale = 1;
+
+ [Export]
+ public CombineIconOrderMode orderMode = CombineIconOrderMode.Any_Order;
+
+ [Export]
+ public LocalizedString label;
+
+ [Export]
+ public bool isUpperCase = true;
+
+ [Export]
+ public float fontSizeScale = 1;
+
+ public bool IsIcon( int offset, List iconList )
+ {
+ var iconOrder = new List();
+
+ for ( int i = 0; i < icons.Length && ( i + offset ) < iconList.Count ; i++ )
+ {
+ var icon = iconList[ offset + i ];
+
+ if ( icon == null )
+ {
+ return false;
+ }
+
+ if ( ! Arrays.ContainsEqual( icons, icon ) )
+ {
+ return false;
+ }
+
+ if ( Lists.ContainsEqual( iconOrder, icon ) )
+ {
+ return false;
+ }
+
+ iconOrder.Add( icon );
+ }
+
+ if ( iconOrder.Count != icons.Length )
+ {
+ return false;
+ }
+
+ if ( CombineIconOrderMode.Forward_Only == orderMode )
+ {
+ return Lists.AreEntriesEqual( iconOrder, Lists.From( icons ) );
+ }
+ else if ( CombineIconOrderMode.Forward_And_Reverse == orderMode )
+ {
+ var list = Lists.From( icons );
+ var listR = Lists.From( icons ); listR.Reverse();
+
+ return Lists.AreEntriesEqual( iconOrder, list ) || Lists.AreEntriesEqual( iconOrder, listR );
+ }
+
+ return true;
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs
new file mode 100644
index 0000000..15ec871
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/DefaultInputIconDefinition.cs
@@ -0,0 +1,129 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class DefaultInputIconDefinition: InputIconDefinition
+ {
+ [Export]
+ public Texture2D backgroundTexture;
+
+ [Export]
+ public float widthScale = 1;
+
+ [ExportGroup("Font")]
+
+ [Export]
+ public float fontSizeScale = 1;
+
+ [Export]
+ public float fontSizeCharacterMultiply = 0.9f;
+
+ [Export]
+ public bool fontIsUpperCase = true;
+
+ [Export]
+ public bool hasLabel = true;
+
+ [ExportGroup("Borders")]
+ [Export]
+ public float borderLeft = 0;
+
+ [Export]
+ public float borderRight = 0;
+
+ [Export]
+ public float borderTop = 0;
+
+ [Export]
+ public float borderBottom = 0;
+
+
+
+ public bool hasBorders
+ {
+ get
+ {
+ return ( borderLeft + borderRight + borderTop + borderBottom ) > 0;
+ }
+ }
+
+
+ [ExportGroup("Overlays")]
+
+ [Export]
+ public Texture2D leftIndicatorTexture;
+
+ [Export]
+ public Texture2D rightIndicatorTexture;
+
+
+ public override List GetIconElementsForIcon( InputIcon icon )
+ {
+ var list = new List();
+
+ var bg = TextureIconElement.Create( backgroundTexture, widthScale );
+ bg.SetBorders( this );
+ list.Add( bg );
+
+
+ if ( icon is KeyIcon ki )
+ {
+ if ( hasLabel )
+ {
+ var locale = ki.GetIconLocale();
+ var fontScale = fontSizeScale * Mathf.Pow( fontSizeCharacterMultiply, locale.currentValue.Length - 1 );
+
+ var label = LabelIconElement.Create( locale, fontScale, fontIsUpperCase );
+ list.Add( label );
+ }
+
+ if ( KeyLocation.Unspecified != ki.location )
+ {
+ var indicatorTexture = KeyLocation.Left == ki.location ? leftIndicatorTexture :
+ KeyLocation.Right == ki.location ? rightIndicatorTexture : null;
+
+
+ if ( indicatorTexture != null )
+ {
+ var indicatorElement = TextureIconElement.Create( indicatorTexture, widthScale );
+ indicatorElement.alignment = KeyLocation.Left == ki.location ? TextureIconOverlayAlignment.Left :
+ KeyLocation.Right == ki.location ? TextureIconOverlayAlignment.Right :
+ TextureIconOverlayAlignment.Center;
+ list.Add( indicatorElement );
+ }
+ }
+ }
+
+ if ( icon is GamePadButtonIcon bi )
+ {
+ if ( hasLabel )
+ {
+ var locale = bi.GetIconLocale();
+ var fontScale = fontSizeScale * Mathf.Pow( fontSizeCharacterMultiply, locale.currentValue.Length - 1 );
+
+ var label = LabelIconElement.Create( locale, fontScale, fontIsUpperCase );
+ list.Add( label );
+ }
+ }
+
+ if ( icon is GamePadAxisIcon ai )
+ {
+ if ( hasLabel )
+ {
+ var locale = ai.GetIconLocale();
+ var fontScale = fontSizeScale * Mathf.Pow( fontSizeCharacterMultiply, locale.currentValue.Length - 1 );
+
+ var label = LabelIconElement.Create( locale, fontScale, fontIsUpperCase );
+ list.Add( label );
+ }
+ }
+
+ return list;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs
new file mode 100644
index 0000000..806fbde
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/DirectionalInputIconDefinition.cs
@@ -0,0 +1,163 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class DirectionalInputIconDefinition: InputIconDefinition
+ {
+ [Export]
+ public Texture2D backgroundTexture;
+
+
+ [ExportGroup("Directions")]
+
+
+
+ [Export]
+ public Texture2D directionRightTexture;
+
+ [Export]
+ public Texture2D directionDownTexture;
+
+ [Export]
+ public Texture2D directionLeftTexture;
+
+ [Export]
+ public Texture2D directionUpTexture;
+
+ [Export]
+ public float directionalOffset = 0;
+
+
+ [ExportGroup("Overlays")]
+ [Export]
+ public LocaleText label;
+
+ [Export]
+ public float fontSizeScale = 1;
+
+ [Export]
+ public bool isUpperCase = true;
+
+ [Export]
+ public Texture2D buttonPressTexture;
+
+
+ static int GetAngle( T value, params T[] values )
+ {
+ var index = Arrays.IndexOf( values, value );
+
+ if ( index == -1 )
+ {
+ return index;
+ }
+
+ return index * 90;
+ }
+
+ public static int GetAngleOfIcon( InputIcon icon )
+ {
+ if ( icon is GamePadButtonIcon bi )
+ {
+ return GetAngle( bi.button, JoyButton.DpadRight, JoyButton.DpadDown, JoyButton.DpadLeft, JoyButton.DpadUp );
+ }
+ else if ( icon is GamePadAxisIcon ai )
+ {
+ if ( JoyAxis.LeftX == ai.axis || JoyAxis.RightX == ai.axis )
+ {
+ return GamePadAxisType.Positive == ai.type ? 0 : 180;
+ }
+
+ if ( JoyAxis.LeftY == ai.axis || JoyAxis.RightY == ai.axis )
+ {
+ return GamePadAxisType.Positive == ai.type ? 90 : 270;
+ }
+
+ }
+
+
+ return -1;
+ }
+
+ public override List GetIconElementsForIcon( InputIcon icon )
+ {
+ var list = new List();
+
+ var bg = TextureIconElement.Create( backgroundTexture, 1 );
+ list.Add( bg );
+
+ if ( label != null )
+ {
+ var labelText = LabelIconElement.Create( label, fontSizeScale, isUpperCase );
+ list.Add( labelText );
+ }
+
+ if ( icon is GamePadAxisIcon || icon is GamePadButtonIcon )
+ {
+ var ai = icon as GamePadAxisIcon;
+ var bi = icon as GamePadButtonIcon;
+ var angle = ai != null ? GetAngleOfIcon( ai ) : GetAngleOfIcon( bi );
+ var rotation = 0f;
+ var texture = GetDirectionTexture( angle, out rotation );
+
+ var dir = TextureIconElement.Create( texture, 1 );
+ dir.alignment = TextureIconOverlayAlignment.Left;
+
+ dir.rotation = rotation;
+
+ list.Add( dir );
+ }
+
+
+ return list;
+ }
+
+ List GetAllTextures()
+ {
+ return new List(){ directionRightTexture, directionDownTexture, directionLeftTexture, directionUpTexture };
+ }
+
+ Texture2D GetDirectionTexture( int angle, out float rotation )
+ {
+ var textures = GetAllTextures();
+
+ var nonNullIndex = -1;
+ rotation = 0;
+
+ for ( int i = 0; i < textures.Count; i++ )
+ {
+ if ( textures[ i ] == null )
+ {
+ continue;
+ }
+
+ if ( i * 90 == angle )
+ {
+ return textures[ i ];
+ }
+
+ if ( nonNullIndex != -1 )
+ {
+ continue;
+ }
+
+ nonNullIndex = i;
+
+ }
+
+ if ( nonNullIndex == -1 )
+ {
+ return null;
+ }
+
+ rotation = angle - nonNullIndex * 90;
+ return textures[ nonNullIndex ];
+
+
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Definitions/IconElement.cs b/Runtime/Sensors/InputIcons/Definitions/IconElement.cs
new file mode 100644
index 0000000..d47895d
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/IconElement.cs
@@ -0,0 +1,86 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public class IconElement
+ {
+ }
+
+ public class MissingIconElement:IconElement
+ {
+
+ }
+
+ public enum TextureIconOverlayAlignment
+ {
+ None,
+ Left,
+ Center,
+ Right
+ }
+
+ public class TextureIconElement:IconElement
+ {
+ public Texture2D texture;
+
+ public float borderLeft;
+ public float borderRight;
+ public float borderTop;
+ public float borderBottom;
+
+ public float widthScale = 1;
+
+ public float rotation = 0;
+
+ public TextureIconOverlayAlignment alignment = TextureIconOverlayAlignment.None;
+
+ public static TextureIconElement Create( Texture2D texture, float widthScale = 1, TextureIconOverlayAlignment alignment = TextureIconOverlayAlignment.None )
+ {
+ var tie = new TextureIconElement();
+ tie.texture = texture;
+ tie.widthScale = widthScale;
+ tie.alignment = alignment;
+ return tie;
+ }
+
+ public void SetBorders( DefaultInputIconDefinition definition )
+ {
+ borderLeft = definition.borderLeft;
+ borderRight = definition.borderRight;
+ borderTop = definition.borderTop;
+ borderBottom = definition.borderBottom;
+ }
+
+ public bool hasBorders
+ {
+ get
+ {
+ return ( borderLeft + borderRight + borderTop + borderBottom ) > 0;
+ }
+ }
+
+
+
+ }
+
+
+ public class LabelIconElement:IconElement
+ {
+ public LocalizedString locale;
+
+ public float fontScale = 1;
+ public bool fontIsUpperCase = true;
+
+ public static LabelIconElement Create( LocalizedString locale, float fontScale = 1, bool upperCase = true )
+ {
+ var tie = new LabelIconElement();
+ tie.locale = locale;
+ tie.fontScale = fontScale;
+ tie.fontIsUpperCase = upperCase;
+ return tie;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Definitions/InputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/InputIconDefinition.cs
new file mode 100644
index 0000000..5b5b77d
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/InputIconDefinition.cs
@@ -0,0 +1,29 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class InputIconDefinition: Resource
+ {
+ public virtual bool HasIconFor( InputIcon icon )
+ {
+ return false;
+ }
+
+ public virtual int ResolveIcons( int offset, List icons )
+ {
+ return -1;
+ }
+
+ public virtual List GetIconElementsForIcon( InputIcon icon )
+ {
+ return new List();
+ }
+
+ }
+
+}
+
diff --git a/Runtime/Sensors/InputIcons/Definitions/InputIconLocale.cs b/Runtime/Sensors/InputIcons/Definitions/InputIconLocale.cs
new file mode 100644
index 0000000..f46e9e4
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/InputIconLocale.cs
@@ -0,0 +1,17 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class InputIconLocale: Resource
+ {
+ [Export]
+ public InputIcon icon;
+
+ [Export]
+ public LocalizedString locale;
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs b/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs
new file mode 100644
index 0000000..ca5b1a4
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Definitions/MouseInputIconDefinition.cs
@@ -0,0 +1,105 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class MouseInputIconDefinition: InputIconDefinition
+ {
+ [Export]
+ public Texture2D leftButtonTexture;
+
+ [Export]
+ public Texture2D middleButtonTexture;
+
+ [Export]
+ public Texture2D rightButtonTexture;
+
+ [Export]
+ public Texture2D wheelUpTexture;
+
+ [Export]
+ public Texture2D wheelDownTexture;
+
+ [Export]
+ public Texture2D wheelLeftTexture;
+
+ [Export]
+ public Texture2D wheelRightTexture;
+
+
+ public override List GetIconElementsForIcon( InputIcon icon )
+ {
+ var mouseIcon = icon as MouseInputIcon;
+
+ if ( mouseIcon == null )
+ {
+ return null;
+ }
+
+ var list = new List();
+
+ var button = mouseIcon.button;
+
+ Texture2D texture = null;
+
+
+ if ( MouseButton.Left == button )
+ {
+ texture = leftButtonTexture;
+ }
+ else if ( MouseButton.Middle == button )
+ {
+ texture = middleButtonTexture;
+ }
+ else if ( MouseButton.Right == button )
+ {
+ texture = rightButtonTexture;
+ }
+ else if ( MouseButton.WheelUp == button )
+ {
+ texture = wheelUpTexture;
+ }
+ else if ( MouseButton.WheelDown == button )
+ {
+ texture = wheelDownTexture;
+ }
+ else if ( MouseButton.WheelLeft == button )
+ {
+ texture = wheelLeftTexture;
+ }
+ else if ( MouseButton.WheelRight == button )
+ {
+ texture = wheelRightTexture;
+ }
+
+ if ( texture == null )
+ {
+ list.Add( new MissingIconElement() );
+ }
+ else
+ {
+ list.Add( TextureIconElement.Create( texture ) );
+ }
+
+ return list;
+ }
+
+ public override bool HasIconFor( InputIcon icon )
+ {
+ var mouseIcon = icon as MouseInputIcon;
+
+ if ( mouseIcon == null )
+ {
+ return false;
+ }
+
+ var list = GetIconElementsForIcon( icon );
+ return list != null && list.Count == 1 && ! ( list[ 0 ] is MissingIconElement );
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg
new file mode 100644
index 0000000..fca0dc5
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg
@@ -0,0 +1,18 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg.import
new file mode 100644
index 0000000..907be92
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cb8ldiej8234h"
+path="res://.godot/imported/GamePad-Axis-Background.svg-b018ae62e7a4eebc49a501c2660e69a8.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg"
+dest_files=["res://.godot/imported/GamePad-Axis-Background.svg-b018ae62e7a4eebc49a501c2660e69a8.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg
new file mode 100644
index 0000000..7031b77
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg
@@ -0,0 +1,26 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg.import
new file mode 100644
index 0000000..ac58c76
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://6fkkrsbdjdf"
+path="res://.godot/imported/GamePad-Axis-Left + Right.svg-b8527ae0a49506ce1fcc78771ab4d4d6.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg"
+dest_files=["res://.godot/imported/GamePad-Axis-Left + Right.svg-b8527ae0a49506ce1fcc78771ab4d4d6.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg
new file mode 100644
index 0000000..53fbfb0
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg.import
new file mode 100644
index 0000000..ac85d0e
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://ddfvjmi7sva6f"
+path="res://.godot/imported/GamePad-Axis-Pressed.svg-ec6e7b829d0a337f3618233fc5700c5a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg"
+dest_files=["res://.godot/imported/GamePad-Axis-Pressed.svg-ec6e7b829d0a337f3618233fc5700c5a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg
new file mode 100644
index 0000000..6743bc9
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg
@@ -0,0 +1,26 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg.import
new file mode 100644
index 0000000..24dc373
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bih02uuga3j2u"
+path="res://.godot/imported/GamePad-Axis-Up + Down.svg-bfc4f86d39b6afa439f4f9daf92ade6a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg"
+dest_files=["res://.godot/imported/GamePad-Axis-Up + Down.svg-bfc4f86d39b6afa439f4f9daf92ade6a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg
new file mode 100644
index 0000000..ea53494
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg.import
new file mode 100644
index 0000000..8edae74
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bajhvs0qnuj5q"
+path="res://.godot/imported/GamePad-Axis-Up.svg-7180da91f8b02e4246a73bcc062865ba.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg"
+dest_files=["res://.godot/imported/GamePad-Axis-Up.svg-7180da91f8b02e4246a73bcc062865ba.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg
new file mode 100644
index 0000000..e77f979
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg.import
new file mode 100644
index 0000000..68f77b2
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://eki8sp0x0gmf"
+path="res://.godot/imported/GamePad-DPad-Background.svg-178c2d0245821ea212a2e894f6be5266.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg"
+dest_files=["res://.godot/imported/GamePad-DPad-Background.svg-178c2d0245821ea212a2e894f6be5266.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg
new file mode 100644
index 0000000..0405fcc
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg
@@ -0,0 +1,33 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg.import
new file mode 100644
index 0000000..23d470c
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://ct3k2tds4d26"
+path="res://.godot/imported/GamePad-DPad-Left + Right.svg-f9f881c8150d9fed3b8b560ae4520681.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg"
+dest_files=["res://.godot/imported/GamePad-DPad-Left + Right.svg-f9f881c8150d9fed3b8b560ae4520681.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg
new file mode 100644
index 0000000..181bfc8
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg
@@ -0,0 +1,31 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg.import
new file mode 100644
index 0000000..451410f
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bip5s0jfo5ddm"
+path="res://.godot/imported/GamePad-DPad-Up + Down.svg-249b18f4f4b74a86f173f5b80a429a2c.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg"
+dest_files=["res://.godot/imported/GamePad-DPad-Up + Down.svg-249b18f4f4b74a86f173f5b80a429a2c.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg
new file mode 100644
index 0000000..8c50d5a
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg
@@ -0,0 +1,26 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg.import
new file mode 100644
index 0000000..e1d9d10
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://clg28ph2pawvq"
+path="res://.godot/imported/GamePad-DPad-Up.svg-88b76b15bcaba72455d2e57e20905e22.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg"
+dest_files=["res://.godot/imported/GamePad-DPad-Up.svg-88b76b15bcaba72455d2e57e20905e22.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg
new file mode 100644
index 0000000..200f2b6
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg
@@ -0,0 +1,52 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg.import
new file mode 100644
index 0000000..8d69195
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dxwnbh3a3fy8w"
+path="res://.godot/imported/GamePad-Left-Shoulder-Button.svg-861d2a6e9d5a4a75dad2a75bf21b945a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg"
+dest_files=["res://.godot/imported/GamePad-Left-Shoulder-Button.svg-861d2a6e9d5a4a75dad2a75bf21b945a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg
new file mode 100644
index 0000000..87a331c
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg.import
new file mode 100644
index 0000000..0d2ea84
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bgi8cbw57gka0"
+path="res://.godot/imported/GamePad-MainButton.svg-6e8af81bd24219cce6491f200a2f647b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg"
+dest_files=["res://.godot/imported/GamePad-MainButton.svg-6e8af81bd24219cce6491f200a2f647b.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg b/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg
new file mode 100644
index 0000000..5db7c2b
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg
@@ -0,0 +1,52 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg.import
new file mode 100644
index 0000000..1a4b46b
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b2123dcu46oy0"
+path="res://.godot/imported/GamePad-Right-Shoulder-Button.svg-748f2a59a568dcee0c9497fabc5acd67.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg"
+dest_files=["res://.godot/imported/GamePad-Right-Shoulder-Button.svg-748f2a59a568dcee0c9497fabc5acd67.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg b/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg
new file mode 100644
index 0000000..dc9063b
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg
@@ -0,0 +1,85 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg.import
new file mode 100644
index 0000000..9fe7cd3
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bmtwa1p6j1tu8"
+path="res://.godot/imported/Keyboard-EnterKey.svg-df0c9a28f7bf6eef40bef1b5f9a4c720.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg"
+dest_files=["res://.godot/imported/Keyboard-EnterKey.svg-df0c9a28f7bf6eef40bef1b5f9a4c720.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg b/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg
new file mode 100644
index 0000000..99e1b53
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg.import
new file mode 100644
index 0000000..46c8ac0
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dg52t67wh6h54"
+path="res://.godot/imported/Keyboard-Indicator.svg-25ac02782892c97b7da3cb2d5d368c2f.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg"
+dest_files=["res://.godot/imported/Keyboard-Indicator.svg-25ac02782892c97b7da3cb2d5d368c2f.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg b/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg
new file mode 100644
index 0000000..a963f4c
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg
@@ -0,0 +1,68 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg.import
new file mode 100644
index 0000000..d97b860
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://1pfyxi7wifn8"
+path="res://.godot/imported/Keyboard-SpaceKey.svg-5b109688b82a5136866467416f067c56.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg"
+dest_files=["res://.godot/imported/Keyboard-SpaceKey.svg-5b109688b82a5136866467416f067c56.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg b/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg
new file mode 100644
index 0000000..a2aca75
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg
@@ -0,0 +1,61 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg.import
new file mode 100644
index 0000000..bfac839
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b73u16wm1h5gr"
+path="res://.godot/imported/Keyboard.svg-a70d9c256bdc77fc346c117efc258c32.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg"
+dest_files=["res://.godot/imported/Keyboard.svg-a70d9c256bdc77fc346c117efc258c32.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg b/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg
new file mode 100644
index 0000000..f4bc643
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg.import
new file mode 100644
index 0000000..46f52f8
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://eqplg4ydtkpf"
+path="res://.godot/imported/Mouse-Left Button.svg-31ddaaa05bab8c797fa3c94e83ea8851.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg"
+dest_files=["res://.godot/imported/Mouse-Left Button.svg-31ddaaa05bab8c797fa3c94e83ea8851.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg b/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg
new file mode 100644
index 0000000..48609ba
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg.import
new file mode 100644
index 0000000..ee084a7
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dcb0bhq84rs77"
+path="res://.godot/imported/Mouse-Middle Button.svg-a4aeeb1173df7e3f524df86add173f6a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg"
+dest_files=["res://.godot/imported/Mouse-Middle Button.svg-a4aeeb1173df7e3f524df86add173f6a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg b/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg
new file mode 100644
index 0000000..8059c0e
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg.import
new file mode 100644
index 0000000..738c3c5
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://d3q5n6ocgar6w"
+path="res://.godot/imported/Mouse-Right Button.svg-918a87670c33f9a9fde0189741225317.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg"
+dest_files=["res://.godot/imported/Mouse-Right Button.svg-918a87670c33f9a9fde0189741225317.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg
new file mode 100644
index 0000000..3c6845a
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg.import
new file mode 100644
index 0000000..6d4d707
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b48h8j7flhwyb"
+path="res://.godot/imported/Mouse-Wheel Down.svg-bedd1d77ac6b5c7b8def3e5350e9d059.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg"
+dest_files=["res://.godot/imported/Mouse-Wheel Down.svg-bedd1d77ac6b5c7b8def3e5350e9d059.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg
new file mode 100644
index 0000000..d8dd498
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg.import
new file mode 100644
index 0000000..92226a7
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://chcls1g13v7it"
+path="res://.godot/imported/Mouse-Wheel Up & Down.svg-a7428dcea335d364f2af12f2ff661037.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg"
+dest_files=["res://.godot/imported/Mouse-Wheel Up & Down.svg-a7428dcea335d364f2af12f2ff661037.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg
new file mode 100644
index 0000000..77a6df7
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg.import
new file mode 100644
index 0000000..771a000
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://de5ewtb72pmdu"
+path="res://.godot/imported/Mouse-Wheel Up.svg-4a8f86710c89e72aec9c176585693fd7.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg"
+dest_files=["res://.godot/imported/Mouse-Wheel Up.svg-4a8f86710c89e72aec9c176585693fd7.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg
new file mode 100644
index 0000000..00d05b4
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg
@@ -0,0 +1,226 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg.import b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg.import
new file mode 100644
index 0000000..3d556a3
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cl0tuc8nwk31g"
+path="res://.godot/imported/GamePad-Axis.svg-12c971ecda8ec77c46bf9c73d3687c94.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg"
+dest_files=["res://.godot/imported/GamePad-Axis.svg-12c971ecda8ec77c46bf9c73d3687c94.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg
new file mode 100644
index 0000000..96391a9
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg
@@ -0,0 +1,213 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg.import b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg.import
new file mode 100644
index 0000000..e1b7dab
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://batw3cqxgbf61"
+path="res://.godot/imported/GamePad-DPad.svg-b9f2b0701dd376673653efa44826a78a.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg"
+dest_files=["res://.godot/imported/GamePad-DPad.svg-b9f2b0701dd376673653efa44826a78a.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg b/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg
new file mode 100644
index 0000000..f1ba73f
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg
@@ -0,0 +1,331 @@
+
+
+
+
diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg.import b/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg.import
new file mode 100644
index 0000000..d94870a
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dyvlvxcxc6n25"
+path="res://.godot/imported/Mouse.svg-dda12d953145ea4771e0e41818a6abb2.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/rokojori_action_library/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg"
+dest_files=["res://.godot/imported/Mouse.svg-dda12d953145ea4771e0e41818a6abb2.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/Runtime/Sensors/InputIcons/InputIconsLibrary.cs b/Runtime/Sensors/InputIcons/InputIconsLibrary.cs
new file mode 100644
index 0000000..a9997b2
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/InputIconsLibrary.cs
@@ -0,0 +1,242 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class InputIconsLibrary: Resource
+ {
+ [Export]
+ public Font font;
+
+ [Export]
+ public UINumber fontSize;
+
+ [Export]
+ public float iconHeightInEm = 2f;
+
+ [ExportGroup("Mouse & Keyboard")]
+ [Export]
+ public MouseInputIconDefinition mouseInputIcon;
+
+ [Export]
+ public DefaultInputIconDefinition keyboardKeys;
+
+ [Export]
+ public DefaultInputIconDefinition keyboardModifiers;
+
+ [Export]
+ public DefaultInputIconDefinition keyboardSpaceKey;
+
+ [Export]
+ public DefaultInputIconDefinition keyboardEnterKey;
+
+ [ExportGroup("GamePad")]
+
+ [Export]
+ public DefaultInputIconDefinition mainButtons;
+
+ [Export]
+ public DefaultInputIconDefinition leftShouldersButtons;
+
+ [Export]
+ public DefaultInputIconDefinition rightShouldersButtons;
+
+ [Export]
+ public DirectionalInputIconDefinition digitalPad;
+
+ [Export]
+ public DirectionalInputIconDefinition leftJoystick;
+
+ [Export]
+ public DirectionalInputIconDefinition rightJoystick;
+
+
+ [ExportGroup("Touchpad")]
+
+ [Export]
+ public DefaultInputIconDefinition touchClick;
+
+ [Export]
+ public DefaultInputIconDefinition touchHold;
+
+ [Export]
+ public DirectionalInputIconDefinition swipeGesture;
+
+
+ [ExportGroup("Combined")]
+ [Export]
+ public CombinedIconsDefinition combinedInputs;
+
+
+ [ExportGroup("Localization")]
+ [Export]
+ public InputIconLocale[] locales = new InputIconLocale[ 0 ];
+
+ public LocalizedString GetInputLabel( InputIcon icon )
+ {
+ var index = Arrays.FindIndex( locales, il => il.icon.Equals( icon ) );
+
+ if ( index != -1 )
+ {
+ return locales[ index ].locale;
+ }
+
+ return icon.GetDefaultLocale();
+
+ }
+
+ public List GetAllDefinitions()
+ {
+ var list = new List()
+ {
+ mouseInputIcon, keyboardKeys,
+
+ mainButtons, leftShouldersButtons, rightShouldersButtons,
+ digitalPad, leftJoystick, rightJoystick,
+
+ touchClick, touchHold, swipeGesture,
+
+ combinedInputs
+ };
+
+ list = Lists.Filter( list, l => l != null );
+
+ return list;
+ }
+
+ public List ResolveIcons( InputIcon[] icons )
+ {
+ var list = new List();
+
+ for ( int i =0 ; i < icons.Length; i++ )
+ {
+ var icon = icons[ i ];
+
+ if ( icon is SensorIcon sensorIcon )
+ {
+ var sensor = sensorIcon.sensor;
+
+ if ( sensor == null )
+ {
+ continue;
+ }
+
+ list.AddRange( sensor.GetInputIcons() );
+
+ }
+ else
+ {
+ list.Add( icon );
+ }
+
+ }
+
+ var definitions = GetAllDefinitions();
+
+ var resolvedList = new List();
+
+ for ( int i = 0; i < list.Count; i++ )
+ {
+ var d = definitions.Find( d => d.ResolveIcons( i, list ) != -1 );
+
+ if ( d == null )
+ {
+ resolvedList.Add( list[ i ] );
+ }
+ else
+ {
+ var resolvedIcon = new CombinedIcon();
+ var length = d.ResolveIcons( i, list );
+ resolvedIcon.icons = list.GetRange( i, length ).ToArray();
+ i += length - 1;
+
+ resolvedList.Add( resolvedIcon );
+ }
+ }
+
+ return resolvedList;
+ }
+
+ public InputIconDefinition GetInputIconDefinition( InputIcon icon )
+ {
+ if ( icon is MouseInputIcon )
+ {
+ return mouseInputIcon;
+ }
+ else if ( icon is KeyIcon keyIcon)
+ {
+ if ( Key.Enter == keyIcon.key )
+ {
+ return keyboardEnterKey;
+ }
+
+ if ( Key.Space == keyIcon.key )
+ {
+ return keyboardSpaceKey;
+ }
+
+ if ( KeySensor.IsModifierKey( keyIcon.key ) )
+ {
+ return keyboardModifiers;
+ }
+
+ return keyboardKeys;
+ }
+ else if ( icon is GamePadButtonIcon gpButtonIcon )
+ {
+ if ( JoyButton.LeftShoulder == gpButtonIcon.button )
+ {
+ return leftShouldersButtons;
+ }
+
+ if ( JoyButton.RightShoulder == gpButtonIcon.button )
+ {
+ return rightShouldersButtons;
+ }
+
+ if ( JoyButton.DpadLeft == gpButtonIcon.button ||
+ JoyButton.DpadRight == gpButtonIcon.button ||
+ JoyButton.DpadUp == gpButtonIcon.button ||
+ JoyButton.DpadDown == gpButtonIcon.button
+ )
+ {
+ return digitalPad;
+ }
+
+ return mainButtons;
+
+ }
+ else if ( icon is GamePadAxisIcon gpAxisIcon)
+ {
+ if ( JoyAxis.LeftX == gpAxisIcon.axis || JoyAxis.LeftY == gpAxisIcon.axis )
+ {
+ return leftJoystick;
+ }
+
+ if ( JoyAxis.RightX == gpAxisIcon.axis || JoyAxis.RightY == gpAxisIcon.axis )
+ {
+ return rightJoystick;
+ }
+
+ if ( JoyAxis.TriggerLeft == gpAxisIcon.axis )
+ {
+ return leftShouldersButtons;
+ }
+
+ if ( JoyAxis.TriggerRight == gpAxisIcon.axis )
+ {
+ return rightShouldersButtons;
+ }
+ }
+
+
+ var definitions = GetAllDefinitions();
+
+ return definitions.Find( d => d.HasIconFor( icon ) );
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/CombinedIcon.cs b/Runtime/Sensors/InputIcons/Types/CombinedIcon.cs
new file mode 100644
index 0000000..f3a3932
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/CombinedIcon.cs
@@ -0,0 +1,35 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ public enum CombineIconOrderMode
+ {
+ Forward_Only,
+ Forward_And_Reverse,
+ Any_Order
+ }
+
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class CombinedIcon:InputIcon
+ {
+ [Export]
+ public InputIcon[] icons = new InputIcon[ 0 ];
+
+
+ public override bool Equals( object obj )
+ {
+ var value = obj as CombinedIcon;
+
+ if ( value == null )
+ {
+ return false;
+ }
+
+ return Arrays.AreEntriesEqual( icons, value.icons );
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs b/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs
new file mode 100644
index 0000000..5f23146
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/GamePadAxisIcon.cs
@@ -0,0 +1,47 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class GamePadAxisIcon:InputIcon
+ {
+ [Export]
+ public JoyAxis axis;
+
+ [Export]
+ public GamePadAxisType type;
+
+
+ public override LocalizedString GetDefaultLocale()
+ {
+ return LocaleText.Create( "Axis " + axis + " " + type );
+ }
+
+ public override LocalizedString GetIconLocale()
+ {
+ return LocaleText.Create( GamePadIconSymbolsMap.GetSymbol( axis, type ) );
+ }
+
+ public override bool Equals( object obj )
+ {
+ var value = obj as GamePadAxisIcon;
+
+ if ( value == null )
+ {
+ return false;
+ }
+
+ return value.axis == axis && value.type == type;
+ }
+
+ public override string ToString()
+ {
+ return "GamePadAxisIcon{ " + axis + " " + type + " }";
+ }
+
+ }
+}
+
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs b/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs
new file mode 100644
index 0000000..f0bb79a
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/GamePadButtonIcon.cs
@@ -0,0 +1,43 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class GamePadButtonIcon:InputIcon
+ {
+ [Export]
+ public JoyButton button;
+
+ public override LocalizedString GetDefaultLocale()
+ {
+ return LocaleText.Create( "Button " + button );
+ }
+
+
+ public override LocalizedString GetIconLocale()
+ {
+ return LocaleText.Create( GamePadIconSymbolsMap.GetSymbol( button ) );
+ }
+
+ public override bool Equals( object obj )
+ {
+ var value = obj as GamePadButtonIcon;
+
+ if ( value == null )
+ {
+ return false;
+ }
+
+ return value.button == button;
+ }
+
+ public override string ToString()
+ {
+ return "GamePadButtonIcon{ " + button + " }";
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/GamePadButtonIconSymbolsMap.cs b/Runtime/Sensors/InputIcons/Types/GamePadButtonIconSymbolsMap.cs
new file mode 100644
index 0000000..27a89a2
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/GamePadButtonIconSymbolsMap.cs
@@ -0,0 +1,49 @@
+
+using Godot;
+using System.Collections.Generic;
+using System;
+
+namespace Rokojori
+{
+ public class GamePadIconSymbolsMap
+ {
+ public static string GetSymbol( JoyButton button )
+ {
+ if ( ! _buttonIconSymbols.ContainsKey( button ) )
+ {
+ return ">";
+ }
+
+ return _buttonIconSymbols[ button ];
+ }
+
+ static Dictionary _buttonIconSymbols = new Dictionary()
+ {
+ { JoyButton.A, "A" }, { JoyButton.B, "B" },{ JoyButton.X, "X" },{ JoyButton.Y, "Y" },
+ { JoyButton.LeftStick, "LS" }, { JoyButton.RightStick, "RS" },
+ { JoyButton.LeftShoulder, "LB" },{ JoyButton.RightShoulder, "RB" }
+ };
+
+ public static string GetSymbol( JoyAxis axis, GamePadAxisType axisType )
+ {
+ if ( ! _axisIconSymbols.ContainsKey( axis ) )
+ {
+ return ">";
+ }
+
+ var tuple = _axisIconSymbols[ axis ];
+
+ return GamePadAxisType.Negative == axisType ? tuple.Item1 : tuple.Item2;
+ }
+
+ static Dictionary> _axisIconSymbols = new Dictionary>()
+ {
+ { JoyAxis.LeftX, Tuple.Create( "L🠜","L🠞" ) },
+ { JoyAxis.RightX, Tuple.Create( "R🠜","R🠞") },
+ { JoyAxis.LeftY, Tuple.Create( "L🠝","L🠟") },
+ { JoyAxis.RightY,Tuple.Create( "R🠝","R🠟")},
+ { JoyAxis.TriggerLeft, Tuple.Create( "LT","LT")},
+ { JoyAxis.TriggerRight,Tuple.Create( "RT","RT")},
+ };
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/InputIcon.cs b/Runtime/Sensors/InputIcons/Types/InputIcon.cs
new file mode 100644
index 0000000..8ddeb6b
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/InputIcon.cs
@@ -0,0 +1,22 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class InputIcon:Resource
+ {
+ public virtual LocalizedString GetDefaultLocale()
+ {
+ return LocaleText.Create( "Unknown Input" );
+ }
+
+ public virtual LocalizedString GetIconLocale()
+ {
+ return LocaleText.Create( "--" );
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/KeyIcon.cs b/Runtime/Sensors/InputIcons/Types/KeyIcon.cs
new file mode 100644
index 0000000..24cae6c
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/KeyIcon.cs
@@ -0,0 +1,45 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class KeyIcon:InputIcon
+ {
+ [Export]
+ public Key key;
+
+ [Export]
+ public KeyLocation location = KeyLocation.Unspecified;
+
+ public override LocalizedString GetDefaultLocale()
+ {
+ return LocaleText.Create( "Key " + key );
+ }
+
+ public override LocalizedString GetIconLocale()
+ {
+ return LocaleText.Create( KeyIconSymbolsMap.GetSymbol( key ) );
+ }
+
+ public override bool Equals( object obj )
+ {
+ var value = obj as KeyIcon;
+
+ if ( value == null )
+ {
+ return false;
+ }
+
+ return value.key == key && value.location == location;
+ }
+
+ public override string ToString()
+ {
+ return "KeyIcon{ " + key + "@" + location + " }";
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/KeyIconSymbolsMap.cs b/Runtime/Sensors/InputIcons/Types/KeyIconSymbolsMap.cs
new file mode 100644
index 0000000..5144c45
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/KeyIconSymbolsMap.cs
@@ -0,0 +1,218 @@
+
+using Godot;
+using System.Collections.Generic;
+
+namespace Rokojori
+{
+ public class KeyIconSymbolsMap
+ {
+ public static string GetSymbol( Key key )
+ {
+ if ( ! _keyIconSymbols.ContainsKey( key ) )
+ {
+ return ">";
+ }
+
+ return _keyIconSymbols[ key ];
+ }
+
+ // Created from Key
+ // Matcher: // (.+)\skey.+\n\s+(\w+) = \d+
+ // Replacement: { Key.$2, "$1" }
+
+ static Dictionary _keyIconSymbols = new Dictionary()
+ {
+
+ { Key.Space, " " },
+ { Key.Exclam, "!" },
+ { Key.Quotedbl, "\"" },
+ { Key.Numbersign, "#" },
+ { Key.Dollar, "$" },
+ { Key.Percent, "%" },
+ { Key.Ampersand, "&" },
+ { Key.Apostrophe, "'" },
+ { Key.Parenleft, "(" },
+ { Key.Parenright, ")" },
+ { Key.Asterisk, "*" },
+ { Key.Plus, "+" },
+ { Key.Comma, "," },
+ { Key.Minus, "-" },
+ { Key.Period, "." },
+ { Key.Slash, "/" },
+ { Key.Key0, "0" },
+ { Key.Key1, "1" },
+ { Key.Key2, "2" },
+ { Key.Key3, "3" },
+ { Key.Key4, "4" },
+ { Key.Key5, "5" },
+ { Key.Key6, "6" },
+ { Key.Key7, "7" },
+ { Key.Key8, "8" },
+ { Key.Key9, "9" },
+ { Key.Colon, ":" },
+ { Key.Semicolon, ";" },
+ { Key.Less, "<" },
+ { Key.Equal, "=" },
+ { Key.Greater, ">" },
+ { Key.Question, "?" },
+ { Key.At, "@" },
+ { Key.A, "A" },
+ { Key.B, "B" },
+ { Key.C, "C" },
+ { Key.D, "D" },
+ { Key.E, "E" },
+ { Key.F, "F" },
+ { Key.G, "G" },
+ { Key.H, "H" },
+ { Key.I, "I" },
+ { Key.J, "J" },
+ { Key.K, "K" },
+ { Key.L, "L" },
+ { Key.M, "M" },
+ { Key.N, "N" },
+ { Key.O, "O" },
+ { Key.P, "P" },
+ { Key.Q, "Q" },
+ { Key.R, "R" },
+ { Key.S, "S" },
+ { Key.T, "T" },
+ { Key.U, "U" },
+ { Key.V, "V" },
+ { Key.W, "W" },
+ { Key.X, "X" },
+ { Key.Y, "Y" },
+ { Key.Z, "Z" },
+ { Key.Bracketleft, "[" },
+ { Key.Backslash, "\\" },
+ { Key.Bracketright, "]" },
+ { Key.Asciicircum, "^" },
+ { Key.Underscore, "_" },
+ { Key.Quoteleft, "`" },
+ { Key.Braceleft, "{" },
+ { Key.Bar, "|" },
+ { Key.Braceright, "}" },
+ { Key.Asciitilde, "~" },
+ { Key.Yen, "¥" },
+ { Key.Section, "§" },
+ { Key.Escape, "Esc" },
+ { Key.Tab, "⇥" },
+ { Key.Backtab, "⇤" },
+ { Key.Backspace, "←" },
+ { Key.Enter, "Return" },
+ { Key.KpEnter, "Enter" },
+ { Key.Insert, "Ins" },
+ { Key.Delete, "Del" },
+ { Key.Pause, "Pause" },
+ { Key.Print, "Prnt" },
+ { Key.Sysreq, "Sys" },
+ { Key.Clear, "Clr" },
+ { Key.Home, "Home" },
+ { Key.End, "End" },
+ { Key.Left, "◂" },
+ { Key.Up, "▴" },
+ { Key.Right, "▸" },
+ { Key.Down, "▾" },
+ { Key.Pageup, "PUp" },
+ { Key.Pagedown, "PDwn" },
+ { Key.Shift, "⇧" },
+ { Key.Ctrl, "Ctrl" },
+ { Key.Meta, "Meta" },
+ { Key.Alt, "Alt" },
+ { Key.Capslock, "⇩" },
+ { Key.Numlock, "Num Lock" },
+ { Key.Scrolllock, "Scroll Lock" },
+ { Key.F1, "F1" },
+ { Key.F2, "F2" },
+ { Key.F3, "F3" },
+ { Key.F4, "F4" },
+ { Key.F5, "F5" },
+ { Key.F6, "F6" },
+ { Key.F7, "F7" },
+ { Key.F8, "F8" },
+ { Key.F9, "F9" },
+ { Key.F10, "F10" },
+ { Key.F11, "F11" },
+ { Key.F12, "F12" },
+ { Key.F13, "F13" },
+ { Key.F14, "F14" },
+ { Key.F15, "F15" },
+ { Key.F16, "F16" },
+ { Key.F17, "F17" },
+ { Key.F18, "F18" },
+ { Key.F19, "F19" },
+ { Key.F20, "F20" },
+ { Key.F21, "F21" },
+ { Key.F22, "F22" },
+ { Key.F23, "F23" },
+ { Key.F24, "F24" },
+ { Key.F25, "F25" },
+ { Key.F26, "F26" },
+ { Key.F27, "F27" },
+ { Key.F28, "F28" },
+ { Key.F29, "F29" },
+ { Key.F30, "F30" },
+ { Key.F31, "F31" },
+ { Key.F32, "F32" },
+ { Key.F33, "F33" },
+ { Key.F34, "F34" },
+ { Key.F35, "F35" },
+ { Key.Menu, "Context menu" },
+ { Key.Hyper, "Hyper" },
+ { Key.Help, "Help" },
+ { Key.Back, "Media back" },
+ { Key.Forward, "Media forward" },
+ { Key.Stop, "Media stop" },
+ { Key.Refresh, "Media refresh" },
+ { Key.Volumedown, "+" },
+ { Key.Volumemute, "🔇" },
+ { Key.Volumeup, "-" },
+ { Key.Mediaplay, "Media play" },
+ { Key.Mediastop, "Media stop" },
+ { Key.Mediaprevious, "Previous song" },
+ { Key.Medianext, "Next song" },
+ { Key.Mediarecord, "Media record" },
+ { Key.Homepage, "Home page" },
+ { Key.Favorites, "Favorites" },
+ { Key.Search, "Search" },
+ { Key.Standby, "Standby" },
+ { Key.Openurl, "Open URL / Launch Browser" },
+ { Key.Launchmail, "Launch Mail" },
+ { Key.Launchmedia, "Launch Media" },
+ { Key.Launch0, "Launch Shortcut 0" },
+ { Key.Launch1, "Launch Shortcut 1" },
+ { Key.Launch2, "Launch Shortcut 2" },
+ { Key.Launch3, "Launch Shortcut 3" },
+ { Key.Launch4, "Launch Shortcut 4" },
+ { Key.Launch5, "Launch Shortcut 5" },
+ { Key.Launch6, "Launch Shortcut 6" },
+ { Key.Launch7, "Launch Shortcut 7" },
+ { Key.Launch8, "Launch Shortcut 8" },
+ { Key.Launch9, "Launch Shortcut 9" },
+ { Key.Launcha, "Launch Shortcut A" },
+ { Key.Launchb, "Launch Shortcut B" },
+ { Key.Launchc, "Launch Shortcut C" },
+ { Key.Launchd, "Launch Shortcut D" },
+ { Key.Launche, "Launch Shortcut E" },
+ { Key.Launchf, "Launch Shortcut F" },
+ { Key.Globe, "Globe" },
+ { Key.Keyboard, "On-screen keyboard" },
+ { Key.JisEisu, "英数" },
+ { Key.JisKana, "かな" },
+ { Key.KpMultiply, "*" },
+ { Key.KpDivide, "/" },
+ { Key.KpSubtract, "-" },
+ { Key.KpPeriod, "." },
+ { Key.KpAdd, "+" },
+ { Key.Kp0, "0" },
+ { Key.Kp1, "1" },
+ { Key.Kp2, "2" },
+ { Key.Kp3, "3" },
+ { Key.Kp4, "4" },
+ { Key.Kp5, "5" },
+ { Key.Kp6, "6" },
+ { Key.Kp7, "7" },
+ { Key.Kp8, "8" },
+ { Key.Kp9, "9" }
+ };
+ }
+}
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs b/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs
new file mode 100644
index 0000000..1f1a383
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/MouseInputIcon.cs
@@ -0,0 +1,71 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class MouseInputIcon:InputIcon
+ {
+ [Export]
+ public MouseButton button;
+
+ public override LocalizedString GetDefaultLocale()
+ {
+ return LocaleText.Create( "Mouse " + button );
+ }
+
+ public override LocalizedString GetIconLocale()
+ {
+ if ( MouseButton.Left == button )
+ {
+ return LocaleText.Create( "LMB" );
+ }
+ else if ( MouseButton.Middle == button )
+ {
+ return LocaleText.Create( "MMB" );
+ }
+ else if ( MouseButton.Right == button )
+ {
+ return LocaleText.Create( "RMB" );
+ }
+ else if ( MouseButton.WheelUp == button )
+ {
+ return LocaleText.Create( "MWU" );
+ }
+ else if ( MouseButton.WheelDown == button )
+ {
+ return LocaleText.Create( "MWD" );
+ }
+ else if ( MouseButton.WheelLeft == button )
+ {
+ return LocaleText.Create( "MWL" );
+ }
+ else if ( MouseButton.WheelRight == button )
+ {
+ return LocaleText.Create( "MWR" );
+ }
+
+ return GetDefaultLocale();
+ }
+
+ public override bool Equals( object obj )
+ {
+ var value = obj as MouseInputIcon;
+
+ if ( value == null )
+ {
+ return false;
+ }
+
+ return value.button == button;
+ }
+
+ public override string ToString()
+ {
+ return "MouseInputIcon{ " + button + " }";
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/Runtime/Sensors/InputIcons/Types/SensorIcon.cs b/Runtime/Sensors/InputIcons/Types/SensorIcon.cs
new file mode 100644
index 0000000..fac4797
--- /dev/null
+++ b/Runtime/Sensors/InputIcons/Types/SensorIcon.cs
@@ -0,0 +1,32 @@
+
+using Godot;
+
+
+namespace Rokojori
+{
+ [Tool]
+ [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
+ public partial class SensorIcon:InputIcon
+ {
+ [Export]
+ public Sensor sensor;
+
+ public override bool Equals( object obj )
+ {
+ var value = obj as SensorIcon;
+
+ if ( value == null )
+ {
+ return false;
+ }
+
+ return value.sensor == sensor;
+ }
+
+ public override string ToString()
+ {
+ return "SensorIcon{ " + sensor + " }";
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/Runtime/Sensors/InputActionSensor.cs b/Runtime/Sensors/InputMapActionSensor.cs
similarity index 71%
rename from Runtime/Sensors/InputActionSensor.cs
rename to Runtime/Sensors/InputMapActionSensor.cs
index 8335580..1c3f238 100644
--- a/Runtime/Sensors/InputActionSensor.cs
+++ b/Runtime/Sensors/InputMapActionSensor.cs
@@ -6,7 +6,7 @@ namespace Rokojori
{
[Tool]
[GlobalClass,Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
- public partial class InputActionSensor: Sensor
+ public partial class InputMapActionSensor: Sensor
{
[Export]
public string inputActionName = "";
@@ -21,6 +21,10 @@ namespace Rokojori
[Export]
public PollMode pollMode = PollMode.Button;
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, inputActionName, pollMode );
+ }
protected override void UpdateValue()
{
@@ -37,6 +41,14 @@ namespace Rokojori
SetFloatValue( Input.GetActionRawStrength( inputActionName ) );
}
}
+
+ [Export]
+ public InputIcon[] inputIcons = new InputIcon[ 0 ];
+
+ public override List GetInputIcons()
+ {
+ return Lists.From( inputIcons );
+ }
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/KeySensor.cs b/Runtime/Sensors/KeySensor.cs
index c3f3cf2..5dea8dd 100644
--- a/Runtime/Sensors/KeySensor.cs
+++ b/Runtime/Sensors/KeySensor.cs
@@ -1,6 +1,6 @@
using Godot;
-
+using System.Collections.Generic;
namespace Rokojori
{
@@ -10,6 +10,9 @@ namespace Rokojori
{
[Export]
public Key key;
+
+ [Export]
+ public KeyLocation keyLocation = KeyLocation.Unspecified;
[ExportGroup( "Modifiers")]
[Export]
@@ -34,6 +37,11 @@ namespace Rokojori
float _lastInput = 0;
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, key, keyLocation, "Ctrl/Alt/Shift:" + ctrlHold + "/" + altHold + "/" + shiftHold );
+ }
+
protected override void UpdateValue()
{
SetFloatValue( _lastInput );
@@ -43,6 +51,7 @@ namespace Rokojori
{
var keyEvent = ev as InputEventKey;
+
if ( keyEvent == null )
{
return;
@@ -53,6 +62,14 @@ namespace Rokojori
return;
}
+ if ( keyLocation != KeyLocation.Unspecified && keyEvent.Location != KeyLocation.Unspecified )
+ {
+ if ( keyEvent.Location != keyLocation )
+ {
+ return;
+ }
+ }
+
var checkModifiers = modifiersEnabled &&
(
ModifiersMode.Hold_Modifiers_All_The_Time == modifiersMode ||
@@ -83,9 +100,24 @@ namespace Rokojori
_lastInput = keyEvent.IsPressed() ? 1 : 0;
+ UpdateSensorUsage();
+
+
}
+ public override List GetInputIcons()
+ {
+ var icon = new KeyIcon();
+ icon.key = key;
+
+ return new List(){ icon };
+ }
+
+ public static bool IsModifierKey( Key key )
+ {
+ return Lists.IsOneOf( key, Key.Ctrl, Key.Alt, Key.Shift, Key.Meta );
+ }
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/MouseButtonSensor.cs b/Runtime/Sensors/MouseButtonSensor.cs
index bd258bc..a14bbb9 100644
--- a/Runtime/Sensors/MouseButtonSensor.cs
+++ b/Runtime/Sensors/MouseButtonSensor.cs
@@ -1,6 +1,6 @@
using Godot;
-
+using System.Collections.Generic;
namespace Rokojori
{
@@ -34,6 +34,11 @@ namespace Rokojori
float _lastInput = 0;
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, button, "Ctrl/Alt/Shift:" + ctrlHold + "/" + altHold + "/" + shiftHold );
+ }
+
bool IsWheel()
{
@@ -105,9 +110,18 @@ namespace Rokojori
_lastInput = isActive ? 1 : 0;
+ UpdateSensorUsage();
}
+ public override List GetInputIcons()
+ {
+ var icon = new MouseInputIcon();
+ icon.button = button;
+
+ return new List(){ icon };
+ }
+
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/MouseMotionDelta.cs b/Runtime/Sensors/MouseMotionDelta.cs
index cbdbaa4..405f024 100644
--- a/Runtime/Sensors/MouseMotionDelta.cs
+++ b/Runtime/Sensors/MouseMotionDelta.cs
@@ -22,6 +22,11 @@ namespace Rokojori
[Export]
public float speedMultiply = 1;
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, motionType, speedMultiply );
+ }
+
float _lastInput = 0;
protected override void UpdateValue()
@@ -62,6 +67,8 @@ namespace Rokojori
// RJLog.Log( "Motion:", motionType, motion * speedMultiply );
_lastInput = motion * speedMultiply;
+
+ UpdateSensorUsage();
}
diff --git a/Runtime/Sensors/MouseScreenRelative.cs b/Runtime/Sensors/MouseScreenRelative.cs
index ab97b93..17f2c55 100644
--- a/Runtime/Sensors/MouseScreenRelative.cs
+++ b/Runtime/Sensors/MouseScreenRelative.cs
@@ -26,6 +26,11 @@ namespace Rokojori
SetFloatValue( _lastInput );
}
+ public override string ToString()
+ {
+ return RJLog.GetInfo( this, motionType );
+ }
+
public void _Input( InputEvent ev )
{
var mouseEvent = ev as InputEventMouseMotion ;
diff --git a/Runtime/Sensors/Sensor.cs b/Runtime/Sensors/Sensor.cs
index b0d3412..870b296 100644
--- a/Runtime/Sensors/Sensor.cs
+++ b/Runtime/Sensors/Sensor.cs
@@ -1,6 +1,6 @@
using Godot;
-
+using System.Collections.Generic;
namespace Rokojori
{
@@ -8,6 +8,12 @@ namespace Rokojori
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Sensor.svg")]
public partial class Sensor: Resource
{
+ [Export]
+ public LocaleText name;
+
+ [Export]
+ public LocaleText info;
+
[Export]
public bool continous = false;
@@ -66,6 +72,16 @@ namespace Rokojori
_active = value > _activeTreshold;
}
+ public virtual List GetInputIcons()
+ {
+ return new List();
+ }
+
+ protected void UpdateSensorUsage( int index = 0 )
+ {
+ var sm = Unique.Get();
+ sm.UpdateLastActiveDevice( this, index );
+ }
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/SensorGroup.cs b/Runtime/Sensors/SensorGroup.cs
index 89f4f2d..3c1df0e 100644
--- a/Runtime/Sensors/SensorGroup.cs
+++ b/Runtime/Sensors/SensorGroup.cs
@@ -9,6 +9,6 @@ namespace Rokojori
public partial class SensorGroup:Resource
{
[Export]
- public Sensor[] sensors;
+ public Sensor[] sensors = new Sensor[ 0 ];
}
}
\ No newline at end of file
diff --git a/Runtime/Sensors/SensorManager.cs b/Runtime/Sensors/SensorManager.cs
index 915dfda..d729b10 100644
--- a/Runtime/Sensors/SensorManager.cs
+++ b/Runtime/Sensors/SensorManager.cs
@@ -1,7 +1,7 @@
using Godot;
using System.Collections.Generic;
-
+using System;
namespace Rokojori
{
[Tool]
@@ -12,25 +12,138 @@ namespace Rokojori
public bool initializeOnReady = true;
[Export]
- public Sensor[] sensors;
+ public Sensor[] sensors = new Sensor[ 0 ];
[Export]
- public SensorGroup[] sensorGroups;
+ public SensorGroup[] sensorGroups = new SensorGroup[ 0 ];
[Export]
public bool processSensors = false;
[Export]
- public Node[] autoScanForSensors;
-
+ public Node[] autoScanForSensors = new Node[ 0 ];
+ [Export]
+ public bool separateMouseAndKeyboardTracking = false;
+
+ [Export]
+ public Action onActiveDeviceChange;
+ public readonly EventSlot _onActiveDeviceChange = new EventSlot();
+
+ [ExportGroup("Read Only")]
+ [Export]
+ public SensorDevice[] deviceList = new SensorDevice[]{};
+
+ [Export]
+ public float[] deviceLastInputTimeStamp = new float[]{};
+
+ [ExportGroup("Testing")]
+
+ [Export]
+ public SensorDevice testingLastActiveDevice;
+
+
+
+
List runners = new List();
List inputers = new List();
Dictionary sensorToRunner = new Dictionary();
-
+
+
+ KeyboardDevice keyboardDevice = new KeyboardDevice();
+ MouseDevice mouseDevice = new MouseDevice();
+ GamePadDevice gamePadDevice = new GamePadDevice();
+ MultiSensorDevice mouseKeyboardDevice = new MultiSensorDevice();
+
+ DateTime _startTime;
+
+
+ public SensorDevice lastActiveDevice
+ {
+ get
+ {
+ if ( testingLastActiveDevice != null )
+ {
+ return testingLastActiveDevice;
+ }
+
+ var highest = Lists.IndexOfHighestValue( Lists.From( deviceLastInputTimeStamp ), t => t );
+
+ if ( highest == -1 )
+ {
+ return null;
+ }
+
+ return deviceList[ highest ];
+ }
+
+ }
+
+ void UpdateDevice( SensorDevice d )
+ {
+ var lastActive = lastActiveDevice;
+
+ var index = Arrays.IndexOf( deviceList, d );
+
+ if ( index == -1 )
+ {
+ deviceList = Arrays.Add( deviceList, d );
+ index = deviceList.Length - 1;
+ deviceLastInputTimeStamp = Arrays.Add( deviceLastInputTimeStamp, 0 );
+ }
+
+ deviceLastInputTimeStamp[ index ] = (float) ( DateTime.Now - _startTime ).TotalSeconds;
+
+ if ( lastActive == lastActiveDevice )
+ {
+ return;
+ }
+
+ Action.Trigger( onActiveDeviceChange );
+ _onActiveDeviceChange.DispatchEvent( null );
+
+ }
+
+ public void UpdateLastActiveDevice( Sensor sensor, int index )
+ {
+ if ( keyboardDevice.ContainsSensor( sensor ) )
+ {
+ UpdateDevice( separateMouseAndKeyboardTracking ? keyboardDevice : mouseKeyboardDevice );
+
+ return;
+ }
+
+ if ( mouseDevice.ContainsSensor( sensor ) )
+ {
+ UpdateDevice( separateMouseAndKeyboardTracking ? mouseDevice : mouseKeyboardDevice );
+ return;
+ }
+
+
+
+
+ if ( gamePadDevice.ContainsSensor( sensor ) )
+ {
+ var device = Arrays.Find( deviceList, d => d is GamePadDevice gpd && gpd.deviceIndex == index );
+
+ if ( device == null )
+ {
+ var gpd = new GamePadDevice();
+ gpd.deviceIndex = index;
+ gpd.deviceName = Input.GetJoyName( index );
+
+ device = gpd;
+ }
+
+ UpdateDevice( device );
+ }
+ }
public override void _Ready()
{
+ _startTime = DateTime.Now;
+ mouseKeyboardDevice.devices = new SensorDevice[]{ mouseDevice, keyboardDevice };
+
if ( ! initializeOnReady )
{
return;
@@ -81,7 +194,6 @@ namespace Rokojori
{
var sm = Unique.Get();
-
foreach ( var s in sensors )
{
if ( s == null )
@@ -89,7 +201,7 @@ namespace Rokojori
continue;
}
- ( handler as Node ).LogInfo( "Registrating" );
+ ( handler as Node ).LogInfo( "Registrating", HierarchyName.Of( (Node)handler) );
sm.Register( s, handler );
}
}
@@ -117,9 +229,12 @@ namespace Rokojori
{
if ( s == null || sensorsSet.Contains( s ) )
{
+ // this.LogInfo( "Not including:", HierarchyName.Of( s ) );
return;
}
+ this.LogInfo( "Including:", HierarchyName.Of( s ) );
+
AddSensorsFrom( s );
sensorsSet.Add( s );
diff --git a/Runtime/Sensors/Sensors.cs b/Runtime/Sensors/Sensors.cs
index 7f26b53..6b307ab 100644
--- a/Runtime/Sensors/Sensors.cs
+++ b/Runtime/Sensors/Sensors.cs
@@ -6,19 +6,33 @@ namespace Rokojori
{
public class Sensors
{
+ public static bool IsDown( Sensor sensor, int device = 0 )
+ {
+ return sensor == null ? false : sensor.IsDown( device );
+ }
+
public static bool IsActive( Sensor sensor )
{
return sensor == null ? false : sensor.isActive;
}
- public static float GetValue( Sensor sensor, float scale = 1 )
+ public static float GetValue( Sensor sensor, float scale = 1, float deadZone = 0.3f )
{
- return sensor == null ? 0 : sensor.value * scale;
+ if ( sensor == null )
+ {
+ return 0;
+ }
+
+ var rawValue = sensor.value;
+
+ var clamped = MathX.NormalizeClamped( rawValue, deadZone, 1 );
+
+ return clamped * scale;
}
- public static float PolarAxis( Sensor negative, Sensor positive )
+ public static float PolarAxis( Sensor negative, Sensor positive, float scale = 1, float deadZone = 0.3f )
{
- return GetValue( negative, -1 ) + GetValue( positive, 1 );
+ return GetValue( negative, -scale, deadZone ) + GetValue( positive, scale, deadZone );
}
}
}
\ No newline at end of file
diff --git a/Runtime/Shading/Library/Line3.gdshaderinc b/Runtime/Shading/Library/Line3.gdshaderinc
new file mode 100644
index 0000000..917fb0f
--- /dev/null
+++ b/Runtime/Shading/Library/Line3.gdshaderinc
@@ -0,0 +1,43 @@
+struct Line3
+{
+ vec3 start;
+ vec3 end;
+};
+
+vec3 Line3_getAt( inout Line3 line, float t )
+{
+ return line.start + ( line.end - line.start ) * t;
+}
+
+float Line3_closestParameterToPoint( inout Line3 line, vec3 point )
+{
+ vec3 startP = point - line.start;
+ vec3 startEnd = line.end - line.start;
+
+ float startEnd2 = dot( startEnd, startEnd );
+ float startEnd_startP = dot( startEnd, startP );
+
+ if ( startEnd2 == 0.0 )
+ {
+ return 0.5;
+ }
+
+ float t = startEnd_startP / startEnd2;
+
+ return t;
+}
+
+vec3 Line3_closestPointToPoint( inout Line3 line, vec3 point )
+{
+ float parameter = Line3_closestParameterToPoint( line, point );
+ return Line3_getAt( line, parameter );
+}
+
+float Line3_getDistance( inout Line3 line, vec3 point )
+{
+ float parameter = clamp( Line3_closestParameterToPoint( line, point ), 0, 1 );
+
+ vec3 p = Line3_getAt( line, parameter );
+
+ return length( point - p );
+}
\ No newline at end of file
diff --git a/Runtime/Shading/Library/NinePatch.gdshaderinc b/Runtime/Shading/Library/NinePatch.gdshaderinc
new file mode 100644
index 0000000..7332980
--- /dev/null
+++ b/Runtime/Shading/Library/NinePatch.gdshaderinc
@@ -0,0 +1,64 @@
+#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Math.gdshaderinc"
+
+void computeNinePatchBorders( vec2 _TEXTURE_PIXEL_SIZE, vec2 renderSize, vec4 pixelBorders,
+ out vec4 uvBorders, out vec4 scaledBorders )
+{
+ vec2 texSize = vec2( 1.0 / _TEXTURE_PIXEL_SIZE.x, 1.0 / _TEXTURE_PIXEL_SIZE.y );
+
+ vec2 scale = texSize / renderSize;
+ scale = max( scale, vec2( 1, 1 ) );
+
+ float scaling = max( scale.x, scale.y );
+
+ uvBorders = vec4
+ (
+ pixelBorders[ 0 ] / texSize.x, ( texSize.x - pixelBorders[ 1 ] ) / texSize.x,
+
+ pixelBorders[ 2 ] / texSize.y, ( texSize.y - pixelBorders[ 1 ] ) / texSize.y
+ );
+
+ scaledBorders = pixelBorders / scaling;
+ scaledBorders[ 1 ] = renderSize.x - scaledBorders[ 1 ];
+ scaledBorders[ 3 ] = renderSize.y - scaledBorders[ 3 ];
+}
+
+float ninePatchBorderRemap( float value, float borderStart, float borderEnd,
+ float uvStart, float uvEnd, float maxSize )
+{
+ float inMin = borderStart;
+ float inMax = borderEnd;
+ float outMin = uvStart;
+ float outMax = uvEnd;
+
+
+ if ( value < borderStart )
+ {
+ inMin = 0.0; inMax = borderStart;
+ outMin = 0.0; outMax = uvStart;
+ }
+ else if ( value > borderEnd )
+ {
+ inMin = borderEnd; inMax = maxSize;
+ outMin = uvEnd; outMax = 1.0;
+ }
+
+ return map( value, inMin, inMax, outMin, outMax );
+
+}
+
+vec2 computeNinePatchUV( vec2 _UV, vec2 renderSize, vec4 uvBorders, vec4 scaledBorders )
+{
+ vec2 pixelCoord = _UV * renderSize;
+
+ float nU = ninePatchBorderRemap(
+ pixelCoord.x, scaledBorders[ 0 ], scaledBorders[ 1 ],
+ uvBorders[ 0 ], uvBorders[ 1 ], renderSize.x
+ );
+
+ float nV = ninePatchBorderRemap(
+ pixelCoord.y, scaledBorders[ 2 ], scaledBorders[ 3 ],
+ uvBorders[ 2 ], uvBorders[ 3 ], renderSize.y
+ );
+
+ return vec2( nU, nV );
+}
\ No newline at end of file
diff --git a/Runtime/Shading/Library/SDF.gdshaderinc b/Runtime/Shading/Library/SDF.gdshaderinc
new file mode 100644
index 0000000..1f59af6
--- /dev/null
+++ b/Runtime/Shading/Library/SDF.gdshaderinc
@@ -0,0 +1,29 @@
+void computeRectangleBounds( float in_offset, float in_radius, float in_maxRadius, vec2 size, out vec2 minP, out vec2 maxP, out float out_radius )
+{
+ out_radius = min( in_radius, in_maxRadius );
+ float borderSize = out_radius + in_offset;
+ minP = vec2( borderSize, borderSize );
+ maxP = size - vec2( borderSize, borderSize );
+}
+
+float roundedRectangleDistance( vec2 minP, vec2 maxP, vec2 pos)
+{
+ vec2 leftTop = minP - pos;
+ vec2 bottomRight = pos - maxP;
+
+ vec2 maximum = max( leftTop, bottomRight );
+ maximum = max( maximum, vec2(0,0) );
+
+ return length( maximum );
+}
+
+float roundedRectangle( vec2 minP, vec2 maxP, vec2 point, float borderSize, float sharp )
+{
+ float rectangleDistance = roundedRectangleDistance( minP, maxP, point );
+ rectangleDistance -= borderSize;
+ rectangleDistance *= sharp;
+
+ rectangleDistance = clamp( rectangleDistance, 0.0, 1.0 );
+
+ return 1.0 - rectangleDistance;
+}
\ No newline at end of file
diff --git a/Runtime/Shading/Library/Transform.gdshaderinc b/Runtime/Shading/Library/Transform.gdshaderinc
index ef2e82e..901b721 100644
--- a/Runtime/Shading/Library/Transform.gdshaderinc
+++ b/Runtime/Shading/Library/Transform.gdshaderinc
@@ -1,4 +1,9 @@
+vec3 applyMatrix( vec3 v, mat4 m )
+{
+ return ( m * vec4( v, 1.0 ) ).xyz;
+}
+
vec3 localToWorld( vec3 _VERTEX, mat4 _MODEL_MATRIX )
{
return ( _MODEL_MATRIX * vec4( _VERTEX, 1.0 ) ).xyz;
@@ -224,3 +229,74 @@ vec2 applyMatrixBase_m3v2( mat3 matrix, vec2 point )
return vec2( ox, oy );
}
+
+
+mat4 identity_m4()
+{
+ return mat4(
+ vec4( 1, 0, 0, 0 ),
+ vec4( 0, 1, 0, 0 ),
+ vec4( 0, 0, 1, 0 ),
+ vec4( 0, 0, 0, 1 )
+ );
+}
+
+mat4 translate_m4( vec3 translation )
+{
+ return mat4(
+ vec4( 1, 0, 0, translation.x ),
+ vec4( 0, 1, 0, translation.y ),
+ vec4( 0, 0, 1, translation.z ),
+ vec4( 0, 0, 0, 1 )
+ );
+}
+
+mat4 scale_m4( vec3 scale )
+{
+ return mat4(
+ vec4( scale.x, 0, 0, 0 ),
+ vec4( 0, scale.y, 0, 0 ),
+ vec4( 0, 0, scale.z, 0 ),
+ vec4( 0, 0, 0, 1 )
+ );
+}
+
+
+mat4 rotationX_m4( float radiansAngle )
+{
+ float c = cos( radiansAngle );
+ float s = sin( radiansAngle );
+
+ return mat4(
+ vec4( 1, 0, 0, 0 ),
+ vec4( 0, c, -s, 0 ),
+ vec4( 0, s, c, 0 ),
+ vec4( 0, 0, 0, 1 )
+ );
+}
+
+mat4 rotationY_m4( float radiansAngle )
+{
+ float c = cos( radiansAngle );
+ float s = sin( radiansAngle );
+
+ return mat4(
+ vec4( c, 0, s, 0 ),
+ vec4( 0, 1, 0, 0 ),
+ vec4( -s, 0, c, 0 ),
+ vec4( 0, 0, 0, 1 )
+ );
+}
+
+mat4 rotationZ_m4( float radiansAngle )
+{
+ float c = cos( radiansAngle );
+ float s = sin( radiansAngle );
+
+ return mat4(
+ vec4( c, -s, 0, 0 ),
+ vec4( s, c, 0, 0 ),
+ vec4( 0, 0, 1, 0 ),
+ vec4( 0, 0, 0, 1 )
+ );
+}
\ No newline at end of file
diff --git a/Runtime/Shading/Materials/CustomMaterial.cs b/Runtime/Shading/Materials/CustomMaterial.cs
index 66d1784..9b536d9 100644
--- a/Runtime/Shading/Materials/CustomMaterial.cs
+++ b/Runtime/Shading/Materials/CustomMaterial.cs
@@ -4,6 +4,8 @@ using System.Collections.Generic;
namespace Rokojori
{
+ [Tool]
+ [GlobalClass]
public partial class CustomMaterial:ShaderMaterial
{
public void CopyUniformsFrom( ShaderMaterial material )
diff --git a/Runtime/Shading/Materials/CustomMaterialProperty.cs b/Runtime/Shading/Materials/CustomMaterialProperty.cs
index 084b2cc..a80e15a 100644
--- a/Runtime/Shading/Materials/CustomMaterialProperty.cs
+++ b/Runtime/Shading/Materials/CustomMaterialProperty.cs
@@ -15,6 +15,11 @@ namespace Rokojori
CustomMaterial _material;
ShaderPropertyName _name;
+ public S GetPropertyName() where S:ShaderPropertyName
+ {
+ return _name as S;
+ }
+
public T Get()
{
return _name._Get( _material, default( T ) );
diff --git a/Runtime/Shading/Materials/MaterialTransfer.cs b/Runtime/Shading/Materials/MaterialTransfer.cs
index b0d1c4d..2aa9b72 100644
--- a/Runtime/Shading/Materials/MaterialTransfer.cs
+++ b/Runtime/Shading/Materials/MaterialTransfer.cs
@@ -9,7 +9,7 @@ namespace Rokojori
public partial class MaterialTransfer:Resource
{
[Export]
- public SubMaterialTransfer[] transfers;
+ public SubMaterialTransfer[] transfers = new SubMaterialTransfer[ 0 ];
public void Transfer( Material source, Material target )
{
diff --git a/Runtime/Shading/Materials/SubMaterialTransfer.cs b/Runtime/Shading/Materials/SubMaterialTransfer.cs
index fda068f..15a811a 100644
--- a/Runtime/Shading/Materials/SubMaterialTransfer.cs
+++ b/Runtime/Shading/Materials/SubMaterialTransfer.cs
@@ -35,7 +35,7 @@ namespace Rokojori
[ExportGroup("Shader Matching/Custom Shaders")]
[Export]
- public Shader[] shaders;
+ public Shader[] shaders = new Shader[ 0 ];
public bool MatchesMaterial( Material m )
@@ -83,31 +83,31 @@ namespace Rokojori
[ExportGroup("Property Transfers")]
[Export]
- public BoolPropertyTransfer[] bools;
+ public BoolPropertyTransfer[] bools = new BoolPropertyTransfer[ 0 ];
[Export]
- public ColorPropertyTransfer[] colors;
+ public ColorPropertyTransfer[] colors = new ColorPropertyTransfer[ 0 ];
[Export]
- public FloatPropertyTransfer[] floats;
+ public FloatPropertyTransfer[] floats = new FloatPropertyTransfer[ 0 ];
[Export]
- public IntPropertyTransfer[] ints;
+ public IntPropertyTransfer[] ints = new IntPropertyTransfer[ 0 ];
[Export]
- public Texture2DPropertyTransfer[] texture2D;
+ public Texture2DPropertyTransfer[] texture2D = new Texture2DPropertyTransfer[ 0 ];
[Export]
- public Vector2PropertyTransfer[] vector2;
+ public Vector2PropertyTransfer[] vector2 = new Vector2PropertyTransfer[ 0 ];
[Export]
- public Vector3PropertyTransfer[] vector3;
+ public Vector3PropertyTransfer[] vector3 = new Vector3PropertyTransfer[ 0 ];
[Export]
- public Vector4PropertyTransfer[] vector4;
+ public Vector4PropertyTransfer[] vector4 = new Vector4PropertyTransfer[ 0 ];
[Export]
- public CustomMaterialTransfer[] custom;
+ public CustomMaterialTransfer[] custom = new CustomMaterialTransfer[ 0 ];
public void Transfer( Material a, Material b )
diff --git a/Runtime/Shading/Properties/Property Library/TextureChannels/AO Texture Channel.tres b/Runtime/Shading/Properties/Property Library/TextureChannels/AO Texture Channel.tres
index 2e4a796..ed0304f 100644
--- a/Runtime/Shading/Properties/Property Library/TextureChannels/AO Texture Channel.tres
+++ b/Runtime/Shading/Properties/Property Library/TextureChannels/AO Texture Channel.tres
@@ -4,4 +4,4 @@
[resource]
script = ExtResource("1_0bu4b")
-propertyName = ""
+propertyName = "ao_texture_channel"
diff --git a/Runtime/Shading/Properties/Property Library/TextureChannels/Roughness Texture Channel.tres b/Runtime/Shading/Properties/Property Library/TextureChannels/Roughness Texture Channel.tres
index 544bb70..6143517 100644
--- a/Runtime/Shading/Properties/Property Library/TextureChannels/Roughness Texture Channel.tres
+++ b/Runtime/Shading/Properties/Property Library/TextureChannels/Roughness Texture Channel.tres
@@ -4,4 +4,4 @@
[resource]
script = ExtResource("1_p7os4")
-propertyName = "ao_texture_channel"
+propertyName = "roughness_texture_channel"
diff --git a/Runtime/Shading/Properties/ShaderPropertyName.cs b/Runtime/Shading/Properties/ShaderPropertyName.cs
index 1a41755..ad47475 100644
--- a/Runtime/Shading/Properties/ShaderPropertyName.cs
+++ b/Runtime/Shading/Properties/ShaderPropertyName.cs
@@ -74,7 +74,7 @@ namespace Rokojori
if ( _cSharpName != null && _cSharpName != "" && _propertyInfoCache.Has( type, _cSharpName ) )
{
- RJLog.Log( type, ">>", material, "_cSharpName", _cSharpName );
+ // RJLog.Log( type, ">>", material, "_cSharpName", _cSharpName );
return _propertyInfoCache[ type ][ _cSharpName ];
}
diff --git a/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutline.cs b/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutlineMaterial.cs
similarity index 85%
rename from Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutline.cs
rename to Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutlineMaterial.cs
index 42eb1aa..b4a4d84 100644
--- a/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutline.cs
+++ b/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutlineMaterial.cs
@@ -2,7 +2,9 @@ using Godot;
namespace Rokojori
{
- public class FancyOutline
+ // Generated by ShaderClassGenerator
+
+ public class FancyOutlineShader
{
public static readonly CachedResource shader = new CachedResource(
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutline.gdshader"
@@ -22,6 +24,8 @@ namespace Rokojori
}
+ [Tool]
+ [GlobalClass]
public partial class FancyOutlineMaterial:CustomMaterial
{
public static readonly CachedResource ScanWhite500Ms20x = CustomMaterial.Cached(
@@ -42,19 +46,19 @@ namespace Rokojori
public FancyOutlineMaterial()
{
- Shader = FancyOutline.shader.Get();
+ Shader = FancyOutlineShader.shader.Get();
- albedo = new CustomMaterialProperty( this, FancyOutline.albedo );
- size = new CustomMaterialProperty( this, FancyOutline.size );
- sizeCloseScale = new CustomMaterialProperty( this, FancyOutline.sizeCloseScale );
- sizeFarScale = new CustomMaterialProperty( this, FancyOutline.sizeFarScale );
- closeDistance = new CustomMaterialProperty( this, FancyOutline.closeDistance );
- farDistance = new CustomMaterialProperty( this, FancyOutline.farDistance );
- opacityModulationStrength = new CustomMaterialProperty( this, FancyOutline.opacityModulationStrength );
- opacityModulationDuration = new CustomMaterialProperty( this, FancyOutline.opacityModulationDuration );
- scanLineAmount = new CustomMaterialProperty( this, FancyOutline.scanLineAmount );
- scanLineDivisions = new CustomMaterialProperty( this, FancyOutline.scanLineDivisions );
- scanLineSpeed = new CustomMaterialProperty( this, FancyOutline.scanLineSpeed );
+ albedo = new CustomMaterialProperty( this, FancyOutlineShader.albedo );
+ size = new CustomMaterialProperty( this, FancyOutlineShader.size );
+ sizeCloseScale = new CustomMaterialProperty( this, FancyOutlineShader.sizeCloseScale );
+ sizeFarScale = new CustomMaterialProperty( this, FancyOutlineShader.sizeFarScale );
+ closeDistance = new CustomMaterialProperty( this, FancyOutlineShader.closeDistance );
+ farDistance = new CustomMaterialProperty( this, FancyOutlineShader.farDistance );
+ opacityModulationStrength = new CustomMaterialProperty( this, FancyOutlineShader.opacityModulationStrength );
+ opacityModulationDuration = new CustomMaterialProperty( this, FancyOutlineShader.opacityModulationDuration );
+ scanLineAmount = new CustomMaterialProperty( this, FancyOutlineShader.scanLineAmount );
+ scanLineDivisions = new CustomMaterialProperty( this, FancyOutlineShader.scanLineDivisions );
+ scanLineSpeed = new CustomMaterialProperty( this, FancyOutlineShader.scanLineSpeed );
}
}
diff --git a/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlay.cs b/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlayMaterial.cs
similarity index 82%
rename from Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlay.cs
rename to Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlayMaterial.cs
index c084906..6ff2d81 100644
--- a/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlay.cs
+++ b/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlayMaterial.cs
@@ -1,49 +1,49 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-using System.Text;
using Godot;
namespace Rokojori
{
- public class FresnelOverlay
+ // Generated by ShaderClassGenerator
+
+ public class FresnelOverlayShader
{
public static readonly CachedResource shader = new CachedResource(
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlay.gdshader"
- );
+ );
public static readonly ColorPropertyName albedo = ColorPropertyName.Create( "albedo" );
- public static readonly Texture2DPropertyName textureAlbedo = Texture2DPropertyName.Create( "texture_albedo" );
public static readonly FloatPropertyName grow = FloatPropertyName.Create( "grow" );
-
public static readonly FloatPropertyName fresnelSharpness = FloatPropertyName.Create( "fresnelSharpness" );
public static readonly FloatPropertyName fresnelMultiply = FloatPropertyName.Create( "fresnelMultiply" );
public static readonly FloatPropertyName fresnelOffset = FloatPropertyName.Create( "fresnelOffset" );
+ public static readonly Texture2DPropertyName textureAlbedo = Texture2DPropertyName.Create( "texture_albedo" );
}
+ [Tool]
+ [GlobalClass]
public partial class FresnelOverlayMaterial:CustomMaterial
{
+
+
public readonly CustomMaterialProperty albedo;
- public readonly CustomMaterialProperty textureAlbedo;
public readonly CustomMaterialProperty grow;
-
public readonly CustomMaterialProperty fresnelSharpness;
public readonly CustomMaterialProperty fresnelMultiply;
public readonly CustomMaterialProperty fresnelOffset;
+ public readonly CustomMaterialProperty textureAlbedo;
public FresnelOverlayMaterial()
{
- Shader = FresnelOverlay.shader.Get();
+ Shader = FresnelOverlayShader.shader.Get();
- albedo = new CustomMaterialProperty( this, FresnelOverlay.albedo );
- textureAlbedo = new CustomMaterialProperty( this, FresnelOverlay.textureAlbedo );
- grow = new CustomMaterialProperty( this, FresnelOverlay.grow );
-
- fresnelSharpness = new CustomMaterialProperty( this, FresnelOverlay.fresnelSharpness );
- fresnelMultiply = new CustomMaterialProperty( this, FresnelOverlay.fresnelMultiply );
- fresnelOffset = new CustomMaterialProperty( this, FresnelOverlay.fresnelOffset );
+ albedo = new CustomMaterialProperty( this, FresnelOverlayShader.albedo );
+ grow = new CustomMaterialProperty( this, FresnelOverlayShader.grow );
+ fresnelSharpness = new CustomMaterialProperty( this, FresnelOverlayShader.fresnelSharpness );
+ fresnelMultiply = new CustomMaterialProperty( this, FresnelOverlayShader.fresnelMultiply );
+ fresnelOffset = new CustomMaterialProperty( this, FresnelOverlayShader.fresnelOffset );
+ textureAlbedo = new CustomMaterialProperty( this, FresnelOverlayShader.textureAlbedo );
}
+
}
}
\ No newline at end of file
diff --git a/Runtime/Shading/Shaders/Effects/Outline/Outline.gdshader b/Runtime/Shading/Shaders/Effects/Outline/Outline.gdshader
index 6146965..c91069e 100644
--- a/Runtime/Shading/Shaders/Effects/Outline/Outline.gdshader
+++ b/Runtime/Shading/Shaders/Effects/Outline/Outline.gdshader
@@ -16,17 +16,17 @@ uniform float opacityModulationDuration : hint_range(0,10) = 1;
varying vec4 appliedColor;
-void vertex()
+void vertex()
{
float cameraDistance = distance( VERTEX, CAMERA_POSITION_WORLD );
float outlineSize = size * mapClamped( cameraDistance, closeDistance, farDistance, sizeCloseScale, sizeFarScale );
VERTEX += NORMAL * outlineSize/500.0 * cameraDistance;
-
- float sinTime = sin( mod( TIME, opacityModulationDuration ) / opacityModulationDuration * PI * 2.0 ) / 2.0;
+
+ float sinTime = sin( mod( TIME, opacityModulationDuration ) / opacityModulationDuration * PI * 2.0 ) / 2.0;
float alpha = 1.0 - opacityModulationStrength * 0.5 + sinTime * opacityModulationStrength;
-
+
appliedColor = albedo ;
- appliedColor.a *= alpha;
+ appliedColor.a *= alpha;
}
void fragment()
diff --git a/Runtime/Shading/Shaders/Effects/Outline/Outline.cs b/Runtime/Shading/Shaders/Effects/Outline/OutlineMaterial.cs
similarity index 78%
rename from Runtime/Shading/Shaders/Effects/Outline/Outline.cs
rename to Runtime/Shading/Shaders/Effects/Outline/OutlineMaterial.cs
index 83f2828..7dec3b7 100644
--- a/Runtime/Shading/Shaders/Effects/Outline/Outline.cs
+++ b/Runtime/Shading/Shaders/Effects/Outline/OutlineMaterial.cs
@@ -2,7 +2,9 @@ using Godot;
namespace Rokojori
{
- public class Outline
+ // Generated by ShaderClassGenerator
+
+ public class OutlineShader
{
public static readonly CachedResource shader = new CachedResource(
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Outline/Outline.gdshader"
@@ -16,10 +18,11 @@ namespace Rokojori
public static readonly FloatPropertyName farDistance = FloatPropertyName.Create( "farDistance" );
public static readonly FloatPropertyName opacityModulationStrength = FloatPropertyName.Create( "opacityModulationStrength" );
public static readonly FloatPropertyName opacityModulationDuration = FloatPropertyName.Create( "opacityModulationDuration" );
- public static readonly FloatPropertyName opacityModulationOffset = FloatPropertyName.Create( "opacityModulationOffset" );
}
+ [Tool]
+ [GlobalClass]
public partial class OutlineMaterial:CustomMaterial
{
public static readonly CachedResource BoldYellow = CustomMaterial.Cached(
@@ -37,21 +40,19 @@ namespace Rokojori
public readonly CustomMaterialProperty farDistance;
public readonly CustomMaterialProperty opacityModulationStrength;
public readonly CustomMaterialProperty opacityModulationDuration;
- public readonly CustomMaterialProperty opacityModulationOffset;
public OutlineMaterial()
{
- Shader = Outline.shader.Get();
+ Shader = OutlineShader.shader.Get();
- albedo = new CustomMaterialProperty( this, Outline.albedo );
- size = new CustomMaterialProperty( this, Outline.size );
- sizeCloseScale = new CustomMaterialProperty( this, Outline.sizeCloseScale );
- sizeFarScale = new CustomMaterialProperty( this, Outline.sizeFarScale );
- closeDistance = new CustomMaterialProperty( this, Outline.closeDistance );
- farDistance = new CustomMaterialProperty( this, Outline.farDistance );
- opacityModulationStrength = new CustomMaterialProperty( this, Outline.opacityModulationStrength );
- opacityModulationDuration = new CustomMaterialProperty( this, Outline.opacityModulationDuration );
- opacityModulationOffset = new CustomMaterialProperty( this, Outline.opacityModulationOffset );
+ albedo = new CustomMaterialProperty( this, OutlineShader.albedo );
+ size = new CustomMaterialProperty( this, OutlineShader.size );
+ sizeCloseScale = new CustomMaterialProperty( this, OutlineShader.sizeCloseScale );
+ sizeFarScale = new CustomMaterialProperty( this, OutlineShader.sizeFarScale );
+ closeDistance = new CustomMaterialProperty( this, OutlineShader.closeDistance );
+ farDistance = new CustomMaterialProperty( this, OutlineShader.farDistance );
+ opacityModulationStrength = new CustomMaterialProperty( this, OutlineShader.opacityModulationStrength );
+ opacityModulationDuration = new CustomMaterialProperty( this, OutlineShader.opacityModulationDuration );
}
}
diff --git a/Runtime/Shading/Shaders/Effects/Overlay/Overlay.cs b/Runtime/Shading/Shaders/Effects/Overlay/OverlayMaterial.cs
similarity index 76%
rename from Runtime/Shading/Shaders/Effects/Overlay/Overlay.cs
rename to Runtime/Shading/Shaders/Effects/Overlay/OverlayMaterial.cs
index 1dcfc67..4291975 100644
--- a/Runtime/Shading/Shaders/Effects/Overlay/Overlay.cs
+++ b/Runtime/Shading/Shaders/Effects/Overlay/OverlayMaterial.cs
@@ -2,7 +2,9 @@ using Godot;
namespace Rokojori
{
- public class Overlay
+ // Generated by ShaderClassGenerator
+
+ public class OverlayShader
{
public static readonly CachedResource shader = new CachedResource(
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Overlay/Overlay.gdshader"
@@ -14,6 +16,8 @@ namespace Rokojori
}
+ [Tool]
+ [GlobalClass]
public partial class OverlayMaterial:CustomMaterial
{
@@ -24,11 +28,11 @@ namespace Rokojori
public OverlayMaterial()
{
- Shader = Overlay.shader.Get();
+ Shader = OverlayShader.shader.Get();
- albedo = new CustomMaterialProperty( this, Overlay.albedo );
- opacityModulationStrength = new CustomMaterialProperty( this, Overlay.opacityModulationStrength );
- opacityModulationDuration = new CustomMaterialProperty( this, Overlay.opacityModulationDuration );
+ albedo = new CustomMaterialProperty( this, OverlayShader.albedo );
+ opacityModulationStrength = new CustomMaterialProperty( this, OverlayShader.opacityModulationStrength );
+ opacityModulationDuration = new CustomMaterialProperty( this, OverlayShader.opacityModulationDuration );
}
}
diff --git a/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient.cs b/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient.cs
deleted file mode 100644
index 1cf0c6f..0000000
--- a/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-using System.Text;
-using Godot;
-
-namespace Rokojori
-{
- public class ScanGradient
- {
- public static readonly CachedResource shader = new CachedResource(
- "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient.gdshader"
- );
-
- public static readonly ColorPropertyName albedo = ColorPropertyName.Create( "albedo" );
- public static readonly Texture2DPropertyName textureAlbedo = Texture2DPropertyName.Create( "texture_albedo" );
- public static readonly FloatPropertyName grow = FloatPropertyName.Create( "grow" );
- public static readonly FloatPropertyName offset = FloatPropertyName.Create( "offset" );
-
- }
-
- public partial class ScanGradientMaterial:CustomMaterial
- {
- public static readonly CachedResource White = CustomMaterial.Cached(
- "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient White.material"
- );
-
- public readonly CustomMaterialProperty albedo;
- public readonly CustomMaterialProperty textureAlbedo;
- public readonly CustomMaterialProperty grow;
-
- public readonly CustomMaterialProperty offset;
-
- public ScanGradientMaterial()
- {
- Shader = ScanGradient.shader.Get();
-
- albedo = new CustomMaterialProperty( this, ScanGradient.albedo );
- textureAlbedo = new CustomMaterialProperty( this, ScanGradient.textureAlbedo );
- grow = new CustomMaterialProperty( this, ScanGradient.grow );
-
- offset = new CustomMaterialProperty( this, ScanGradient.offset );
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradientMaterial.cs b/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradientMaterial.cs
new file mode 100644
index 0000000..d0e4739
--- /dev/null
+++ b/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradientMaterial.cs
@@ -0,0 +1,78 @@
+using Godot;
+
+namespace Rokojori
+{
+ // Generated by ShaderClassGenerator
+
+ public class ScanGradientShader
+ {
+ public static readonly CachedResource shader = new CachedResource(
+ "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient.gdshader"
+ );
+
+ public static readonly ColorPropertyName albedo = ColorPropertyName.Create( "albedo" );
+ public static readonly FloatPropertyName grow = FloatPropertyName.Create( "grow" );
+ public static readonly FloatPropertyName range = FloatPropertyName.Create( "range" );
+ public static readonly FloatPropertyName offset = FloatPropertyName.Create( "offset" );
+ public static readonly FloatPropertyName rangeWobble = FloatPropertyName.Create( "rangeWobble" );
+ public static readonly FloatPropertyName rangeWobbleDuration = FloatPropertyName.Create( "rangeWobbleDuration" );
+ public static readonly FloatPropertyName offsetWobble = FloatPropertyName.Create( "offsetWobble" );
+ public static readonly FloatPropertyName offsetWobbleDuration = FloatPropertyName.Create( "offsetWobbleDuration" );
+ public static readonly FloatPropertyName noiseScale = FloatPropertyName.Create( "noiseScale" );
+ public static readonly Vector3PropertyName noiseOffset = Vector3PropertyName.Create( "noiseOffset" );
+ public static readonly FloatPropertyName noiseAmount = FloatPropertyName.Create( "noiseAmount" );
+ public static readonly FloatPropertyName rgbScale = FloatPropertyName.Create( "rgbScale" );
+ public static readonly FloatPropertyName alphaScale = FloatPropertyName.Create( "alphaScale" );
+ public static readonly Texture2DPropertyName textureAlbedo = Texture2DPropertyName.Create( "texture_albedo" );
+ public static readonly Texture2DPropertyName scanTexture = Texture2DPropertyName.Create( "scanTexture" );
+
+ }
+
+ [Tool]
+ [GlobalClass]
+ public partial class ScanGradientMaterial:CustomMaterial
+ {
+ public static readonly CachedResource White = CustomMaterial.Cached(
+ "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient White.material"
+ );
+
+ public readonly CustomMaterialProperty albedo;
+ public readonly CustomMaterialProperty grow;
+ public readonly CustomMaterialProperty range;
+ public readonly CustomMaterialProperty offset;
+ public readonly CustomMaterialProperty rangeWobble;
+ public readonly CustomMaterialProperty rangeWobbleDuration;
+ public readonly CustomMaterialProperty offsetWobble;
+ public readonly CustomMaterialProperty offsetWobbleDuration;
+ public readonly CustomMaterialProperty noiseScale;
+ public readonly CustomMaterialProperty noiseOffset;
+ public readonly CustomMaterialProperty noiseAmount;
+ public readonly CustomMaterialProperty rgbScale;
+ public readonly CustomMaterialProperty alphaScale;
+ public readonly CustomMaterialProperty textureAlbedo;
+ public readonly CustomMaterialProperty scanTexture;
+
+ public ScanGradientMaterial()
+ {
+ Shader = ScanGradientShader.shader.Get();
+
+ albedo = new CustomMaterialProperty( this, ScanGradientShader.albedo );
+ grow = new CustomMaterialProperty( this, ScanGradientShader.grow );
+ range = new CustomMaterialProperty( this, ScanGradientShader.range );
+ offset = new CustomMaterialProperty( this, ScanGradientShader.offset );
+ rangeWobble = new CustomMaterialProperty( this, ScanGradientShader.rangeWobble );
+ rangeWobbleDuration = new CustomMaterialProperty( this, ScanGradientShader.rangeWobbleDuration );
+ offsetWobble = new CustomMaterialProperty( this, ScanGradientShader.offsetWobble );
+ offsetWobbleDuration = new CustomMaterialProperty( this, ScanGradientShader.offsetWobbleDuration );
+ noiseScale = new CustomMaterialProperty( this, ScanGradientShader.noiseScale );
+ noiseOffset = new CustomMaterialProperty( this, ScanGradientShader.noiseOffset );
+ noiseAmount = new CustomMaterialProperty( this, ScanGradientShader.noiseAmount );
+ rgbScale = new CustomMaterialProperty( this, ScanGradientShader.rgbScale );
+ alphaScale = new CustomMaterialProperty( this, ScanGradientShader.alphaScale );
+ textureAlbedo = new CustomMaterialProperty( this, ScanGradientShader.textureAlbedo );
+ scanTexture = new CustomMaterialProperty( this, ScanGradientShader.scanTexture );
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlay.cs b/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlayMaterial.cs
similarity index 86%
rename from Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlay.cs
rename to Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlayMaterial.cs
index d24bd98..90001b4 100644
--- a/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlay.cs
+++ b/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlayMaterial.cs
@@ -2,7 +2,9 @@ using Godot;
namespace Rokojori
{
- public class TriPlanarOverlay
+ // Generated by ShaderClassGenerator
+
+ public class TriPlanarOverlayShader
{
public static readonly CachedResource shader = new CachedResource(
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlay.gdshader"
@@ -17,6 +19,8 @@ namespace Rokojori
}
+ [Tool]
+ [GlobalClass]
public partial class TriPlanarOverlayMaterial:CustomMaterial
{
public static readonly CachedResource BlueShield = CustomMaterial.Cached(
@@ -35,14 +39,14 @@ namespace Rokojori
public TriPlanarOverlayMaterial()
{
- Shader = TriPlanarOverlay.shader.Get();
+ Shader = TriPlanarOverlayShader.shader.Get();
- albedo = new CustomMaterialProperty( this, TriPlanarOverlay.albedo );
- uvBlendSharpness = new CustomMaterialProperty( this, TriPlanarOverlay.uvBlendSharpness );
- uvScale = new CustomMaterialProperty( this, TriPlanarOverlay.uvScale );
- uvOffset = new CustomMaterialProperty( this, TriPlanarOverlay.uvOffset );
- uvMovement = new CustomMaterialProperty( this, TriPlanarOverlay.uvMovement );
- textureAlbedo = new CustomMaterialProperty( this, TriPlanarOverlay.textureAlbedo );
+ albedo = new CustomMaterialProperty( this, TriPlanarOverlayShader.albedo );
+ uvBlendSharpness = new CustomMaterialProperty( this, TriPlanarOverlayShader.uvBlendSharpness );
+ uvScale = new CustomMaterialProperty( this, TriPlanarOverlayShader.uvScale );
+ uvOffset = new CustomMaterialProperty( this, TriPlanarOverlayShader.uvOffset );
+ uvMovement = new CustomMaterialProperty( this, TriPlanarOverlayShader.uvMovement );
+ textureAlbedo = new CustomMaterialProperty( this, TriPlanarOverlayShader.textureAlbedo );
}
}
diff --git a/Runtime/Shading/Shaders/ShaderClassGeneration.tscn b/Runtime/Shading/Shaders/ShaderClassGeneration.tscn
new file mode 100644
index 0000000..a215d60
--- /dev/null
+++ b/Runtime/Shading/Shaders/ShaderClassGeneration.tscn
@@ -0,0 +1,18 @@
+[gd_scene load_steps=11 format=3 uid="uid://jhj57wc3pi1t"]
+
+[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs" id="1_rl4bx"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/FancyOutline/FancyOutline.gdshader" id="2_0634p"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/FresnelOverlay/FresnelOverlay.gdshader" id="3_5fksk"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Outline/Outline.gdshader" id="4_jo18s"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Overlay/Overlay.gdshader" id="5_wf68q"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient.gdshader" id="6_84sko"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/TriPlanarOverlay/TriPlanarOverlay.gdshader" id="7_lj7wh"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.gdshader" id="8_e0ipl"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/UI/Shaders/NinePatch/UINinePatch.gdshader" id="9_7kuuo"]
+[ext_resource type="Shader" path="res://addons/rokojori_action_library/Runtime/UI/Shaders/RoundedRectangle/RoundedRectangle.gdshader" id="10_xogpf"]
+
+[node name="ShaderClassGeneration" type="Node"]
+
+[node name="CSShaderClassGenerator" type="Node" parent="."]
+script = ExtResource("1_rl4bx")
+shaders = [ExtResource("2_0634p"), ExtResource("3_5fksk"), ExtResource("4_jo18s"), ExtResource("5_wf68q"), ExtResource("6_84sko"), ExtResource("7_lj7wh"), ExtResource("8_e0ipl"), ExtResource("9_7kuuo"), ExtResource("10_xogpf")]
diff --git a/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.gdshader b/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.gdshader
index 1c16e92..cc30e30 100644
--- a/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.gdshader
+++ b/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.gdshader
@@ -23,29 +23,29 @@ varying vec2 textureUV;
varying vec4 animatedTint;
void vertex()
-{
+{
mat3 matrix = identity_m3();
-
+
float textureAspect = wipeTextureSize.x / wipeTextureSize.y;
float viewAspect = outputViewSize.x / outputViewSize.y;
float viewRatio = viewAspect / textureAspect;
-
+
matrix *= rotatePivotAspect_m3( uvRotation * DegreesToRadians , uvRotationCenter, textureAspect * viewRatio );
-
+
vec2 rotatedScaleCenter = applyMatrix_m3v2( rotatePivot_m3( uvRotation, vec2( 0.5,0.5)), uvScaleCenter );
matrix *= scalePivot_m3( uvScale * vec2( viewRatio,1), rotatedScaleCenter );
-
-
+
+
matrix *= translate_m3( applyMatrixBase_m3v2( matrix, -uvTranslation ) );
-
- vec2 uv = applyMatrix_m3v2( matrix, UV );
- textureUV = uv;
-
- animatedTint = wipeTextureTint;
+
+ vec2 uv = applyMatrix_m3v2( matrix, UV );
+ textureUV = uv;
+
+ animatedTint = wipeTextureTint;
animatedTint.a *= wipeState;
}
void fragment()
-{
+{
COLOR = texture( wipeTexture, textureUV ) * animatedTint;
}
diff --git a/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.cs b/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipeMaterial.cs
similarity index 85%
rename from Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.cs
rename to Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipeMaterial.cs
index 93239d7..a5f1483 100644
--- a/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.cs
+++ b/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipeMaterial.cs
@@ -2,7 +2,9 @@ using Godot;
namespace Rokojori
{
- public class FadeWipe
+ // Generated by ShaderClassGenerator
+
+ public class FadeWipeShader
{
public static readonly CachedResource shader = new CachedResource(
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Wipes/FadeWipe/FadeWipe.gdshader"
@@ -21,6 +23,8 @@ namespace Rokojori
}
+ [Tool]
+ [GlobalClass]
public partial class FadeWipeMaterial:CustomMaterial
{
@@ -38,18 +42,18 @@ namespace Rokojori
public FadeWipeMaterial()
{
- Shader = FadeWipe.shader.Get();
+ Shader = FadeWipeShader.shader.Get();
- wipeState = new CustomMaterialProperty( this, FadeWipe.wipeState );
- outputViewSize = new CustomMaterialProperty( this, FadeWipe.outputViewSize );
- wipeTextureSize = new CustomMaterialProperty( this, FadeWipe.wipeTextureSize );
- wipeTextureTint = new CustomMaterialProperty( this, FadeWipe.wipeTextureTint );
- uvRotation = new CustomMaterialProperty( this, FadeWipe.uvRotation );
- uvRotationCenter = new CustomMaterialProperty