AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
ProgressExampleLaunchButton.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
6 using UnityEngine;
7 
8 namespace HoloToolkit.Examples.UX
9 {
10  public class ProgressExampleLaunchButton : MonoBehaviour
11  {
12  [Header("Which Indicator style is desired?")]
13  [SerializeField]
14  private IndicatorStyleEnum indicatorStyle;
15 
16  [Header("Which Progress style is desired?")]
17  [SerializeField]
18  private ProgressStyleEnum progressStyle;
19 
24  public IndicatorStyleEnum IndicatorStyle
25  {
26  get
27  {
28  return indicatorStyle;
29  }
30 
31  set
32  {
33  indicatorStyle = value;
34  }
35  }
36 
40  public ProgressStyleEnum ProgressStyle
41  {
42  get
43  {
44  return progressStyle;
45  }
46 
47  set
48  {
49  progressStyle = value;
50  }
51  }
52 
53  private Button button;
54 
55  private void Start()
56  {
57  button = GetComponent<Button>();
58  button.OnButtonClicked += OnButtonClicked;
59  }
60 
61  private void OnButtonClicked(GameObject obj)
62  {
63  ProgressExamples examples = Object.FindObjectOfType<ProgressExamples>();
64  examples.LaunchProgress(indicatorStyle, progressStyle);
65  }
66  }
67 }
void LaunchProgress(IndicatorStyleEnum indicatorStyle, ProgressStyleEnum progressStyle)
IndicatorStyleEnum
Enum describing the style of the Indicator portion
Action< GameObject > OnButtonClicked
Event fired when click interaction received.
Definition: Button.cs:76