diff options
author | Vojtech Kral <vojtech@kral.hk> | 2019-04-01 16:36:48 +0300 |
---|---|---|
committer | Vojtech Kral <vojtech@kral.hk> | 2019-04-02 11:36:24 +0300 |
commit | c542413962eb4f49c28d19a36b4b9546a064968e (patch) | |
tree | 03392d6b2efe7e17c8ef14e4c0f355e38bec15ed /src/slic3r/GUI/ImGuiWrapper.hpp | |
parent | 145b8fd0dfa013d7965fba1ac8fb51694a2310d4 (diff) |
imgui: More refactoring, cut gizmo window positioning
Diffstat (limited to 'src/slic3r/GUI/ImGuiWrapper.hpp')
-rw-r--r-- | src/slic3r/GUI/ImGuiWrapper.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp index 476379da2..84a60e3d1 100644 --- a/src/slic3r/GUI/ImGuiWrapper.hpp +++ b/src/slic3r/GUI/ImGuiWrapper.hpp @@ -35,8 +35,7 @@ public: void set_language(const std::string &language); void set_display_size(float w, float h); - void set_font_size(float font_size); - void set_style_scaling(float scaling); + void set_scaling(float font_size, float scaling); bool update_mouse_data(wxMouseEvent &evt); bool update_key_data(wxKeyEvent &evt); @@ -47,7 +46,8 @@ public: void render(); float scaled(float x) const { return x * m_font_size * m_style_scaling; } - ImVec2 scaled_vec(float x, float y) const { return ImVec2(x * m_font_size * m_style_scaling, y * m_font_size * m_style_scaling); } + ImVec2 scaled(float x, float y) const { return ImVec2(x * m_font_size * m_style_scaling, y * m_font_size * m_style_scaling); } + ImVec2 calc_text_size(const wxString &text); void set_next_window_pos(float x, float y, int flag); void set_next_window_bg_alpha(float alpha); @@ -66,8 +66,6 @@ public: void text(const wxString &label); bool combo(const wxString& label, const std::vector<std::string>& options, int& selection); // Use -1 to not mark any option as selected - ImVec2 calc_text_size(const wxString &text); - void disabled_begin(bool disabled); void disabled_end(); |