Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ErrorDialog.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
3{
4 // Widget Names
5 const string WIDGET_TEXT_DETAIL = "TxtDetail";
6 const string WIDGET_IMG_LINE = "ImgLine";
7
8 // Widgets
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 //------------------------------------------------------------------------------------------------
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 //------------------------------------------------------------------------------------------------
67 {
68 return SCR_ErrorDialog.Cast(w.FindHandler(SCR_ErrorDialog));
69 }
70};
71
72
73
TextWidget m_wTxtDetail
override void HandlerAttached(Widget w)
string GetErrorMessage()
void SetErrorMessage(string message)
static SCR_ErrorDialog FindErrorComponent(notnull Widget w)
void SetErrorDetail(string strDetail)
ImageWidget m_wImgLine