18 virtual void Create()
override;
19 virtual void Tick(
float deltaTime)
override;
24 void SetItemTemplate(
Scene* scene);
25 Scene* GetItemTemplate()
const;
28 void SetData(
const std::vector<Datum>& data);
29 void AddItem(
const Datum& data, int32_t index = -1);
30 void RemoveItem(int32_t index);
31 void UpdateItem(int32_t index,
const Datum& data);
33 int32_t GetItemCount()
const;
34 Datum GetItemData(int32_t index)
const;
37 void SetSpacing(
float spacing);
38 float GetSpacing()
const;
43 void SetItemWidth(
float width);
44 float GetItemWidth()
const;
45 void SetItemHeight(
float height);
46 float GetItemHeight()
const;
49 void SetSelectedIndex(int32_t index);
50 int32_t GetSelectedIndex()
const;
51 Datum GetSelectedData()
const;
52 void ClearSelection();
60 void ScrollToItem(int32_t index);
66 void EnsureContainers();
72 void UpdateContentSize();
74 void DestroyItem(int32_t index);
75 void UpdateItemIndices();
80 void FireSelectionChanged(int32_t index);
84 void OnItemClicked(int32_t index);
85 void OnItemHoverEnter(int32_t index);
86 void OnItemHoverExit(int32_t index);
90 float mSpacing = 0.0f;
92 float mItemWidth = 0.0f;
93 float mItemHeight = 0.0f;
94 int32_t mSelectedIndex = -1;