public static void MenuEvents(Event @event)
 {
     if (@event.button == 0)
     {
         _drawing = true;
         PointBuffer.AddLast(new Point(@event.mousePosition, _strokeId));
         PDollarEditorWindow.Repaint();
     }
 }
        public static void Load()
        {
            var path = EditorUtility.OpenFilePanel("Load Gesture", Application.dataPath, "asset");

            path = TextUtil.GetRelativePath(path);
            var gesture = AssetDatabase.LoadAssetAtPath <Gesture>(path);

            DumpPointsToBuffer(gesture.Points);
            PDollarEditorWindow.Repaint();
        }
 private static void Init()
 {
     _editor = GetWindow <PDollarEditorWindow>(title: "Gesture Creator", focus: true);
     _editor.wantsMouseMove = true;
     _editor.Show();
 }
Example #4
0
 public static void Hide()
 {
     _visible = false;
     PDollarEditorWindow.Repaint();
 }
Example #5
0
 public static void Show(Vector2 position)
 {
     Position = position;
     _visible = true;
     PDollarEditorWindow.Repaint();
 }