21 m_Root =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/dropdown_prefab/dropdown_prefab.layout",
root);
24 m_ContentContainer =
m_Root.FindAnyWidget(
"dropdown_content");
26 m_Holder =
m_Root.FindAnyWidget(
"holder");
29 m_Button =
m_Root.FindAnyWidget(
"dropdown_selector_button");
43 if (m_Content.Find(
child) > -1)
44 m_Content.Insert(
child);
47 m_ContentContainer.Update();
51 m_ContentContainer.GetScreenSize(
x,
y);
52 if (
y > m_Scroller.GetContentHeight())
53 m_Scroller.SetAlpha(1);
55 m_Scroller.SetAlpha(0);
66 m_ContentContainer.Update();
72 return m_Content.Count() - 1;
79 delete m_Content.Get(
index);
80 m_ContentContainer.Update();
107 int index = m_Content.Find(
w);
110 m_OnSelectItem.Invoke(
index);
131 m_ContentContainer.Update();
ScriptInvoker Class provide list of callbacks usage:
proto native CGame GetGame()