Besides some cosmetic changes added & to setSelection parameter.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9919 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-09-30 01:07:05 +00:00
parent 798576ef12
commit b5c3266d2e
2 changed files with 14 additions and 6 deletions

View File

@ -1045,7 +1045,9 @@ bool DynamicRibbonWidget::findItemInRows(const char* name, int* p_row, int* p_id
// -----------------------------------------------------------------------------
bool DynamicRibbonWidget::setSelection(int item_id, const int playerID, const bool focusIt, bool evenIfDeactivated)
bool DynamicRibbonWidget::setSelection(int item_id, const int playerID,
const bool focusIt,
bool evenIfDeactivated)
{
if (m_deactivated && !evenIfDeactivated) return false;
@ -1100,8 +1102,10 @@ bool DynamicRibbonWidget::setSelection(int item_id, const int playerID, const bo
propagateSelection();
return true;
}
// -----------------------------------------------------------------------------
bool DynamicRibbonWidget::setSelection(const std::string item_codename, const int playerID, const bool focusIt, bool evenIfDeactivated)
// ----------------------------------------------------------------------------
bool DynamicRibbonWidget::setSelection(const std::string &item_codename,
const int playerID, const bool focusIt,
bool evenIfDeactivated)
{
if (m_deactivated && !evenIfDeactivated) return false;

View File

@ -39,8 +39,10 @@ namespace GUIEngine
{
public:
virtual ~DynamicRibbonHoverListener() {}
virtual void onSelectionChanged(DynamicRibbonWidget* theWidget, const std::string& selectionID,
const irr::core::stringw& selectionText, const int playerID) = 0;
virtual void onSelectionChanged(DynamicRibbonWidget* theWidget,
const std::string& selectionID,
const irr::core::stringw& selectionText,
const int playerID) = 0;
};
/** The description of an item added to a DynamicRibbonWidget */
@ -259,7 +261,9 @@ namespace GUIEngine
*
* \return Whether setting the selection was successful (whether the item exists)
*/
bool setSelection(const std::string item_codename, const int playerID, const bool focusIt, bool evenIfDeactivated=false);
bool setSelection(const std::string &item_codename,
const int playerID, const bool focusIt,
bool evenIfDeactivated=false);
/** \brief Callback from parent class Widget. */
virtual void elementRemoved();