8 [
Attribute(defvalue:
"4",
desc:
"If more then this amount tabs are shown then the text will be hidden and only icon will be shown")]
50 [
Attribute(
"#AR-AttributesDialog_TitlePage_Photo_Text")]
53 [
Attribute(
"#AR-AttributesDialog_TitlePage_Admin_Text")]
56 [
Attribute(
"#AR-AttributesDialog_TitlePage_FactionOnly_Text")]
65 [
Attribute(
"#AR-AttributesDialog_TitlePage_Entity_Text")]
68 [
Attribute(
"#AR-AttributesDialog_TitlePage_Editing_Text")]
77 [
Attribute(
"2",
"If more types then given type, m_sMultiEntitiesTitle will be used as text")]
80 [
Attribute(
desc:
"A List of translated names for entity types which is also used to display the order of entity types (Eg if multiple which one to show first)")]
83 [
Attribute(
"{E2CBA6F76AAA42AF}UI/Fonts/Roboto/Roboto_Regular.fnt")]
231 if (!workspace)
return;
246 array<SCR_BaseEditorAttribute> attributes =
new array<SCR_BaseEditorAttribute>;
254 if (
layout.IsEmpty())
continue;
257 if (!attributeWidget)
continue;
262 attributesUI.
Init(attributeWidget, attribute);
263 attributesUI.
SetFromVar(attribute.GetVariable());
266 if (attribute.GetHasConflictingValues())
314 widget.SetVisible(visible);
315 widget.SetEnabled(visible);
335 void InitWidget(array<ResourceName> categoryConfigs, array<ref SCR_EditorAttributeCategory> categories)
339 m_AttributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
346 if (!workspace)
return;
352 if (!tabWidget)
return;
393 if (categoryConfigs.IsEmpty())
397 noAttributes.SetVisible(
true);
400 bool globalAttributesSet =
false;
403 foreach (
int i,
ResourceName categoryConfig: categoryConfigs)
407 if (!globalAttributesSet)
409 globalAttributesSet =
true;
414 array<Managed> editedItems =
new array<Managed>;
432 closeButton.SetVisible(
true);
440 acceptButton.SetVisible(
true);
525 array<Managed> editedItems = {};
534 array<EEditableEntityType> types = {};
535 array<int> typeCounts = {};
538 bool showTypes =
true;
539 bool sameNames =
true;
540 bool oneGroup =
true;
541 string name =
string.Empty;
545 foreach (Managed item: editedItems)
552 if (SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(editableEntity.GetOwner()) > 0)
558 if (name ==
string.Empty)
583 if (SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(editableEntity.GetOwner()) > 0)
590 if (groupEntity == null)
592 else if (groupEntity != null && groupEntity != editableEntity.
GetParentEntity())
598 if (groupEntity != null && groupEntity != editableEntity)
601 groupEntity = editableEntity;
608 int index = types.Find(entityType);
612 types.Insert(entityType);
613 typeCounts.Insert(1);
648 bool firstShown =
false;
649 int indexHighestPriority;
652 while (types.Count() > 0)
654 int typesCount = types.Count();
655 int currentPriority =
int.MAX;
657 for(
int i = 0; i < typesCount; i++)
662 currentPriority = -1;
663 indexHighestPriority = i;
668 for(
int t = 0; t < typeNameCount; t++)
672 if (t < currentPriority)
675 indexHighestPriority = i;
685 types.Remove(indexHighestPriority);
686 typeCounts.Remove(indexHighestPriority);
756 SCR_EditablePlayerDelegateComponent playerDelegate = SCR_EditablePlayerDelegateComponent.Cast(editedItems[0]);
776 int playerID = SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(editableEntity.GetOwner());
825 textWidget.SetTextFormat(
"%1 -", textWidget.GetText());
827 textWidget.SetTextFormat(
"%1 %2", textWidget.GetText(), name);
830 textWidget.SetTextFormat(
"%2 <font name=\"%3\"><color rgba=\"226,168,79,255\">#AR-ValueUnit_Short_Times</color></font>", count.ToString(), textWidget.GetText(),
m_sFontForHeaderEntityAmount);
837 return "#AR-AttributesDialog_TitlePage_Player_Text";
843 if (titleType.GetType() ==
type)
844 return titleType.GetTypeName();
ArmaReforgerScripted GetGame()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_BaseGameMode GetGameMode()
InputManager GetInputManager()
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
override SCR_UIInfo GetInfo()
UI layouts Menus CleanSweep CleanSweepAreaSelection layout
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
string m_sContentHolderWidgetName
SCR_InputButtonComponent m_GamepadToggleEnableButton
ResourceName m_currentCategory
LocalizedString m_sEndGameTitle
bool m_bIsGlobalAttribute
string m_sFontForHeaderEntityAmount
override void HandlerDeattached(Widget w)
bool m_bHasConflictingAttributes
TextWidget m_PlayerNameWidget
void SetWidgetVisible(bool visible)
ref SCR_ArsenalItemTypeUIConfig m_ArsenalItemTypeConfig
LocalizedString TranslateEntityType(EEditableEntityType type)
string m_sSfxOnOpenDialog
void SetHasConflictingAttribute(bool hasConflicting)
string m_sNoAttributeNoteName
void SetGamepadAttributeFocus(SCR_BaseEditorAttributeUIComponent attributeUI)
int m_iTabTextAndImageWidth
ref array< ref SCR_EntityAttributeTitleType > m_aEntityTypeNames
LocalizedString m_sEndGamePopUpTitle
int m_iEntityTypesUntilMulti
SCR_BaseEditorAttributeUIComponent m_GamepadFocusAttribute
LocalizedString m_sTaskTitle
SCR_TabViewComponent m_TabViewComponent
LocalizedString m_sMultiEntitiesTitle
string m_sButtonEndGameCloseName
void InitWidget(array< ResourceName > categoryConfigs, array< ref SCR_EditorAttributeCategory > categories)
LocalizedString m_sPhotoModeTitle
string m_sGamepadToggleAttributeButtonName
void OnAttributeChanged()
Sets Reset button enabled and close to Save and Close.
LocalizedString m_sEndGamePopUpConfirm
string m_sPlayerNameWidgetName
SCR_AttributesManagerEditorComponent m_AttributesManager
LocalizedString m_sFactionOnlyTitle
void SetHeaderText(RichTextWidget header)
string m_sSfxClickedOutsideWindow_Cancel
LocalizedString m_sAdminModeTitle
EEditorMode m_ActiveEditorMode
string m_sButtonCloseButtonName
string m_sSfxClickedOutsideWindow_Comfirm
void OnCurrentTabChanged(SCR_TabViewComponent tabView, Widget w, int tabIndex)
int m_iMaxTabsUntilImageOnly
string m_sTitleHeaderWidgetName
Widget m_ButtonCloseAndSaveButton
string m_sPlatformImageWidgetName
SCR_InputButtonComponent m_ResetButton
void SetPlayerInfo(int playerId)
LocalizedString m_sEndGamePopUpMessage
void EndGamePopupComfirm()
ImageWidget m_PlatformImageWidget
LocalizedString m_sEditingTitlePart
ResourceName GetCurrentCategory()
ref array< ResourceName > m_CategoryConfigs
string m_sButtonResetWidgetName
string m_sButtonCloseAndSaveButtonName
string m_sButtonEndGameAcceptName
Widget m_ButtonCloseButton
string m_sSfxOnCloseDialog
void ButtonAttributeEnableToggle()
void OnInputDeviceIsGamepad(bool isGamepad)
string m_sOutsideWindowCloseButtonName
void SetHeaderPart(RichTextWidget textWidget, string name, int count, bool showSeperator)
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
ScriptInvoker GetOnAttributeUIFocusChanged()
Called on attribute changed via UI return Event_OnAttributeChanged ScriptInvoker *ScriptInvoker GetOnAttributeChanged()
void SetFromVar(SCR_BaseEditorAttributeVar var)
Initialize GUI from attribute To be overridden by inherited classes param w Widget this component is attached to param attribute Editor attribute this component represents *void Init(Widget w, SCR_BaseEditorAttribute attribute)
ScriptInvoker GetOnGameModeEnd()
ref ScriptInvoker m_OnConfirm
EEditableEntityType GetEntityType(IEntity owner=null)
SCR_EditableEntityComponent GetParentEntity()
EEditableEntityType m_type
EEditableEntityType GetType()
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
SCR_FieldOfViewSettings Attribute
EEditorMode
Editor mode that defines overall functionality.
proto external PlayerController GetPlayerController()