Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
c30bb7b85This file is pinned to the selected release. Download the original to open it in your design tool.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using Leap.Unity;
namespace Leap.Unity.UI {
[CustomEditor(typeof(TabBarController))]
public class TabBarControllerEditor : CustomEditorBase<TabBarController> {
protected override void OnEnable() {
base.OnEnable();
specifyCustomDecorator("_localOffsetFromTab", drawSetLocalOffsetButton);
}
private void drawSetLocalOffsetButton(SerializedProperty property) {
if (GUILayout.Button("Set Local Offset to Local Position")) {
target.SetLocalOffsetToCurrentPosition();
}
if (GUILayout.Button("Set Local Position to Local Offset")) {
target.SetLocalPositionToLocalOffset();
}
}
}
}