Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_UIDescription.c
Go to the documentation of this file.
1
6{
7 [Attribute(uiwidget: UIWidgets.EditBoxMultiline)]
9
10 //------------------------------------------------------------------------------------------------
17
18 //------------------------------------------------------------------------------------------------
23 {
24 Description = description;
25 }
26
27 //------------------------------------------------------------------------------------------------
35
36 //------------------------------------------------------------------------------------------------
40 {
41 return !GetDescription().IsEmpty();
42 }
43
44//---- REFACTOR NOTE START: This code will need to be refactored as current implementation is not conforming to the standards ----
45// This class is meant to hold data, not manipulate widgets! Such methods should be in SCR_WidgetTools or SCR_WidgetHelper. In this case, I would expect whatever component is handling the layout to make sure the text widget exists, so this method is not needed
46
47 //------------------------------------------------------------------------------------------------
54 {
55 if (!textWidget)
56 return false;
57
58 textWidget.SetText(GetDescription());
59 return true;
60 }
61
62//---- REFACTOR NOTE END ----
63
64 //------------------------------------------------------------------------------------------------
68 override void Log(string prefix = string.Empty, LogLevel logLevel = LogLevel.VERBOSE)
69 {
70 Print(string.Format(prefix + "%1: \"%2\", \"%3\"", Type(), Name, Description), logLevel);
71 }
72
73 //------------------------------------------------------------------------------------------------
74 //--- Protected, to be overridden and/or made public by inherited classes
75 override protected void CopyFrom(SCR_UIName source)
76 {
77 SCR_UIDescription sourceDescription = SCR_UIDescription.Cast(source);
78 if (sourceDescription)
79 {
80 Description = sourceDescription.Description;
81 }
82
83 super.CopyFrom(source);
84 }
85}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_PlayerCommandingConfigActionPair Managed SCR_BaseContainerLocalizedTitleField("m_sCommandName")
int Type
LocalizedString GetDescription()
override void Log(string prefix=string.Empty, LogLevel logLevel=LogLevel.VERBOSE)
bool SetDescriptionTo(TextWidget textWidget)
LocalizedString GetUnformattedDescription()
LocalizedString Description
void CopyFrom(SCR_UIName source)
void SetDescription(LocalizedString description)
LocalizedString Name
Definition SCR_UIName.c:8
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute