4 [
Attribute(
"{14E86B20D0ED993F}UI/layouts/Campaign/ServiceContainer.layout")]
5 protected ResourceName m_sServiceElement;
7 [
Attribute(
"{94F1E2223D7E0588}UI/layouts/Campaign/ServiceHint.layout")]
8 protected ResourceName m_sServiceHint;
10 [
Attribute(
"{CA8B528037B6831A}UI/Textures/InventoryIcons/Supplies_icon_UI.edds")]
11 protected ResourceName m_sSupplyIcon;
13 protected static const float OPACITY_DISABLED = 0.5;
14 protected static const float OPACITY_UNSELECTED = 0.9;
22 protected int m_iServicesPadding = 0;
23 protected float m_fNameOffset = 2;
25 protected ref map<EEditableEntityLabel, SCR_ServicePointDelegateComponent> m_mServices =
new map<EEditableEntityLabel, SCR_ServicePointDelegateComponent>();
26 protected ref map<Widget, SCR_MapUITask> m_mTasks =
new map<Widget, SCR_MapUITask>();
29 protected string m_sFactionKey;
31 protected SCR_CampaignMobileAssemblyStandaloneComponent m_MobileAssembly;
32 protected SCR_ResourceComponent m_ResourceComponent;
33 protected SCR_ResourceConsumer m_ResourceConsumer;
35 protected RplId m_ResourceInventoryPlayerComponentRplId;
37 protected SizeLayoutWidget m_wImageOverlay;
38 protected Widget m_wBaseFrame;
39 protected Widget m_wBaseIcon;
40 protected Widget m_wBaseOverlay;
41 protected Widget m_wInfoOverlay;
42 protected Widget m_wServices;
43 protected TextWidget m_w_NameDialog;
44 protected static Widget m_wServiceHint;
45 protected Widget m_w_ServicesOverlay;
47 protected TextWidget m_wBaseName;
48 protected TextWidget m_wCallsignName;
49 protected TextWidget m_wBaseNameDialog;
50 protected TextWidget m_wCallsignNameDialog;
51 protected TextWidget m_wSuppliesText
52 protected Widget m_wInfoText;
53 protected Widget m_wAntennaImg;
55 protected int m_iBaseSize = 80;
56 protected int m_iDefBaseSize = 46;
57 protected int m_iMaxBaseSize = 80;
58 protected int m_iDefHQSize = 88;
59 protected int m_iDefRelaySize = 64;
61 protected ImageWidget m_wLocalTask;
62 protected LocalizedString m_sAssembly =
"#AR-Vehicle_MobileAssembly_Name";
64 static ref ScriptInvoker Event_OnIconUpdated =
new ScriptInvoker();
66 protected ref ScriptInvoker m_OnBaseSelected =
new ScriptInvoker();
67 protected ref ScriptInvoker m_OnMapIconEnter;
68 protected ref ScriptInvoker m_OnMapIconClick;
71 bool m_bIsAnyElementHovered;
72 bool m_bIsAnyElementClicked;
73 protected bool m_bServicesShown;
74 protected bool m_bCanRespawn;
75 protected bool m_bIsRespawnMenu;
76 protected bool m_bIsEditor;
77 protected bool m_bCanPlaySounds =
true;
82 ScriptInvoker GetOnMapIconEnter()
84 if (!m_OnMapIconEnter)
85 m_OnMapIconEnter =
new ScriptInvoker();
87 return m_OnMapIconEnter;
91 ScriptInvoker GetOnMapIconClick()
93 if (!m_OnMapIconClick)
94 m_OnMapIconClick =
new ScriptInvoker();
96 return m_OnMapIconClick;
100 override bool OnClick(Widget w,
int x,
int y,
int button)
102 if (m_OnMapIconClick)
103 m_OnMapIconClick.Invoke();
107 if (!m_bIsAnyElementHovered && m_bCanRespawn && m_bIsRespawnMenu)
109 m_bIsAnyElementClicked =
true;
111 m_bIsAnyElementClicked =
false;
112 m_wHighlightImg.SetVisible(
false);
118 override void SelectIcon(
bool invoke =
true)
123 if (s_SelectedElement && s_SelectedElement !=
this)
125 s_SelectedElement.Select(
false);
131 m_wSelectImg.SetVisible(
true);
133 m_wGradient.SetVisible(
true);
135 if (m_bIsSelected && invoke)
140 void FlashBaseIcon(
Faction faction =
null,
bool changeToDefault =
false)
147 SetBaseIconFactionColor(
m_Base.GetCampaignFaction());
149 SetBaseIconFactionColor(faction);
153 if (!changeToDefault)
156 SetBaseIconFactionColor(
null);
161 override bool OnMouseEnter(Widget w,
int x,
int y)
163 if (m_wImageOverlay && w == m_wImageOverlay && !m_wBaseOverlay.IsEnabled())
164 m_wBaseOverlay.SetEnabled(
true);
167 if (tm && !tm.IsTaskListOpen())
169 GetGame().GetWorkspace().SetFocusedWidget(w);
172 if (m_OnMapIconEnter)
173 m_OnMapIconEnter.Invoke();
175 super.OnMouseEnter(w, x, y);
177 if (w.Type() == ButtonWidget)
182 m_Base.GetMapDescriptor().OnIconHovered(
this,
true);
186 m_wServices.SetVisible(!m_mServices.IsEmpty());
187 m_wServices.SetEnabled(!m_mServices.IsEmpty());
193 m_wInfoText.SetVisible(
true);
197 if (m_MobileAssembly){
198 m_MobileAssembly.OnIconHovered(
this,
true);
199 m_wServices.SetVisible(
true);
200 m_w_ServicesOverlay.SetVisible(
false);
204 if (!m_bCanRespawn && m_bIsRespawnMenu)
211 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
213 super.OnMouseLeave(w, enterW, x, y);
219 m_wInfoText.SetVisible(
false);
224 m_Base.GetMapDescriptor().OnIconHovered(
this,
false);
226 if (m_MobileAssembly)
227 m_MobileAssembly.OnIconHovered(
this,
false);
228 m_wInfoText.SetVisible(
false);
230 if (!m_bCanRespawn && m_bIsRespawnMenu)
234 m_wServices.SetEnabled(
false);
236 if (m_wLocalTask.IsEnabled())
237 m_wLocalTask.SetVisible(
true);
242 m_bCanPlaySounds =
true;
244 if (RenderTargetWidget.Cast(enterW) && m_wBaseOverlay.IsEnabled())
246 m_wBaseOverlay.SetEnabled(
false);
247 m_bCanPlaySounds =
true;
254 protected void SelectBase()
256 if (s_SelectedElement && s_SelectedElement !=
this)
257 s_SelectedElement.Select(
false);
263 protected void OnLeave()
268 override void AnimExpand()
270 if (!m_bIsAnyElementHovered && m_bCanPlaySounds)
280 if (!m_bIsAnyElementClicked)
281 PlayHoverSound(m_sSoundBase);
286 PlayHoverSound(m_sSoundEnemyBase);
291 PlayHoverSound(m_sSoundRelay);
297 int paddingRight = 0;
298 int paddingBottom = 0;
300 if (m_mTasks.IsEmpty())
302 if (m_mServices.IsEmpty())
307 AnimateWidget.Opacity(m_wServices, 1, ANIM_SPEED);
310 m_wHighlightImg.SetVisible(
true);
312 m_wGradient.SetVisible(
true);
316 override void AnimCollapse()
318 m_wHighlightImg.SetVisible(
false);
319 if (m_wGradient && !m_bIsSelected)
320 m_wGradient.SetVisible(
false);
324 AnimateWidget.Opacity(m_wServices, 0, ANIM_SPEED);
329 void ShowServiceHint(
string name,
string text,
bool show,
int suppliesAmount = -1,
int suppliesMax = -1)
334 WidgetManager.GetMousePos(mx, my);
336 mx =
GetGame().GetWorkspace().DPIUnscale(mx);
337 my =
GetGame().GetWorkspace().DPIUnscale(my);
342 m_wServiceHint = entity.GetMapMenuRoot().FindAnyWidget(
"ServiceHintRoot");
347 FrameSlot.SetPos(m_wServiceHint, mx, my);
348 TextWidget.Cast(m_wServiceHint.FindAnyWidget(
"ServiceName")).SetTextFormat(name);
349 Widget resupplyText = m_wServiceHint.FindAnyWidget(
"ResupplyText");
351 resupplyText.SetVisible(
false);
353 if (suppliesAmount > -1 && suppliesMax > -1)
355 TextWidget serviceText = TextWidget.Cast(m_wServiceHint.FindAnyWidget(
"ServiceText"));
357 serviceText.SetTextFormat(text, suppliesAmount, suppliesMax);
360 resupplyText.SetVisible(suppliesAmount < suppliesMax);
364 TextWidget serviceText = TextWidget.Cast(m_wServiceHint.FindAnyWidget(
"ServiceText"));
366 serviceText.SetTextFormat(text);
370 m_wServiceHint.SetVisible(show)
374 override void HandlerAttached(Widget w)
376 super.HandlerAttached(w);
380 m_wImageOverlay = SizeLayoutWidget.Cast(w.FindAnyWidget(
"SizeBaseIcon"));
381 m_wBaseOverlay = w.FindAnyWidget(
"ImageOverlay");
383 m_wServices = w.FindAnyWidget(
"ServicesFrame");
384 m_w_ServicesOverlay = w.FindAnyWidget(
"ServicesSizeOverlay");
386 m_wBaseFrame = w.FindAnyWidget(
"BaseFrame");
387 m_wBaseIcon = Widget.Cast(w.FindAnyWidget(
"SideSymbol"));
389 m_wBaseName = TextWidget.Cast(w.FindAnyWidget(
"Name"));
390 m_wCallsignName = TextWidget.Cast(w.FindAnyWidget(
"Callsign"));
392 m_wBaseNameDialog = TextWidget.Cast(w.FindAnyWidget(
"m_w_NameDialog"));
393 m_wCallsignNameDialog = TextWidget.Cast(w.FindAnyWidget(
"Callsign-Dialog"));
396 m_wInfoText = Widget.Cast(w.FindAnyWidget(
"Info"));
397 m_wAntennaImg = w.FindAnyWidget(
"AntenaOff");
399 m_wLocalTask = ImageWidget.Cast(w.FindAnyWidget(
"LocalTask"));
404 SCR_CampaignMobileAssemblyStandaloneComponent.s_OnUpdateRespawnCooldown.Insert(SetIconInfoText);
405 SCR_CampaignMobileAssemblyStandaloneComponent.s_OnSpawnPointOwnerChanged.Insert(UpdateAssemblyIcon);
408 m_bIsRespawnMenu = SCR_DeployMenuMain.GetDeployMenu() !=
null;
414 m_wSuppliesText = TextWidget.Cast(m_wInfoText.FindAnyWidget(
"Supplies"));
418 void OnMapCloseInvoker(MapConfiguration config)
427 m_wServiceHint.RemoveFromHierarchy();
428 m_wServiceHint =
null;
432 override void HandlerDeattached(Widget w)
438 SCR_CampaignMobileAssemblyStandaloneComponent.s_OnUpdateRespawnCooldown.Remove(SetIconInfoText);
439 SCR_CampaignMobileAssemblyStandaloneComponent.s_OnSpawnPointOwnerChanged.Remove(UpdateAssemblyIcon);
458 IEntity parent = sp.GetParent();
462 if (m_MobileAssembly)
470 if (base && base ==
m_Base)
483 m_wSelectImg.SetVisible(
true);
485 m_wGradient.SetVisible(
true);
490 m_wSelectImg.SetVisible(
false);
492 m_wGradient.SetVisible(
false);
497 protected void ShowServices(
bool show)
499 m_wServices.SetVisible(show);
503 protected void ShowBase(
bool show)
505 m_wBaseFrame.SetVisible(show);
509 void SetIconInfoText()
514 if (m_MobileAssembly)
515 m_MobileAssembly.UpdateRespawnCooldown(m_wInfoText);
527 float respawnCooldown = Math.Ceil(
m_Base.GetRespawnTimestamp().DiffMilliseconds(world.GetServerTimestamp()) * 0.001);
528 string shownRespawnCooldown;
532 TextWidget respawn = TextWidget.Cast(m_wInfoText.FindAnyWidget(
"Respawn"));
533 RichTextWidget freq = RichTextWidget.Cast(m_wInfoText.FindAnyWidget(
"Freq"));
534 TextWidget supplies = TextWidget.Cast(m_wInfoText.FindAnyWidget(
"Supplies"));
535 ImageWidget respawnImg = ImageWidget.Cast(m_wInfoText.FindAnyWidget(
"RespawnIMG"));
536 ImageWidget freqImg = ImageWidget.Cast(m_wInfoText.FindAnyWidget(
"FreqIMG"));
537 ImageWidget suppliesImg = ImageWidget.Cast(m_wInfoText.FindAnyWidget(
"SuppliesIMG"));
540 if (
m_Base.GetSupplies() >=
m_Base.GetBaseSpawnCost() && respawnCooldown > 0 && baseFaction && baseFaction == playerFaction)
542 shownRespawnCooldown =
"#AR-Campaign_MobileAssemblyCooldown";
544 sStr =
string.ToString(s);
551 respawnImg.SetVisible(
false);
561 supplies.SetVisible(
true);
562 suppliesImg.SetVisible(
true);
564 if (baseFaction && baseFaction == playerFaction)
566 suppliesString =
"#AR-Campaign_BaseSuppliesAmount";
567 suppliesInfo =
m_Base.GetSupplies().ToString();
568 income =
m_Base.GetSuppliesIncome();
570 if (!
m_Base.IsHQ() && !shownRespawnCooldown.IsEmpty())
572 respawn.SetVisible(
true);
573 respawnImg.SetVisible(
true);
578 suppliesString =
"#AR-Campaign_BaseSuppliesUnknown";
582 ResourceName imageset =
m_Base.GetBuildingIconImageset();
584 if (!imageset.IsEmpty())
586 respawnImg.LoadImageFromSet(0, imageset,
"RespawnBig");
587 suppliesImg.LoadImageFromSet(0, imageset,
"SuppliesBig");
591 supplies.SetTextFormat(suppliesString +
" (+%3)", suppliesInfo,
m_Base.GetSuppliesMax(), income);
593 supplies.SetTextFormat(suppliesString, suppliesInfo,
m_Base.GetSuppliesMax());
595 respawn.SetTextFormat(shownRespawnCooldown, m, sStr);
601 suppliesImg.LoadImageTexture(0, m_sSupplyIcon);
607 Widget w = m_wServices.FindAnyWidget(
"ServicesSizeOverlay");
611 m_wServices.SetVisible(
false);
612 m_wServices.SetOpacity(0);
614 int cnt = m_mServices.Count();
615 for (
int serviceId = 0; serviceId < 8; ++serviceId)
617 string btnName =
"Service" + serviceId.ToString();
618 Widget serviceBtn = w.FindAnyWidget(btnName);
620 if (serviceId >= cnt)
622 serviceBtn.SetVisible(
false);
629 handler.SetParent(
this);
630 handler.SetService(m_mServices.GetKey(serviceId), m_mServices.GetElement(serviceId));
636 protected void InitBaseIcon()
644 f =
m_Base.GetCampaignFaction();
647 Widget w =
m_wRoot.FindAnyWidget(
"rootWidget");
649 FrameSlot.SetAlignment(w, 0.5, m_fNameOffset);
652 SetIconName(
m_Base.GetBaseName());
653 SetBaseType(
m_Base.GetType());
655 ChangeBaseIconSize();
659 protected void UpdateResources()
664 m_wSuppliesText.SetText(
string.ToString(
m_ResourceConsumer.GetAggregatedResourceValue()));
668 void UpdateBaseIcon(
int id)
675 string f = m_sFactionNeutral;
689 protected void UpdateAssemblyIcon()
691 if (!m_MobileAssembly)
694 SetIconName(m_sAssembly);
695 SetIconFaction(m_MobileAssembly.GetParentFaction());
697 string img =
string.Format(
"%1_%2",
m_sFactionKey, m_sMobileAssembly);
698 string selectionImg =
string.Format(
"%1_%2_%3",
m_sFactionKey, m_sRelay, m_sSelection);
703 protected void SetIconFaction(
Faction faction)
712 protected void SetBaseImage()
723 img =
string.Format(
"%1_%2_%3",
m_sFactionKey, m_sBase,
"Main");
724 m_iServicesPadding = -10;
727 else if (
m_Base.IsControlPoint())
729 img =
string.Format(
"%1_%2_%3",
m_sFactionKey, m_sBase,
"Major");
730 m_iServicesPadding = -5;
735 img =
string.Format(
"%1_%2_%3",
m_sFactionKey, m_sBase,
"Small");
739 if (img !=
string.Empty)
755 m_wCallsignName.SetExactFontSize(18);
757 SCR_CampaignMilitaryBaseMapDescriptorComponent descr =
m_Base.GetMapDescriptor();
764 props.SetIconVisible(
false);
765 props.SetTextVisible(
false);
766 props.Activate(
true);
769 if (!m_wSuppliesText)
772 IEntity owner =
m_Base.GetOwner();
794 void InitMobile(SCR_CampaignMobileAssemblyStandaloneComponent assembly)
796 m_MobileAssembly = assembly;
798 UpdateAssemblyIcon();
803 m_w_ServicesOverlay.SetVisible(
false);
804 m_wServices.SetVisible(
false);
808 m_w_ServicesOverlay.SetVisible(
false);
812 SCR_MapDescriptorComponent descr = SCR_MapDescriptorComponent.Cast(spawnpoint.FindComponent(SCR_MapDescriptorComponent));
817 props.SetIconVisible(
false);
818 props.SetTextVisible(
false);
819 props.Activate(
true);
821 m_w_ServicesOverlay.SetVisible(
false);
822 m_wServices.SetVisible(
false);
828 protected void OnMapClose(MapConfiguration config)
831 m_Base.GetMapDescriptor().OnIconHovered(
this,
false);
832 else if (m_MobileAssembly)
833 m_MobileAssembly.OnIconHovered(
this,
false);
837 protected void SetIconName(
string name)
841 m_wBaseName.SetText(name);
842 m_wBaseNameDialog.SetText(name);
849 callsign =
m_Base.GetCallsignDisplayNameOnlyUC();
851 m_wCallsignName.SetText(callsign);
852 m_wCallsignNameDialog.SetText(callsign);
856 m_wCallsignName.SetColorInt(Color.DARK_MAGENTA);
857 m_wCallsignNameDialog.SetColorInt(Color.DARK_MAGENTA);
863 protected void CheckIfCanRespawn()
868 spawnPoint =
m_Base.GetSpawnPoint();
869 if (m_MobileAssembly)
884 curLayer = mapEnt.GetLayerIndex();
885 ChangeNameSizeOnLayerChange(curLayer);
886 SCR_MapEntity.GetOnLayerChanged().Insert(ChangeNameSizeOnLayerChange);
902 array<SCR_ServicePointComponent> available = {};
903 array<SCR_ServicePointDelegateComponent> built = {};
904 array<int> allServices = {};
909 base.GetServiceDelegates(built);
913 m_mServices.Set(
type,
null);
916 foreach (SCR_ServicePointDelegateComponent delegate : built)
918 m_mServices.Set(delegate.GetType(), delegate);
923 void ChangeBaseIconSize()
925 protected int m_iServicesLimit = 8;
926 protected int m_iServicesCount = 1;
928 array<SCR_EServicePointType> checkedTypes =
946 if (m_iServicesCount > m_iServicesLimit)
953 m_iBaseSize = m_iDefHQSize;
954 m_wImageOverlay.SetWidthOverride(m_iBaseSize);
955 m_wImageOverlay.SetHeightOverride(m_iBaseSize);
961 m_iBaseSize = m_iDefRelaySize;
962 m_wImageOverlay.SetWidthOverride(m_iBaseSize);
963 m_wImageOverlay.SetHeightOverride(m_iBaseSize);
967 m_iBaseSize = Math.Round(m_iDefBaseSize + ((m_iMaxBaseSize - m_iDefBaseSize) / m_iServicesLimit) * m_iServicesCount);
968 m_wImageOverlay.SetWidthOverride(m_iBaseSize);
969 m_wImageOverlay.SetHeightOverride(m_iBaseSize);
976 m_wLocalTask.SetEnabled(task !=
null);
977 m_wLocalTask.SetVisible(task !=
null);
980 task.SetWidgetIcon(m_wLocalTask);
984 override void ShowName(
bool visible)
986 m_wBaseName.SetVisible(visible);
987 m_wCallsignName.SetVisible(visible);
988 m_wBaseNameDialog.SetVisible(visible);
993 override vector GetPos()
996 return m_Base.GetOwner().GetOrigin();
998 if (m_MobileAssembly)
999 return m_MobileAssembly.GetOwner().GetOrigin();
1005 void ChangeNameSize(
bool visible)
1007 Widget w =
m_wRoot.FindAnyWidget(
"BaseNameFrame");
1010 m_wCallsignName.SetExactFontSize(24);
1013 m_fNameOffset = 0.3;
1014 m_wBaseName.SetVisible(
true);
1015 m_wCallsignName.SetExactFontSize(18);
1021 m_wCallsignName.SetExactFontSize(18);
1024 m_fNameOffset = 0.7;
1025 m_wBaseName.SetVisible(
false);
1026 m_wCallsignName.SetExactFontSize(12);
1032 void ChangeNameSizeOnLayerChange(
int layer)
1034 ChangeNameSize(layer <= 3);
1038 string GetFactionKey()
1043 Color GetFactionColor()
1054 void SetBaseIconFactionColor(
Faction faction)
1062 color = faction.GetFactionColor();
1064 color = GetColorForFaction(
"");
1066 m_wBaseIcon.SetColor(color);
1068 m_wGradient.SetColor(color);
1072 override void SetImage(
string image)
1085 TStringArray strs =
new TStringArray;
1087 image.Split(
"_", strs,
true);
1090 m_wBaseIcon.SetColor(factionColor);
1092 m_wGradient.SetColor(factionColor);
1100 switch (strs.Get(0))
1105 selection =
"Neutral_Select";
1106 highlight =
"Neutral_Installation_Focus_Land";
1107 m_wAntennaImg.SetVisible(
false);
1108 m_w_NameDialog = TextWidget.Cast(
m_wRoot.FindAnyWidget(
"m_w_NameDialog"));
1109 m_w_NameDialog.SetColor(Color.FromRGBA(0,177,79,255));
1115 selection =
"Hostile_Select";
1116 highlight =
"Hostile_Installation_Focus_Land";
1117 m_w_NameDialog = TextWidget.Cast(
m_wRoot.FindAnyWidget(
"m_w_NameDialog"));
1118 m_w_NameDialog.SetColor(Color.FromRGBA(238,49,47,255));
1124 selection =
"Friend_Select";
1125 highlight =
"Friend_Installation_Focus_Land";
1126 image.Replace(
"US",
"USSR");
1127 m_w_NameDialog = TextWidget.Cast(
m_wRoot.FindAnyWidget(
"m_w_NameDialog"));
1128 m_w_NameDialog.SetColor(Color.FromRGBA(31,195,243,255));
1134 selection =
"Unknown_Select";
1135 highlight =
"Unknown_Installation_Focus_Land";
1136 m_wAntennaImg.SetVisible(
false);
1137 m_w_NameDialog = TextWidget.Cast(
m_wRoot.FindAnyWidget(
"m_w_NameDialog"));
1138 m_w_NameDialog.SetColor(Color.FromRGBA(249,210,103,255));
1143 switch (strs.Get(1))
1148 m_wImageOverlay.SetWidthOverride(m_iDefRelaySize);
1149 m_wImageOverlay.SetHeightOverride(m_iDefRelaySize);
1150 m_wAntennaImg.SetVisible(
false);
1157 m_wAntennaImg.SetVisible(
false);
1158 m_wImageOverlay.SetWidthOverride(m_iDefRelaySize);
1159 m_wImageOverlay.SetHeightOverride(m_iDefRelaySize);
1164 spawnPoint =
m_Base.GetSpawnPoint();
1165 if (strs.Get(0) !=
"Unknown")
1169 m_wAntennaImg.SetVisible(
true);
1173 m_wAntennaImg.SetVisible(
false);
1176 if (strs.Get(2) ==
"Small")
1178 m_wImageOverlay.SetWidthOverride(38);
1179 m_wImageOverlay.SetHeightOverride(38);
1184 baseIcon.SetDimension(2);
1187 m_wHighlightImg.LoadImageFromSet(0, m_sImageSetARO, highlight);
1188 m_wSelectImg.LoadImageFromSet(0, m_sImageSetARO, selection);
1198 if (strs.Get(1) ==
"Mobile")
1207 override RplId GetSpawnPointId()
1211 return RplId.Invalid();
1215 void SetAntennaIconVisible(
bool visible)
1217 m_wAntennaImg.SetVisible(visible);
1223 s_SelectedElement =
null;