Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ErrorDialog.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
2
class
SCR_ErrorDialog
:
ScriptedWidgetComponent
3
{
4
// Widget Names
5
const
string
WIDGET_TEXT_DETAIL =
"TxtDetail"
;
6
const
string
WIDGET_IMG_LINE =
"ImgLine"
;
7
8
// Widgets
9
protected
TextWidget
m_wTxtDetail
;
10
protected
ImageWidget
m_wImgLine
;
11
12
protected
string
m_sErrorMessage
;
13
14
//------------------------------------------------------------------------------------------------
15
// Dialog override functions
16
//------------------------------------------------------------------------------------------------
17
18
//------------------------------------------------------------------------------------------------
19
override
void
HandlerAttached
(
Widget
w)
20
{
21
super.HandlerAttached(w);
22
23
// Get widgets
24
m_wTxtDetail
=
TextWidget
.Cast(w.FindAnyWidget(WIDGET_TEXT_DETAIL));
25
m_wImgLine
=
ImageWidget
.Cast(w.FindAnyWidget(WIDGET_IMG_LINE));
26
27
if
(
m_wTxtDetail
)
28
m_wTxtDetail
.SetVisible(
false
);
29
30
if
(
m_wImgLine
)
31
m_wImgLine
.SetVisible(
false
);
32
}
33
34
//------------------------------------------------------------------------------------------------
35
// Public API
36
//------------------------------------------------------------------------------------------------
37
38
//------------------------------------------------------------------------------------------------
39
void
SetErrorMessage
(
string
message)
40
{
41
m_sErrorMessage
= message;
42
}
43
44
//------------------------------------------------------------------------------------------------
45
string
GetErrorMessage
()
46
{
47
return
m_sErrorMessage
;
48
}
49
50
//------------------------------------------------------------------------------------------------
51
void
SetErrorDetail
(
string
strDetail)
52
{
53
// Setup text
54
if
(
m_wTxtDetail
)
55
{
56
m_wTxtDetail
.SetText(strDetail);
57
m_wTxtDetail
.SetVisible(
true
);
58
}
59
60
// Show line
61
if
(
m_wImgLine
)
62
m_wImgLine
.SetVisible(
true
);
63
}
64
65
//------------------------------------------------------------------------------------------------
66
static
SCR_ErrorDialog
FindErrorComponent
(notnull
Widget
w)
67
{
68
return
SCR_ErrorDialog
.Cast(w.FindHandler(
SCR_ErrorDialog
));
69
}
70
};
71
72
73
ImageWidget
Definition
ImageWidget.c:13
SCR_ErrorDialog
Definition
SCR_ErrorDialog.c:3
SCR_ErrorDialog::m_wTxtDetail
TextWidget m_wTxtDetail
Definition
SCR_ErrorDialog.c:9
SCR_ErrorDialog::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_ErrorDialog.c:19
SCR_ErrorDialog::GetErrorMessage
string GetErrorMessage()
Definition
SCR_ErrorDialog.c:45
SCR_ErrorDialog::SetErrorMessage
void SetErrorMessage(string message)
Definition
SCR_ErrorDialog.c:39
SCR_ErrorDialog::FindErrorComponent
static SCR_ErrorDialog FindErrorComponent(notnull Widget w)
Definition
SCR_ErrorDialog.c:66
SCR_ErrorDialog::m_sErrorMessage
string m_sErrorMessage
Definition
SCR_ErrorDialog.c:12
SCR_ErrorDialog::SetErrorDetail
void SetErrorDetail(string strDetail)
Definition
SCR_ErrorDialog.c:51
SCR_ErrorDialog::m_wImgLine
ImageWidget m_wImgLine
Definition
SCR_ErrorDialog.c:10
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
TextWidget
Definition
TextWidget.c:16
Widget
Definition
Widget.c:13
scripts
Game
UI
Menu
Dialogs
SCR_ErrorDialog.c
Generated by
1.17.0