8 [
Attribute(defvalue:
"1",
desc:
"True to get the value from server.")]
9 private bool m_bIsServer;
17 [
Attribute(
desc:
"Holds a list of dynamic descriptions from attributes. When hovered and when changing the attribute the system will loop through all entries and display the dynamic description for the first valid. If none are valid than the default description is shown")]
70 dynamicDescriptionArray.Insert(description);
73 return dynamicDescriptionArray.Count();
127 if (var.Type() ==
m_Var.Type())
135 PrintFormat(
"Trying to set attribute var to type '%1' but is type '%2'", var.Type().ToString(),
m_Var.Type().ToString(),
LogLevel.WARNING);
309 if (!
m_Var && createWhenNull)
458 int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
479class SCR_BaseEditorAttributeEntry
500class SCR_BaseEditorAttributeEntryUIInfo : SCR_BaseEditorAttributeEntry
503 private int m_iValue;
518 void SCR_BaseEditorAttributeEntryUIInfo(
SCR_UIInfo info,
int value = 0)
564 value =
Math.Round(value * coef);
565 string valueText = value.ToString();
568 for (
int i = 0, count =
m_sDecimals - valueText.Length() + 1; i < count; i++)
570 valueText =
"0" + valueText;
572 int length = valueText.Length();
591 string sliderValueFormating;
592 float min, max, step, decimals;
594 sliderValues.
GetSliderValues(sliderValueFormating, min, max, step, decimals);
630 protected array<ref SCR_EditorAttributeFloatStringValueHolder>
m_aValues;
694 protected array<ref LocalizedString>
m_aValues;
783 void SCR_EditorAttributePresetEntry(
int buttonsOnRow,
bool hasRandomizeButton,
ResourceName iconOfRandomizeButton =
string.Empty,
bool hasIcon =
false,
bool hasButtonDescription =
false,
string buttonDescription =
string.Empty,
int buttonHeight = -1)
796 void GetPresetValues(out
int buttonsOnRow, out
bool hasRandomizeButton, out
ResourceName iconOfRandomizeButton, out
bool hasIcon, out
bool hasButtonDescription, out
string buttonDescription, out
int buttonHeight)
822 void SCR_EditorAttributePresetMultiSelectEntry(
int buttonsOnRow,
bool hasRandomizeButton,
ResourceName iconOfRandomizeButton =
string.Empty,
bool hasIcon =
false,
bool hasButtonDescription =
false,
string buttonDescription =
string.Empty,
int buttonHeight = -1,
int customFlags =
false)
824 SCR_EditorAttributePresetEntry(buttonsOnRow, hasRandomizeButton, iconOfRandomizeButton, hasIcon, hasButtonDescription, buttonDescription, buttonHeight);
878 override bool _WB_GetCustomTitle(
BaseContainer source, out
string title)
880 title = source.GetClassName();
881 title.Replace(
"SCR_",
"");
882 title.Replace(
"EditorAttribute",
"");
885 source.Get(
"m_bIsServer", isServer);
ArmaReforgerScripted GetGame()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
string GetEntry(int index)
SCR_BaseEditorAttributeEntryUIInfo m_fMin
void SCR_EditorAttributeEntryStringArray(array< ref LocalizedString > values)
void SCR_BaseEditorAttributeDefaultFloatValue(float floatValue)
void SCR_BaseEditorAttributeEntryText(string text)
void SCR_EditorAttributeEntryInt(int value)
void SCR_EditorAttributePresetMultiSelectEntry(int buttonsOnRow, bool hasRandomizeButton, ResourceName iconOfRandomizeButton=string.Empty, bool hasIcon=false, bool hasButtonDescription=false, string buttonDescription=string.Empty, int buttonHeight=-1, int customFlags=false)
SCR_EditorAttributePresetEntry m_bCustomFlags
void GetSliderMinMaxStep(out float min, out float max, out float step)
void SCR_BaseEditorAttributeFloatStringValues(array< ref SCR_EditorAttributeFloatStringValueHolder > values)
float GetEntryFloatValue(int index)
void SetSliderLabel(string label)
SCR_EditorAttributeEntryOverride m_fDefaultFloatValue
string GetSliderValueFormating()
Get the secondary Label value.
bool GetUsesCustomFlags()
float GetDefaultFloatValue()
SCR_EditorAttributeFloatStringValueHolder GetValuesEntry(int index)
void SCR_BaseEditorAttributeEntrySlider(SCR_EditorAttributeBaseValues sliderValues)
string m_sSliderValueFormating
SCR_BaseEditorAttributeEntryTimeSlider m_aValues
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
override SCR_UIInfo GetInfo()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void GetTimeSliderValues(out ETimeFormatParam hideIfZero, out bool alwaysHideSeconds)
ETimeFormatParam m_eHideIfZero
void SCR_BaseEditorAttributeEntryTimeSlider(ETimeFormatParam hideIfZero, bool alwaysHideSeconds)
bool m_bAlwaysHideSeconds
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
void PreviewVariable(bool setPreview, SCR_AttributesManagerEditorComponent manager)
void SetInitCalled(bool initCalled)
bool BoolAllowDuplicate()
sealed void StartEditing(SCR_BaseEditorAttributeVar var, SSnapshot snapshot)
Initialise editing variables.
sealed bool GetConflictingAttributeWasReset()
bool m_bConflictingAttributeWasReset
ref ScriptInvoker Event_OnExternalChange
SCR_BaseEditorAttributeVar CreateDefaultVariable()
Create a default bool (false) variable.
ref ScriptInvoker Event_OnToggleButtonSelected
sealed void StopEditing()
Reset editing variables.
void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
void SetHasConflictingValues(bool hasConflictingValues)
bool GetHasConflictingValues()
sealed SSnapshot GetSnapshot()
sealed void TelegraphChange(bool isReset)
ref SCR_BaseEditorAttributeVar m_CopyVar
bool m_bHasConflictingValues
ref SCR_BaseEditorAttributeVar m_Var
sealed void SetAsSubAttribute()
sealed bool SetVariable(SCR_BaseEditorAttributeVar var)
sealed ScriptInvoker GetOnVarChanged()
sealed SCR_BaseEditorAttributeVar GetVariable(bool createWhenNull=false)
int GetDynamicDescriptionArray(notnull out array< SCR_BaseAttributeDynamicDescription > dynamicDescriptionArray)
ref ScriptInvoker Event_OnVarChanged
SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
void Initialize()
Method for initialization of base editor attribute.
void UpdateInterlinkedVariables(SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, bool isInit=false)
sealed void CreateCopyVariable()
ref array< ref SCR_BaseAttributeDynamicDescription > m_aAttributeDynamicDescriptions
sealed ScriptInvoker GetOnToggleEnable()
sealed SCR_BaseEditorAttributeVar GetVariableOrCopy()
sealed void ToggleSelected(bool selected, int index)
sealed void ClearCopyVar()
Set copy var null.
sealed ScriptInvoker GetOnExternalnChange()
sealed void ClearVar()
Set var null.
ref ScriptInvoker Event_OnToggleEnable
ref SCR_EditorAttributeUIInfo m_UIInfo
ref ScriptInvoker Event_OnSetAsSubAttribute
sealed void SetConflictingAttributeWasReset(bool wasReset)
sealed ScriptInvoker GetOnToggleButtonSelected()
int GetEntries(notnull array< ref SCR_BaseEditorAttributeEntry > outEntries)
sealed void Enable(bool enabled)
void SetIsOverridingValues(bool isOverridingValues)
ResourceName m_CategoryConfig
ResourceName GetCategoryConfig()
bool IsGameMode(Managed item)
void SetIsMultiSelect(bool isMultiSelect)
bool GetIsOverridingValues()
SCR_EditorAttributeUIInfo GetUIInfo()
sealed SCR_BaseEditorAttributeVar GetCopyVariable()
sealed ScriptInvoker GetOnSetAsSubAttribute()
static SCR_BaseEditorAttributeVar CreateBool(bool value)
static SCR_BaseEditorAttributeVar CreateVector(vector value)
void GetSliderValues(out string sliderValueFormating, out float min, out float max, out float step, out int decimals)
void SCR_EditorAttributeEntryBool(bool newBool)
void SetBool(bool newBool)
void SCR_EditorAttributeEntryIntArray(array< int > values)
void GetToggleStateAndTypename(out bool overrideToggleState, out typename linkedOverrideAttributeType)
m_LinkedOverrideAttributeType
void SCR_EditorAttributeEntryOverride(bool overrideToggled, typename linkedOverrideAttributeType)
bool m_bHasButtonDescription
bool m_bHasRandomizeButton
void GetPresetValues(out int buttonsOnRow, out bool hasRandomizeButton, out ResourceName iconOfRandomizeButton, out bool hasIcon, out bool hasButtonDescription, out string buttonDescription, out int buttonHeight)
ResourceName m_sIconOfRandomizeButton
string m_sButtonDescription
void SCR_EditorAttributePresetEntry(int buttonsOnRow, bool hasRandomizeButton, ResourceName iconOfRandomizeButton=string.Empty, bool hasIcon=false, bool hasButtonDescription=false, string buttonDescription=string.Empty, int buttonHeight=-1)
UIInfo used by editor attribute system.
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute
SSnapSerializerBase Managed SSnapshot(int sizeInBytes)
Binary data container used in conjuction with a serializer.