4 int m_VisibleColumnCount;
15 Widget child = GetRootWidget().GetChildren();
18 child = child.GetSibling();
24 override void SetDefaultFocus(
bool while_micromanagment_mode =
false )
27 for (
int i = 0; i < GetColumnCount(); i++)
37 SetFocus( m_FocusedColumn );
40 override void SetLastFocus()
45 void SetFocus(
int index )
47 if ( index >= 0 && index < m_Icons.Count() )
49 m_Icons.Get( index ).GetSelectedPanel().Show(
true );
54 void SetVisibleFocus(
int index )
57 int visible_icons_count = 0;
60 for (
int i = 0; i < GetColumnCount(); i++)
66 if (visible_icons_count == index)
68 visible_icons_count++;
72 SetFocus( m_FocusedColumn );
77 int visible_icons_count = 0;
78 for (
int i = 0; i < GetColumnCount(); i++)
80 if (m_FocusedColumn == i)
82 return visible_icons_count;
87 visible_icons_count++;
90 return visible_icons_count - 1;
93 override void SetNextRightActive()
97 int index = m_FocusedColumn + 1;
98 for (
int i = 0; i < GetColumnCount(); i++ )
100 if (index >= GetColumnCount())
105 if (icon.IsVisible())
107 m_FocusedColumn = index;
116 override void SetNextLeftActive()
120 int index = m_FocusedColumn - 1;
121 for (
int i = 0; i < GetColumnCount(); i++ )
125 index = GetColumnCount() - 1;
128 if (icon.IsVisible())
130 m_FocusedColumn = index;
142 SlotsIcon icon = GetSlotIcon( m_FocusedColumn );
144 icon.GetSelectedPanel().Show(
true );
145 icon.GetSelectedPanel().GetScreenPos(
x,
y );
147 EntityAI focused_item = GetFocusedItem();
150 PrepareOwnedTooltip( focused_item, -1,
y );
154 PrepareOwnedSlotsTooltip( icon.GetSelectedPanel(), icon.GetSlotDisplayName(), icon.GetSlotDesc(),
x,
y );
158 override void UnfocusAll()
160 for (
int i = 0; i < m_Icons.Count(); i++)
162 m_Icons.Get( i ).GetSelectedPanel().Show(
false );
166 override void Unfocus()
168 Widget w = m_Icons.Get( m_FocusedColumn ).GetSelectedPanel();
175 override bool SelectItem()
180 if( item && !item.IsLockedInSlot() && !icon.IsOutOfReach() && !icon.IsReserved() && item.IsTakeable() && item.CanPutIntoHands(
null))
182 ItemManager.GetInstance().SetSelectedItemEx(item,
null, icon);
188 override bool IsEmpty()
193 override bool IsDisplayable()
197 for (
int i = 0; i < m_ColumnCount; i++)
209 if ( m_Icons.IsValidIndex( index ) )
211 return m_Icons.Get( index );
221 return m_Icons.Get(m_FocusedColumn);
228 SlotsIcon focus_icon = GetFocusedSlotsIcon();
230 if(focus_icon && !focus_icon.IsReserved())
232 return EntityAI.Cast(focus_icon.GetObject());
238 override void SetLayoutName()
240 #ifdef PLATFORM_CONSOLE
266 bool VerifySlotsIconVisibility(
int idx = -1)
270 return m_Icons[idx].IsVisible() && m_Icons[idx].GetRadialIconPanel().IsVisible() && m_Icons[idx].GetRadialIcon().IsVisible();
274 int count = m_Icons.Count();
275 for (
int i = 0; i < count; i++)