diff options
Diffstat (limited to 'src/guichan')
-rw-r--r-- | src/guichan/include/guichan/widget.hpp | 3 | ||||
-rw-r--r-- | src/guichan/widget.cpp | 8 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/guichan/include/guichan/widget.hpp b/src/guichan/include/guichan/widget.hpp index 4d43b5460..f4429dbee 100644 --- a/src/guichan/include/guichan/widget.hpp +++ b/src/guichan/include/guichan/widget.hpp @@ -367,7 +367,8 @@ namespace gcn * @see setVisible * @since 0.1.0 */ - bool isVisible() const; + bool isVisible() const + { return mVisible && (!mParent || mParent->isVisible()); } /** * Sets the base color of the widget. diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp index 8b68b8510..87d6fb635 100644 --- a/src/guichan/widget.cpp +++ b/src/guichan/widget.cpp @@ -304,14 +304,6 @@ namespace gcn mVisible = visible; } - bool Widget::isVisible() const - { - if (!mParent) - return mVisible; - else - return mVisible && mParent->isVisible(); - } - void Widget::setBaseColor(const Color& color) { mBaseColor = color; |