3 protected Widget m_MainWidget;
7 protected string m_LayoutName;
10 protected bool m_ImmedUpdate;
11 protected bool m_TooltipOwner;
13 protected EntityAI m_am_entity1, m_am_entity2;
22 m_ImmedUpdate =
false;
33 void OnSelectActionEx(
EntityAI item,
int actionId)
52 if (m_am_entity1 == null)
55 TSelectableActionInfoArrayEx customActions =
new TSelectableActionInfoArrayEx();
61 m_player.GetDebugActions(customActions);
64 int actionsCount = customActions.Count();
65 for (
int i = 0; i < customActions.Count(); i++)
70 int actionId = actionInfo.param2;
71 int textColor = actionInfo.param4;
72 string actionText = actionInfo.param3;
75 cmenu.AddEx(actionText, textColor,
this,
"", null);
81 int actionMenuPosX, actionMenuPosY;
85 cmenu.Show(actionMenuPosX, actionMenuPosY);
97 m_TooltipOwner =
false;
99 if ( m_LayoutName !=
"" )
101 m_MainWidget =
GetGame().GetWorkspace().CreateWidgets( m_LayoutName, null,
false );
102 m_MainWidget.Show(
true,
false );
119 m_MainWidget.Update();
142 void SetParentWidget()
166 Widget GetMainWidget()
171 Widget GetRootWidget()
210 InspectMenuNew inspect_menu = InspectMenuNew.Cast( menu.EnterScriptedMenu(
MENU_INSPECT) );
213 GetGame().GetMission().GetHud().ShowHudUI(
false );
214 GetGame().GetMission().GetHud().ShowQuickbarUI(
false );
215 inspect_menu.SetItem( item );
222 void PrepareOwnedTooltip(
EntityAI item,
int x = 0,
int y = 0)
225 m_TooltipOwner =
true;
228 void PrepareOwnedSlotsTooltip(Widget w,
string name,
string desc,
int x = 0,
int y = 0)
232 m_TooltipOwner =
true;
235 void HideOwnedTooltip()
240 m_TooltipOwner =
false;
244 void HideOwnedSlotsTooltip()
249 m_TooltipOwner =
false;
Param4< int, int, string, int > TSelectableActionInfoWithColor
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
void PrepareTooltip(EntityAI item, int x=0, int y=0)
void PrepareSlotsTooltip(string name, string desc, int x=0, int y=0)
position is currentlycalculated from the owning 'm_TooltipSourceWidget' directly
void SetTooltipWidget(Widget w)
static ItemManager GetInstance()
override void UpdateInterval()
override void SetFirstActive()
override void SetLayoutName()
override void SetLastActive()
override void UpdateSelectionIcons()
proto native CGame GetGame()
proto void GetMousePos(out int x, out int y)
void OnSelectAction(EntityAI ent, int actionId)
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]