Canvas' tooltip using ImGUI

This commit is contained in:
enricoturri1966 2020-03-17 13:01:38 +01:00
parent 12c0170e3c
commit 7a1fa3d847
3 changed files with 82 additions and 13 deletions

View file

@ -389,6 +389,17 @@ private:
void render(const std::vector<const ModelInstance*>& sorted_instances) const;
};
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
class Tooltip
{
std::string m_text;
public:
void set_text(const std::string& text) { m_text = text; }
void render(const Vec2d& mouse_position) const;
};
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
public:
enum ECursorType : unsigned char
{
@ -467,6 +478,9 @@ private:
int m_selected_extruder;
Labels m_labels;
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
mutable Tooltip m_tooltip;
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
public:
GLCanvas3D(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar);