Tanoda
pb_ScaleToolButton.cs
Go to the documentation of this file.
1using UnityEngine;
2using UnityEngine.UI;
3using System.Collections.Generic;
4
5namespace GILES
6{
8 {
9 public override string tooltip { get { return Macro.T("BTN_SCALE"); } }
10
11 protected override void Start()
12 {
13 base.Start();
14
15 if(pb_SelectionHandle.instance.onHandleTypeChanged != null)
16 pb_SelectionHandle.instance.onHandleTypeChanged += OnHandleChange;
17 else
18 pb_SelectionHandle.instance.onHandleTypeChanged = OnHandleChange;
19
20 OnHandleChange();
21 }
22
23 public void DoSetHandle()
24 {
25 pb_SelectionHandle.instance.SetTool(Tool.Scale);
26 }
27
28 private void OnHandleChange()
29 {
30 interactable = !pb_SelectionHandle.instance.GetIsHidden() && pb_SelectionHandle.instance.GetTool() != Tool.Scale;
31 }
32 }
33}
Definition: Macro.cs:12
static string T(string key)
Definition: Macro.cs:19
Tool
Definition: pb_Enum.cs:24