OLD_STEP_LIST_EDITOR
Documentation for the Unity C# Library
Loading...
Searching...
No Matches
ErrorMessagePopup.cs
Go to the documentation of this file.
1
using
System;
2
using
TMPro;
3
using
UnityEngine;
4
using
UnityEngine.UI;
5
6
public
class
ErrorMessagePopup
: MonoBehaviour
7
{
8
[SerializeField]
private
Button
_closeButton
;
9
[SerializeField]
private
Transform
_root
;
10
[SerializeField]
private
TextMeshProUGUI
_errorMessageText
;
11
12
public
event
Action
CloseButtonClicked
;
13
14
private
void
Start
()
15
{
16
_root
.gameObject.SetActive(
false
);
17
}
18
19
private
void
OnEnable
()
20
{
21
_closeButton
.onClick.AddListener(
OnCloseButtonClicked
);
22
}
23
24
private
void
OnDisable
()
25
{
26
_closeButton
.onClick.RemoveListener(
OnCloseButtonClicked
);
27
}
28
29
private
void
OnCloseButtonClicked
()
30
{
31
_root
.gameObject.SetActive(
false
);
32
33
CloseButtonClicked
?.Invoke();
34
}
35
36
public
void
ShowErrorMessage
(
string
text)
37
{
38
_root
.gameObject.SetActive(
true
);
39
40
_errorMessageText.text = text;
41
}
42
}
ErrorMessagePopup
Definition
ErrorMessagePopup.cs:7
ErrorMessagePopup.OnDisable
void OnDisable()
Definition
ErrorMessagePopup.cs:33
ErrorMessagePopup.OnCloseButtonClicked
void OnCloseButtonClicked()
Definition
ErrorMessagePopup.cs:38
ErrorMessagePopup.ShowErrorMessage
void ShowErrorMessage(string text)
Definition
ErrorMessagePopup.cs:45
ErrorMessagePopup._closeButton
Button _closeButton
[SerializeField]
Definition
ErrorMessagePopup.cs:11
ErrorMessagePopup.Start
void Start()
Definition
ErrorMessagePopup.cs:23
ErrorMessagePopup.OnEnable
void OnEnable()
Definition
ErrorMessagePopup.cs:28
ErrorMessagePopup._errorMessageText
TextMeshProUGUI _errorMessageText
[SerializeField]
Definition
ErrorMessagePopup.cs:19
ErrorMessagePopup.CloseButtonClicked
Action CloseButtonClicked
Definition
ErrorMessagePopup.cs:21
ErrorMessagePopup._root
Transform _root
[SerializeField]
Definition
ErrorMessagePopup.cs:15
com.pixovr.eventunitysdk
Runtime
Sdk
Scripts
Utils
ErrorMessagePopup.cs
Generated
Wed Oct 9 2024 19:24:03
by Doxygen version
1.10.0