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:
parent
798576ef12
commit
b5c3266d2e
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user