Hint notification

Reads data from hints.ini. Has hyperlinks to highlight settings, toolbars and gizmos.
This commit is contained in:
David Kocik 2021-07-29 13:15:17 +02:00
parent 7fd34e52c1
commit 0d74502aeb
29 changed files with 2116 additions and 197 deletions

View file

@ -94,9 +94,11 @@ private:
mutable GLTexture m_icons_texture;
mutable bool m_icons_texture_dirty;
BackgroundTexture m_background_texture;
BackgroundTexture m_arrow_texture;
Layout m_layout;
EType m_current;
EType m_hover;
std::pair<EType, bool> m_highlight; // bool true = higlightedShown, false = highlightedHidden
std::vector<size_t> get_selectable_idxs() const;
std::vector<size_t> get_activable_idxs() const;
@ -128,6 +130,8 @@ public:
bool init();
bool init_arrow(const BackgroundTexture::Metadata& arrow_texture);
template<class Archive>
void load(Archive& ar)
{
@ -182,6 +186,7 @@ public:
EType get_current_type() const { return m_current; }
GLGizmoBase* get_current() const;
EType get_gizmo_from_name(const std::string& gizmo_name) const;
bool is_running() const;
bool handle_shortcut(int key);
@ -220,6 +225,8 @@ public:
void render_overlay() const;
void render_arrow(const GLCanvas3D& parent, EType highlighted_type) const;
std::string get_tooltip() const;
bool on_mouse(wxMouseEvent& evt);
@ -232,8 +239,13 @@ public:
int get_selectable_icons_cnt() const { return get_selectable_idxs().size(); }
int get_shortcut_key(GLGizmosManager::EType) const;
// To end highlight set gizmo = undefined
void set_highlight(EType gizmo, bool highlight_shown) { m_highlight = std::pair<EType, bool>(gizmo, highlight_shown); }
bool get_highlight_state() const { return m_highlight.second; }
private:
void render_background(float left, float top, float right, float bottom, float border) const;
void do_render_overlay() const;
float get_scaled_total_height() const;