11 [
Attribute(
"{3262679C50EF4F01}UI/Textures/Icons/icons_wrapperUI.imageset",
UIWidgets.ResourceNamePicker,
desc:
"Icons imageset",
params:
"imageset" )]
17 [
Attribute(
"{46C46D97D1FE6241}UI/layouts/Map/MapMarkerEditBox.layout",
UIWidgets.ResourceNamePicker,
desc:
"Edit box dialog when placing custom marker",
params:
"layout" )]
20 [
Attribute(
"{DEA2D3B788CDCB4F}UI/layouts/Map/MapIconSelectorEntry.layout",
UIWidgets.ResourceNamePicker,
desc:
"Icon selection entry layout",
params:
"layout" )]
23 [
Attribute(
"{8A5D43FC8AC6C171}UI/layouts/Map/MapColorSelectorEntry.layout",
UIWidgets.ResourceNamePicker,
desc:
"Color selection entry layout",
params:
"layout" )]
26 [
Attribute(
"{4B6A50B3D8200779}UI/layouts/Map/MapDimensionSelectorEntry.layout",
UIWidgets.ResourceNamePicker,
desc:
"Dimension selection entry layout",
params:
"layout" )]
29 [
Attribute(
"{DF5BCE91F8A59977}UI/layouts/Map/MapMilitaryMarkerEditBox.layout",
UIWidgets.ResourceNamePicker,
desc:
"Edit box dialog when placing military symbol marker",
params:
"layout" )]
99 protected ref ScriptInvokerBase<MarkerPlacedInvoker>
m_OnCustomMarkerPlaced =
new ScriptInvokerBase<MarkerPlacedInvoker>();
116 PlayerController localController =
GetGame().GetPlayerController();
119 if (marker.GetMarkerOwnerID() == localController.GetPlayerId())
130 protected void CreateMarkerEditDialog(
bool isEditing =
false,
int tabID = 0,
int selectedIconEntry = -1,
int selectedColorEntry = -1)
141 float screenX, screenY;
142 m_MapEntity.GetMapWidget().GetScreenSize(screenX, screenY);
182 confirmComp.
SetLabel(
"#AR-ServerHosting_Edit");
190 confirmComp.
SetLabel(
"#AR-MapMarker_PlacePublic");
218 float screenX, screenY;
219 m_MapEntity.GetMapWidget().GetScreenSize(screenX, screenY);
242 foreach (
int i, SCR_MarkerMilitaryType markerType : types)
244 m_ComboBoxComp1.AddItem(markerType.GetTranslation(),
false, markerType);
245 m_ComboBoxComp2.AddItem(markerType.GetTranslation(),
false, markerType);
264 confirmComp.
SetLabel(
"#AR-ServerHosting_Edit");
266 confirmComp.
SetLabel(
"#AR-MapMarker_PlacePublic");
288 GetGame().GetWorkspace().SetFocusedWidget(widget);
295 array<ref SCR_MarkerMilitaryFactionEntry> factionsArr =
m_MilitaryMarkerConfig.GetMilitaryFactionEntries();
297 Widget factionSelectorLine = factionSelector.FindAnyWidget(
"FactionSelectorLine");
304 string imageset, quad;
306 foreach (
int i, SCR_MarkerMilitaryFactionEntry factionEntry : factionsArr)
309 button.SetName(
"FactionEntry" + i.ToString());
311 buttonComp.GetImageWidget().SetColor(factionEntry.GetColor());
312 factionEntry.GetIconResource(imageset, quad);
313 buttonComp.SetImage(imageset, quad);
320 if (!firstFactionEntry)
321 firstFactionEntry = buttonComp;
324 if (selectedFactionEntry == -1)
344 if (!factionEntry || dimensionsArr.IsEmpty())
348 Widget dimensionSelectorLine = dimensionSelector.FindAnyWidget(
"DimensionSelectorLine");
355 Widget child = dimensionSelectorLine.GetChildren();
358 child.RemoveFromHierarchy();
359 child = dimensionSelectorLine.GetChildren();
362 foreach (
int i, SCR_MarkerMilitaryDimension dimensionEntry : dimensionsArr)
365 button.SetName(
"DimensionEntry" + i.ToString());
368 milSymbol.
SetIdentity(factionEntry.GetFactionIdentity());
371 Widget overlay = button.FindAnyWidget(
"OverlaySymbol");
372 overlay.SetColor(factionEntry.GetColor());
375 symbolComp.
Update(milSymbol);
383 if (!firstDimensionEntry)
384 firstDimensionEntry = buttonComp;
407 Widget colorSelectorLine = colorSelector.FindAnyWidget(
"ColorSelectorLine");
413 foreach (
int i, SCR_MarkerColorEntry colorEntry : colorsArr)
418 buttonComp.GetImageWidget().SetColor(colorEntry.GetColor());
424 if (!firstColorEntry)
425 firstColorEntry = buttonComp;
428 if (selectedColorEntry == -1)
449 string imageset, imagesetGlow, quad;
457 child.RemoveFromHierarchy();
467 foreach (
int i, SCR_MarkerIconEntry iconEntry : iconsArr)
469 if (iconEntry.m_sCategoryIdentifier != tabContent.m_sTabIdentifier)
484 firstEntry = buttonComp;
486 iconEntry.GetIconResource(imageset, imagesetGlow, quad);
487 buttonComp.SetImage(imageset, quad);
513 int localFactionIndex = -1;
516 localFaction = factionManager.SGetLocalPlayerFaction();
517 localFactionIndex = factionManager.GetFactionIndex(localFaction);
520 array<SCR_MapMarkerBase> markersSimple =
m_MarkerMgr.GetStaticMarkers();
523 markersSimple.Insert(markerDis);
528 if (!factionManager || marker.GetMarkerFactionFlags() == 0)
530 marker.OnCreateMarker(
true);
534 if (!localFaction || !marker.IsFaction(localFactionIndex))
537 marker.SetServerDisabled(
true);
542 marker.OnCreateMarker(
true);
550 array<SCR_MapMarkerEntity> markersDynamic =
m_MarkerMgr.GetDynamicMarkers();
553 marker.OnCreateMarker();
587 PlayerController pc =
GetGame().GetPlayerController();
591 return SocialComponent.Cast(pc.FindComponent(SocialComponent));
709 component.ColorizeBackground();
849 FactionManager factionManager =
GetGame().GetFactionManager();
853 if (markerOwnerFaction)
868 SCR_MapMarkerConfig markerConfig =
m_MarkerMgr.GetMarkerConfig();
877 array<ref SCR_MapMarkerEntryConfig> entryConfigs = markerConfig.GetMarkerEntryConfigs();
935 array<Widget> widgets = SCR_MapCursorModule.GetMapWidgetsUnderCursor();
938 foreach (
Widget widget : widgets )
971 SCR_MapMarkerConfig markerConfig =
m_MarkerMgr.GetMarkerConfig();
986 SCR_MapMarkerConfig markerConfig =
m_MarkerMgr.GetMarkerConfig();
1007 Widget focusedWidget =
GetGame().GetWorkspace().GetFocusedWidget();
1034 array<Widget> widgets = SCR_MapCursorModule.GetMapWidgetsUnderCursor();
1037 foreach (
Widget widget : widgets )
1061 if ((
m_CursorModule.GetCursorState() & SCR_MapCursorModule.STATE_POPUP_RESTRICTED) != 0)
1064 array<Widget> widgets = SCR_MapCursorModule.GetMapWidgetsUnderCursor();
1067 foreach (
Widget widget : widgets )
1083 float screenX, screenY;
1085 m_MapEntity.WorldToScreen(wPos[0], wPos[1], screenX, screenY);
1108 int markerFlags = marker.
GetFlags();
1112 foreach (
int i, SCR_MarkerMilitaryType milType : milTypes)
1114 if (markerFlags & milType.GetType())
1126 if (markerFlags == milType.GetType())
1156 Widget focused =
GetGame().GetWorkspace().GetFocusedWidget();
1191 Widget focused =
GetGame().GetWorkspace().GetFocusedWidget();
1193 name = focused.GetName();
1197 else if (name.Contains(
"FactionEntry"))
1206 Widget focused =
GetGame().GetWorkspace().GetFocusedWidget();
1210 name = focused.GetName();
1218 else if (name.Contains(
"DimensionEntry"))
1220 else if (name.Contains(
"ComboButton"))
1222 while (focused.GetParent() != null)
1224 focused = focused.GetParent();
1225 if (focused.GetName().Contains(
"ComboBox1"))
1239 Widget focused =
GetGame().GetWorkspace().GetFocusedWidget();
1241 name = focused.GetName();
1246 int pos = name.ToInt(offset: 9);
1247 int target = pos - 1;
1262 Widget focused =
GetGame().GetWorkspace().GetFocusedWidget();
1264 name = focused.GetName();
1269 int pos = name.ToInt(offset: 9);
1270 int target = pos + 1;
1314 m_MapEntity.ScreenToWorld(
GetGame().GetWorkspace().DPIScale(pos[0]),
GetGame().GetWorkspace().DPIScale(pos[1]), wX, wY);
1344 bool isLocal = markerID == -1;
1345 m_MarkerMgr.InsertStaticMarker(markerNew, isLocal);
1356 super.OnMapOpen(config);
1374 if ( SCR_MapToolInteractionUI.Cast(
m_MapEntity.GetMapUIComponent(SCR_MapToolInteractionUI)) )
1376 SCR_MapToolInteractionUI.GetOnDragWidgetInvoker().Insert(
OnDragWidget);
1377 SCR_MapToolInteractionUI.GetOnDragEndInvoker().Insert(
OnDragEnd);
1380 SCR_MapMarkerConfig markerConfig =
m_MarkerMgr.GetMarkerConfig();
1393 SCR_MapMarkerConfig markerConfig =
m_MarkerMgr.GetMarkerConfig();
1415 super.OnMapClose(config);
1431 SCR_MapMarkerConfig markerConfig =
m_MarkerMgr.GetMarkerConfig();
1438 array<ref SCR_MapMarkerEntryConfig> entryConfigs = markerConfig.GetMarkerEntryConfigs();
1457 GetGame().GetInputManager().ActivateContext(
"MapMarkerEditContext");
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
InputManager GetInputManager()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_FactionManager(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SetDragged(bool state)
Set dragged state.
void SetRotation(int angle)
void SetColorEntry(int colorEntry)
void AddMarkerFactionFlags(int flags)
Add faction index to flags which you can acquire by calling GetFactionIndex().
void SetVisible(bool state)
Used for temporary reasons such as hiding original marker during edit, not for filtering visiblity.
void SetMarkerFactionFlags(int flags)
Set faction flags directly without converting the faction indices.
void SetIconEntry(int iconEntry)
SCR_EMapMarkerType GetType()
void SetTimestamp(WorldTimestamp timestamp)
void SetMarkerConfigID(int id)
bool CanBeRemovedByOwner()
void SetCustomText(string text)
void GetWorldPos(out int pos[2])
void SetType(SCR_EMapMarkerType type)
void SetWorldPos(int posX, int posY)
void SetTimestampVisibility(bool isVisible)
int GetMarkerFactionFlags()
Get faction flags representing indices of factions within FactionManager prefab.
bool IsTimestampVisible()
Marker military symbol entry.
ResourceName GetMenuImageset()
const float DIMENSION_DETERMINATOR
string GetMenuDescription()
const int FACTION_DETERMINATOR
Marker entry which can be placed through map.
ResourceName GetMenuImageset()
string GetMenuDescription()
Marker recon symbol entry - combination of military and custom symbols.
ResourceName GetMenuImageset()
string GetMenuDescription()
void CreateEntries(notnull SCR_MapRadialUI radialUI, notnull SCR_SelectionMenuCategoryEntry parent=null)
Markers UI map component.
void OnInputMapSelect(float value, EActionTrigger reason)
Marker select.
EMilitarySymbolIcon m_eMilitaryTypeAIcon
void OnPlaceMarkerConfirmed(SCR_InputButtonComponent button)
SCR_ButtonTextComponent event.
void OnIconEntryClicked(notnull SCR_ButtonBaseComponent component)
SCR_ButtonImageComponent event.
void CreateMilitaryMarkerEditDialog(bool isEditing=false, int selectedFactionEntry=-1, int selectedDimensionEntry=-1)
SCR_ComboBoxComponent m_ComboBoxComp1
TextWidget m_wFactionSelectionText
OverlayWidget m_wMarkerPreviewMilitary
void CreateMarkerEditDialog(bool isEditing=false, int tabID=0, int selectedIconEntry=-1, int selectedColorEntry=-1)
void OnRadialMenuInit()
SCR_MapRadialUI event.
EMilitarySymbolIcon m_eMilitaryTypeBIcon
void OnDragEnd(Widget widget, bool wasDragged)
SCR_MapToolInteractionUI event.
SCR_ButtonBaseComponent m_SelectedIconButton
ref map< SCR_ButtonBaseComponent, int > m_mFactionIDs
SCR_ButtonBaseComponent m_SelectedDimensionButton
SCR_MilitarySymbolUIComponent m_MarkerPreviewMilitaryComp
ResourceName m_sEditBoxLayout
void OnSliderChanged(SCR_SliderComponent slider, float value)
SCR_SliderComponent event.
SCR_MapMarkerEntryPlaced m_PlacedMarkerConfig
void OnInputMenuConfirmAlter(float value, EActionTrigger reason)
Menu alternative confirm bind.
ref Color BACKGROUND_DEFAULT
void OnFactionEntryClicked(SCR_ButtonBaseComponent component)
SCR_ButtonImageComponent event.
SCR_EditBoxComponent m_EditBoxComp
ResourceName m_sSelectorDimensionEntry
void DelayedQuickMarkerMenu()
SCR_MarkerMilitaryType m_eMilitaryTypeA
void OnInputMenuConfirm(float value, EActionTrigger reason)
Menu select/confirm bind.
SCR_MapCursorModule m_CursorModule
SCR_SpinBoxComponent m_TimestampSpinBox
void OnColorEntryFocused(Widget rootW)
SCR_ButtonImageComponent event.
void CleanupMarkerEditWidget()
Marker edit widget removal.
void InitDimensionIcons()
Init dimension icons.
ScriptInvokerBase< MarkerPlacedInvoker > GetOnCustomMarkerPlaced()
void OnPlaceMarkerConfirmedPrivate(SCR_InputButtonComponent button)
SCR_ButtonTextComponent event.
void OnInputMenuBack(float value, EActionTrigger reason)
Menu back/escape bind.
void OnInputQuickMarkerMenu(float value, EActionTrigger reason)
Quick open input for marker category.
void CreateStaticMarkers()
Create static markers.
static bool IsOwnedMarker(notnull SCR_MapMarkerBase marker)
Check whether the marker is owned by the local player.
ResourceName m_sIconImageset
const string ICON_SELECTOR
SCR_SelectionMenuEntry m_MarkerRemoveEntry
void OnInputMenuLeft(float value, EActionTrigger reason)
const ResourceName SELECTOR_LINE
void OnComboBoxChangedB(SCR_ComboBoxComponent comp, int value)
SCR_ComboBoxComponent event.
override void Update(float timeSlice)
void OnInputMenuRight(float value, EActionTrigger reason)
void OnColorEntryClicked(SCR_ButtonBaseComponent component)
SCR_ButtonImageComponent event.
bool m_bIsTimestampVisible
void OnRadialMenuOpen(SCR_RadialMenuController controller, bool hasControl)
SCR_RadialMenuController event.
void OnDragWidget(Widget widget)
SCR_MapToolInteractionUI event.
ResourceName m_sSelectorIconEntry
ref ScriptInvokerBase< MarkerPlacedInvoker > m_OnCustomMarkerPlaced
ref map< SCR_ButtonBaseComponent, int > m_mDimensionIDs
SCR_SelectionMenuCategoryEntry m_ReconCategoryEntry
void OnInputMenuUp(float value, EActionTrigger reason)
ref Color BACKGROUND_SELECTED
SCR_ButtonBaseComponent m_SelectedColorButton
void OnIconEntryFocused(Widget rootW)
SCR_ButtonImageComponent event.
const string COLOR_SELECTOR
void OnInsertMarker(bool isLocal)
TextWidget m_wDimensionSelectionText
void InitFactionIcons(int selectedFactionEntry)
Init faction icons.
void OnInputMarkerDelete(float value, EActionTrigger reason)
Marker delete quickbind.
ImageWidget m_wMarkerPreviewGlow
void CreateDynamicMarkers()
Create dynamic markers.
int m_iSelectedDimensionID
void OnFactionEntryFocused(Widget rootW)
SCR_ButtonImageComponent event.
void OnInputMenuDown(float value, EActionTrigger reason)
SCR_MapMarkerManagerComponent m_MarkerMgr
SocialComponent GetSocialComponent()
void OnComboBoxChangedA(SCR_ComboBoxComponent comp, int value)
SCR_ComboBoxComponent event.
void FocusWidget(Widget widget)
void InitCategoryIcons(SCR_TabViewContent tabContent)
Init icons by category.
void OnDimensionEntryFocused(Widget rootW)
SCR_ButtonImageComponent event.
void InitColorIcons(int selectedColorEntry)
Init color icons.
TextWidget m_wMarkerPreviewText
SCR_MapMarkerBase m_RemovableMarker
ref map< SCR_ButtonBaseComponent, int > m_mColorIDs
SCR_MapMarkerBase m_EditedMarker
SCR_SliderComponent m_SliderComp
void OnEditBoxTextChanged(string text)
SCR_EditBoxComponent event.
void RemoveOwnedMarker(SCR_MapMarkerBase marker)
Attemt to remove marker, only works if owned.
ref SCR_MilitarySymbol m_MilSymbolPreview
string m_sCategoryIconName
override void OnMapClose(MapConfiguration config)
SCR_MarkerMilitaryType m_eMilitaryTypeB
ref map< SCR_ButtonBaseComponent, int > m_mIconIDs
ImageWidget m_wMarkerPreview
SCR_TabViewComponent m_TabComponent
SCR_SelectionMenuCategoryEntry m_RootCategoryEntry
override void OnMapOpen(MapConfiguration config)
const int USERID_EDITBOX_MIL
void OnDimensionEntryClicked(SCR_ButtonBaseComponent component)
SCR_ButtonImageComponent event.
void OnTimestampSpinBoxChanged(SCR_SpinBoxComponent comp, int selectedItem)
SCR_SpinBoxComponent event.
ResourceName m_sMilitaryEditBoxLayout
int m_iWantedDimensionEntry
void OnEntryPerformed(SCR_SelectionMenuEntry entry)
SCR_MapMarkerMenuEntry event.
SCR_MapMarkerEntryMilitary m_MilitaryMarkerConfig
void OnTabChanged(SCR_TabViewComponent tabView, Widget widget, int index)
SCR_TabViewComponent event.
SCR_ButtonBaseComponent m_SelectedFactionButton
ResourceName m_sSelectorColorEntry
SCR_ComboBoxComponent m_ComboBoxComp2
void OnEditCancelled(SCR_InputButtonComponent button)
SCR_ButtonTextComponent event.
ScriptInvokerVoid GetOnMenuInitInvoker()
void RemoveRadialEntry(SCR_SelectionMenuEntry entry)
SCR_SelectionMenuEntry AddRadialEntry(string name, SCR_SelectionMenuCategoryEntry category=null)
SCR_SelectionMenuCategoryEntry AddRadialCategory(string name, SCR_SelectionMenuCategoryEntry parent=null)
static SCR_MapRadialUI GetInstance()
SCR_RadialMenuController GetRadialController()
void InsertCustomRadialEntry(SCR_SelectionMenuEntry entry, SCR_SelectionMenuCategoryEntry category=null)
void SCR_MapUIBaseComponent()
SCR_MapEntity m_MapEntity
Placed marker icon category.
void SetDimension(EMilitarySymbolDimension dimension)
void SetIdentity(EMilitarySymbolIdentity identity)
void Update(notnull SCR_MilitarySymbol symbol, SCR_MilitarySymbolConfig config=null)
SCR_TabViewContent GetEntryContent(int index)
SCR_FieldOfViewSettings Attribute
proto external PlayerController GetPlayerController()
EUserInteraction
Interaction type between two players.
proto external int GetPlayerId()