Skip to content

Fixed issue 188 #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Config.json.enc
Binary file not shown.
49 changes: 25 additions & 24 deletions Prefabs/TouchManager.prefab
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
serializedVersion: 5
m_Component:
- 4: {fileID: 456440}
- 114: {fileID: 11447296}
- 114: {fileID: 11482954}
- 114: {fileID: 11437114}
- 114: {fileID: 11479124}
- 114: {fileID: 11457544}
- 114: {fileID: 11469728}
- 114: {fileID: 11459306}
- 114: {fileID: 11461230}
- 114: {fileID: 11479102}
- 114: {fileID: 11417566}
- 114: {fileID: 11495534}
- component: {fileID: 456440}
- component: {fileID: 11447296}
- component: {fileID: 11482954}
- component: {fileID: 11437114}
- component: {fileID: 11479124}
- component: {fileID: 11457544}
- component: {fileID: 11469728}
- component: {fileID: 11459306}
- component: {fileID: 11461230}
- component: {fileID: 11479102}
- component: {fileID: 11417566}
- component: {fileID: 11495534}
m_Layer: 0
m_Name: TouchManager
m_TagString: Untagged
Expand All @@ -31,10 +31,10 @@ GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
serializedVersion: 5
m_Component:
- 4: {fileID: 438902}
- 114: {fileID: 11412284}
- component: {fileID: 438902}
- component: {fileID: 11412284}
m_Layer: 0
m_Name: Inputs
m_TagString: Untagged
Expand All @@ -47,11 +47,11 @@ GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
serializedVersion: 5
m_Component:
- 224: {fileID: 22440388}
- 114: {fileID: 11455964}
- 223: {fileID: 22308338}
- component: {fileID: 22440388}
- component: {fileID: 11455964}
- component: {fileID: 22308338}
m_Layer: 0
m_Name: Touch Visualizer Watson
m_TagString: Untagged
Expand All @@ -68,10 +68,10 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 456440}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &456440
Transform:
m_ObjectHideFlags: 1
Expand All @@ -81,12 +81,12 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 438902}
- {fileID: 22440388}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &11412284
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -351,7 +351,8 @@ MonoBehaviour:
useSendMessage: 0
sendMessageEvents: 60
sendMessageTarget: {fileID: 0}
layers: []
layers:
- {fileID: 0}
--- !u!114 &11495534
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -403,10 +404,10 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 456440}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down
8 changes: 7 additions & 1 deletion ThirdParty/TouchScript/Editor/Gestures/GestureEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ protected virtual void drawLimitTouches()
minTouchesFloat = 0;
maxTouchesFloat = 10;
}
else
{
minTouchesFloat = (float) minTouches.intValue;
maxTouchesFloat = (float) maxTouches.intValue;
}
//or this values doesn't change from script properly
EditorGUI.indentLevel++;
EditorGUILayout.LabelField("Min: " + (int)minTouchesFloat + ", Max: " + (int)maxTouchesFloat);
EditorGUILayout.MinMaxSlider(ref minTouchesFloat, ref maxTouchesFloat, 0, 10);
Expand Down Expand Up @@ -338,4 +344,4 @@ private void removeFromArray(SerializedProperty array, int index)

#endregion
}
}
}
9 changes: 9 additions & 0 deletions ThirdParty/TouchScript/Modules.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions ThirdParty/TouchScript/Modules/TUIO.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions ThirdParty/TouchScript/Modules/TUIO/Editor/InputSources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
using TouchScript.InputSources;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;

namespace TouchScript.Editor.InputSources
{
[CustomEditor(typeof(TuioInput), true)]
internal sealed class TuioInputEditor : InputSourceEditor
{
private static readonly GUIContent INPUT_TYPES = new GUIContent("Input Types", "Supported input types.");
private static readonly GUIContent OBJECT_MAPPINGS = new GUIContent("TUIO Object Mappings", "TUIO Object to Tag list.");

private TuioInput instance;
private SerializedProperty supportedInputs, tuioObjectMappings;
private SerializedProperty cursorTags, blobTags, objectTags;
private SerializedProperty tuioPort;
private ReorderableList list;

protected override void OnEnable()
{
base.OnEnable();

instance = target as TuioInput;
supportedInputs = serializedObject.FindProperty("supportedInputs");
tuioObjectMappings = serializedObject.FindProperty("tuioObjectMappings");
cursorTags = serializedObject.FindProperty("cursorTags");
blobTags = serializedObject.FindProperty("blobTags");
objectTags = serializedObject.FindProperty("objectTags");
tuioPort = serializedObject.FindProperty("tuioPort");

list = new ReorderableList(serializedObject, tuioObjectMappings, false, true, true, true);
list.drawHeaderCallback += rect => GUI.Label(rect, OBJECT_MAPPINGS);
list.drawElementCallback += (rect, index, active, focused) =>
{
EditorGUI.BeginChangeCheck();
var element = instance.TuioObjectMappings[index];
rect.height = 16;
rect.y += 2;
var r = rect;
r.width = 20;
GUI.Label(r, "id:");
r.x += r.width;
r.width = 50;
var newId = EditorGUI.IntField(r, element.Id);
r.x += r.width;
r.width = 40;
GUI.Label(r, " tag:");
r.x += r.width;
r.width = rect.width - r.x + rect.x;
var newTag = GUI.TextField(r, element.Tag);

if (EditorGUI.EndChangeCheck())
{
element.Id = newId;
element.Tag = newTag;
EditorUtility.SetDirty(target);
}
};
}

public override void OnInspectorGUI()
{
serializedObject.UpdateIfDirtyOrScript();

EditorGUILayout.PropertyField(tuioPort);

var r = EditorGUILayout.GetControlRect(true, 16f, EditorStyles.layerMaskField);
var label = EditorGUI.BeginProperty(r, INPUT_TYPES, supportedInputs);
EditorGUI.BeginChangeCheck();
r = EditorGUI.PrefixLabel(r, label);
var sMask = (TuioInput.InputType)EditorGUI.EnumMaskField(r, instance.SupportedInputs);
if (EditorGUI.EndChangeCheck())
{
instance.SupportedInputs = sMask;
EditorUtility.SetDirty(instance);
}
EditorGUI.EndProperty();

if ((sMask & TuioInput.InputType.Objects) != 0)
{
list.DoLayoutList();
}

serializedObject.ApplyModifiedProperties();
base.OnInspectorGUI();
}

protected override void drawAdvanced()
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(cursorTags);
EditorGUILayout.PropertyField(blobTags);
EditorGUILayout.PropertyField(objectTags);
EditorGUI.indentLevel--;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions ThirdParty/TouchScript/Modules/TUIO/Libraries.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
78 changes: 78 additions & 0 deletions ThirdParty/TouchScript/Modules/TUIO/Libraries/OSCsharp.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Loading