3 protected const int MOD_DISPLAY_COUNT_MAX = 3;
6 protected Widget m_MoreButton;
7 protected Widget m_MoreHighlight;
9 protected ModsMenuDetailed m_DetailMenu;
13 m_Root =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/mods_menu/mods_menu_simple.layout", parent);
14 m_MoreButton =
m_Root.FindAnyWidget(
"ModMore");
15 m_MoreHighlight =
m_Root.FindAnyWidget(
"ModMoreOverlay");
17 m_DetailMenu = detail_menu;
23 void ~ModsMenuSimple()
30 m_MoreButton.Show(data.Count() > MOD_DISPLAY_COUNT_MAX);
31 int count =
Math.Clamp(data.Count(),0,MOD_DISPLAY_COUNT_MAX);
33 for (
int i = 0; i < count; i++)
35 ref ModsMenuSimpleEntry entry =
new ModsMenuSimpleEntry(data[i], i,
m_Root,
this);
36 m_Data.Insert(data[i], entry);
43 m_DetailMenu.Highlight(mod);
48 if (w == m_MoreButton)
50 if (m_DetailMenu.IsOpen())
61 if (w == m_MoreButton)
63 m_MoreHighlight.Show(
true);
71 if (enterW != m_MoreButton)
73 m_MoreHighlight.Show(
false);
81 if (w == m_MoreButton)
83 m_MoreHighlight.Show(
true);
91 if (w == m_MoreButton)
93 m_MoreHighlight.Show(
false);