-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve button and toggle behaviour (#137)
- Loading branch information
Showing
13 changed files
with
138 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Reality Collective. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using RealityToolkit.Input.InteractionBehaviours; | ||
using UnityEditor; | ||
using UnityEditor.UIElements; | ||
using UnityEngine.UIElements; | ||
|
||
namespace RealityToolkit.Editor.Inspectors | ||
{ | ||
[CustomEditor(typeof(ButtonBehaviour), true)] | ||
public class ButtonBehaviourInspector : BaseInteractionBehaviourInspector | ||
{ | ||
private const string raiseOnInputDown = "raiseOnInputDown"; | ||
private const string click = "click"; | ||
|
||
public override VisualElement CreateInspectorGUI() | ||
{ | ||
var inspector = base.CreateInspectorGUI(); | ||
|
||
inspector.Add(new PropertyField(serializedObject.FindProperty(raiseOnInputDown))); | ||
inspector.Add(new PropertyField(serializedObject.FindProperty(click))); | ||
|
||
return inspector; | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...tables/InteractableActivationMode.cs.meta → ...spectors/ButtonBehaviourInspector.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Reality Collective. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using RealityToolkit.Input.InteractionBehaviours; | ||
using UnityEditor; | ||
using UnityEditor.UIElements; | ||
using UnityEngine.UIElements; | ||
|
||
namespace RealityToolkit.Editor.Inspectors | ||
{ | ||
[CustomEditor(typeof(ToggleBehaviour), true)] | ||
public class ToggleBehaviourInspector : BaseInteractionBehaviourInspector | ||
{ | ||
private const string isOn = "isOn"; | ||
private const string raiseOnInputDown = "raiseOnInputDown"; | ||
private const string valueChanged = "valueChanged"; | ||
|
||
public override VisualElement CreateInspectorGUI() | ||
{ | ||
var inspector = base.CreateInspectorGUI(); | ||
|
||
inspector.Add(new PropertyField(serializedObject.FindProperty(isOn))); | ||
inspector.Add(new PropertyField(serializedObject.FindProperty(raiseOnInputDown))); | ||
inspector.Add(new PropertyField(serializedObject.FindProperty(valueChanged))); | ||
|
||
return inspector; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.