From a3e479d5b289166ff651fac4ff046656cf78cda0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 7 Aug 2024 00:21:32 +0200 Subject: Add radio button with simple/advanced view, add widget visibility --- src/gui/Label.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/Label.cpp') 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 -- cgit v1.2.3