Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_UIName.c
Go to the documentation of this file.
1
6{
7 [Attribute(uiwidget: UIWidgets.LocaleEditBox)]
9
10 //------------------------------------------------------------------------------------------------
14 {
15 return Name;
16 }
17
18 //------------------------------------------------------------------------------------------------
23 {
24 Name = name;
25 }
26
27 //------------------------------------------------------------------------------------------------
32 {
33 return Name;
34 }
35
36 //------------------------------------------------------------------------------------------------
39 bool HasName()
40 {
41 return !GetName().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 //------------------------------------------------------------------------------------------------
53 bool SetNameTo(TextWidget textWidget)
54 {
55 if (!textWidget)
56 return false;
57
58 textWidget.SetText(GetName());
59 return true;
60 }
61
62//---- REFACTOR NOTE END ----
63
64 //------------------------------------------------------------------------------------------------
68 void Log(string prefix = string.Empty, LogLevel logLevel = LogLevel.VERBOSE)
69 {
70 Print(string.Format(prefix + "%1: \"%2\"", Type(), Name), logLevel);
71 }
72
73 //--- Protected, to be overridden and/or made public by inherited classes
74 protected void CopyFrom(SCR_UIName source)
75 {
76 if (source)
77 Name = source.Name;
78 }
79}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_PlayerCommandingConfigActionPair Managed SCR_BaseContainerLocalizedTitleField("m_sCommandName")
int Type
LocalizedString Name
Definition SCR_UIName.c:8
bool SetNameTo(TextWidget textWidget)
Definition SCR_UIName.c:53
bool HasName()
Definition SCR_UIName.c:39
void Log(string prefix=string.Empty, LogLevel logLevel=LogLevel.VERBOSE)
Definition SCR_UIName.c:68
LocalizedString GetUnformattedName()
Definition SCR_UIName.c:13
LocalizedString GetName()
Definition SCR_UIName.c:31
void SetName(LocalizedString name)
Definition SCR_UIName.c:22
void CopyFrom(SCR_UIName source)
Definition SCR_UIName.c:74
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