Added method to check if a widget is active or not

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13296 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
unitraxx 2013-07-20 15:46:25 +00:00
parent e065870037
commit 4a96c67697
2 changed files with 11 additions and 0 deletions

View File

@ -327,6 +327,15 @@ bool Widget::isVisible() const
// -----------------------------------------------------------------------------
bool Widget::isActivated() const
{
if (isVisible())
return !m_deactivated;
return false;
}
// -----------------------------------------------------------------------------
void Widget::setVisible(bool visible)
{
if (m_element != NULL)

View File

@ -326,6 +326,8 @@ namespace GUIEngine
/** Returns if the element is visible. */
bool isVisible() const;
bool isActivated() const;
/**
* Call to resize/move the widget. Not all widgets can resize gracefully.
*/