Add tooltip for 'record in low-power mode'

This commit is contained in:
dec05eba
2026-01-18 15:25:49 +01:00
parent 74bb6f0070
commit 86424607b7
16 changed files with 225 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
#include <mglpp/system/vec.hpp>
#include <memory>
#include <string>
namespace mgl {
class Event;
@@ -44,9 +45,14 @@ namespace gsr {
Alignment get_vertical_alignment() const;
void set_visible(bool visible);
bool is_visible() const;
Widget* get_parent_widget();
void set_tooltip_text(std::string text);
const std::string& get_tooltip_text() const;
void handle_tooltip_event(mgl::Event &event, mgl::vec2f position, mgl::vec2f size);
void *userdata = nullptr;
protected:
void set_widget_as_selected_in_parent();
@@ -61,8 +67,13 @@ namespace gsr {
Alignment vertical_aligment = Alignment::START;
bool visible = true;
std::string tooltip_text;
};
void add_widget_to_remove(std::unique_ptr<Widget> widget);
void remove_widgets_to_be_removed();
void set_current_tooltip(Widget *widget);
void remove_as_current_tooltip(Widget *widget);
void draw_tooltip(mgl::Window &window);
}