8 protected bool m_bEnabled;
9 protected string m_sServiceName;
10 protected string m_sServiceIcon;
11 protected string m_sServiceText;
14 override bool OnMouseEnter(Widget w,
int x,
int y)
16 PlayHoverSound(m_sSoundService);
26 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
36 override bool OnClick(Widget w,
int x,
int y,
int button)
42 mapa.ZoomPanSmooth(10, pos[0], pos[2]);
49 override void AnimExpand()
54 override void AnimCollapse()
59 override void HandlerAttached(Widget w)
61 super.HandlerAttached(w);
66 void ShowHint(
bool show)
75 if (base.GetFaction() == playerFaction)
77 int supplies = base.GetSupplies();
78 int suppliesMax = base.GetSuppliesMax();
80 m_sServiceText =
"#AR-Campaign_BaseSuppliesHintAmount";
81 m_ParentBase.ShowServiceHint(m_sServiceName, m_sServiceText, show, supplies, suppliesMax);
85 m_sServiceText =
"#AR-Campaign_BaseSuppliesHintUnknown";
86 m_ParentBase.ShowServiceHint(m_sServiceName, m_sServiceText, show);
91 m_ParentBase.ShowServiceHint(m_sServiceName, m_sServiceText, show);
97 void SetServiceImage()
99 switch (m_eServiceType)
103 SetImage(m_sBarracks);
104 m_sServiceName =
"#AR-Campaign_Building_Barracks";
109 SetImage(m_sFieldHospital);
110 m_sServiceName =
"#AR-Campaign_Building_FieldHospital";
115 SetImage(m_sLightVehicleDepot);
116 m_sServiceName =
"#AR-Comm_Variable_Miscellaneous_LightVehicleDepot";
121 SetImage(m_sHeavyVehicleDepot);
122 m_sServiceName =
"#AR-Comm_Variable_Miscellaneous_HeavyVehicleDepot";
127 SetImage(m_sRadioAntenna);
128 m_sServiceName =
"#AR-Comm_Variable_Miscellaneous_RadioAntenna";
133 SetImage(m_sSupplyDepot);
134 m_sServiceName =
"#AR-Comm_Variable_Miscellaneous_Supplydepot_US";
140 m_sServiceName =
"#AR-Campaign_Building_Armory";
145 SetImage(m_sFuelDepot);
146 m_sServiceName =
"#AR-Comm_Variable_Miscellaneous_Fueldepot_US";
151 SetImage(m_sHelipad);
152 m_sServiceName =
"#AR-EditableEntity_Helipad_L_US_01_Name";
173 m_eServiceType =
type;
179 IEntity owner = service.GetOwner();
197 override void SetImage(
string image)
199 m_sServiceIcon = image;
200 string suffix =
string.Empty;