4 changed files with 11 additions and 114 deletions
@ -1,57 +0,0 @@ |
|||||||
/** |
|
||||||
* This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus). |
|
||||||
* It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE) |
|
||||||
*/ |
|
||||||
|
|
||||||
using UnityEditor; |
|
||||||
using UnityEngine; |
|
||||||
using System.Collections; |
|
||||||
using Rotorz.ReorderableList; |
|
||||||
using System.Collections.Generic; |
|
||||||
|
|
||||||
namespace Fungus |
|
||||||
{ |
|
||||||
|
|
||||||
[CustomEditor (typeof(DialogInput))] |
|
||||||
public class DialogInputEditor : Editor |
|
||||||
{ |
|
||||||
protected SerializedProperty clickModeProp; |
|
||||||
protected SerializedProperty nextClickDelayProp; |
|
||||||
protected SerializedProperty keyPressModeProp; |
|
||||||
protected SerializedProperty shiftKeyEnabledProp; |
|
||||||
protected SerializedProperty ignoreMenuClicksProp; |
|
||||||
protected SerializedProperty keyListProp; |
|
||||||
|
|
||||||
protected virtual void OnEnable() |
|
||||||
{ |
|
||||||
clickModeProp = serializedObject.FindProperty ("clickMode"); |
|
||||||
nextClickDelayProp = serializedObject.FindProperty ("nextClickDelay"); |
|
||||||
keyPressModeProp = serializedObject.FindProperty ("keyPressMode"); |
|
||||||
shiftKeyEnabledProp = serializedObject.FindProperty ("shiftKeyEnabled"); |
|
||||||
ignoreMenuClicksProp = serializedObject.FindProperty ("ignoreMenuClicks"); |
|
||||||
keyListProp = serializedObject.FindProperty ("keyList"); |
|
||||||
} |
|
||||||
|
|
||||||
public override void OnInspectorGUI() |
|
||||||
{ |
|
||||||
serializedObject.Update(); |
|
||||||
|
|
||||||
DialogInput t = target as DialogInput; |
|
||||||
|
|
||||||
EditorGUILayout.PropertyField(clickModeProp); |
|
||||||
EditorGUILayout.PropertyField(nextClickDelayProp); |
|
||||||
EditorGUILayout.PropertyField(ignoreMenuClicksProp); |
|
||||||
|
|
||||||
EditorGUILayout.PropertyField(keyPressModeProp); |
|
||||||
if (t.keyPressMode == DialogInput.KeyPressMode.KeyPressed) |
|
||||||
{ |
|
||||||
EditorGUILayout.PropertyField(shiftKeyEnabledProp); |
|
||||||
ReorderableListGUI.Title(new GUIContent("Key List", "Keycodes to check for user input")); |
|
||||||
ReorderableListGUI.ListField(keyListProp); |
|
||||||
} |
|
||||||
|
|
||||||
serializedObject.ApplyModifiedProperties(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,12 +0,0 @@ |
|||||||
fileFormatVersion: 2 |
|
||||||
guid: 2a336080b178f4c239754dd614d6d6b4 |
|
||||||
timeCreated: 1440156410 |
|
||||||
licenseType: Free |
|
||||||
MonoImporter: |
|
||||||
serializedVersion: 2 |
|
||||||
defaultReferences: [] |
|
||||||
executionOrder: 0 |
|
||||||
icon: {instanceID: 0} |
|
||||||
userData: |
|
||||||
assetBundleName: |
|
||||||
assetBundleVariant: |
|
Loading…
Reference in new issue