#pragma once #include "UIControl_Base.h" class UIControl_List : public UIControl_Base { private: std::vector m_list; protected: IggyName m_removeAllItemsFunc, m_funcHighlightItem, m_funcRemoveItem, m_funcCanTouchFocus, m_funcSetTouchFocus, m_funcCanTouchTrigger, m_funcEnableItem, m_funcSetItemLabel, m_funcGetItemLabel; int m_itemCount; int m_iCurrentSelection; public: UIControl_List(); ~UIControl_List(); virtual bool setupControl(UIScene* scene, IggyValuePath* parent, const std::string& controlName); void init(int id); virtual void ReInit(); virtual void tick(); void clearList(); void removeItem(int index); int getItemCount(); void setCurrentSelection(int iSelection); int getCurrentSelection(); void updateChildFocus(int iChild); void SetTouchFocus(S32 iX, S32 iY, bool bRepeat); bool CanTouchTrigger(S32 iX, S32 iY); void addElement(eUIControlType type, int index); int getListIndex(int id); };