Minor cleanup & documentation in ListWidget
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5347 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c731ae5fc4
commit
a30c7fb403
@ -91,15 +91,6 @@ void ListWidget::addItem(const char* item)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
int ListWidget::getSelection() const
|
||||
{
|
||||
const IGUIListBox* list = getIrrlichtElement<IGUIListBox>();
|
||||
assert(list != NULL);
|
||||
return list->getSelected();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
std::string ListWidget::getSelectionName() const
|
||||
{
|
||||
const IGUIListBox* list = getIrrlichtElement<IGUIListBox>();
|
||||
|
@ -39,13 +39,18 @@ namespace GUIEngine
|
||||
|
||||
SkinWidgetContainer m_selection_skin_info;
|
||||
|
||||
void add();
|
||||
void addItem(const char* item);
|
||||
/** \brief implement add method from base class GUIEngine::Widget */
|
||||
virtual void add();
|
||||
|
||||
/** \brief implement callback from base class GUIEngine::Widget */
|
||||
virtual void unfocused(const int playerID);
|
||||
|
||||
// ---- contents management
|
||||
|
||||
/** \brief add an item to the list */
|
||||
void addItem(const char* item);
|
||||
|
||||
int getSelection() const;
|
||||
std::string getSelectionName() const;
|
||||
/** \brief erases all items in the list */
|
||||
void clear();
|
||||
|
||||
/** \return the number of items in the list */
|
||||
@ -54,6 +59,9 @@ namespace GUIEngine
|
||||
/** \return the index of the selected element within the list, or -1 if none */
|
||||
int getSelectionID() const;
|
||||
|
||||
/** \return the text of the selected item */
|
||||
std::string getSelectionName() const;
|
||||
|
||||
/**
|
||||
* \brief change the selected item
|
||||
* \param index the index of the element to select within the list, or -1 to select nothing
|
||||
|
Loading…
Reference in New Issue
Block a user