mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Canvas' tooltip using ImGUI
This commit is contained in:
parent
12c0170e3c
commit
7a1fa3d847
3 changed files with 82 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue