diff options
Diffstat (limited to 'src/gui/Label.cpp')
-rw-r--r-- | src/gui/Label.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/Label.cpp b/src/gui/Label.cpp index 08f720b..09fd1a6 100644 --- a/src/gui/Label.cpp +++ b/src/gui/Label.cpp @@ -11,11 +11,17 @@ namespace gsr { } void Label::draw(mgl::Window &window, mgl::vec2f offset) { + if(!visible) + return; + text.set_position((position + offset).floor()); window.draw(text); } mgl::vec2f Label::get_size() { + if(!visible) + return {0.0f, 0.0f}; + return text.get_bounds().size; } }
\ No newline at end of file |