mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
imgui: Refactor, use in cut gizmo
This commit is contained in:
parent
763b443459
commit
c29493a41b
15 changed files with 315 additions and 157 deletions
|
@ -32,9 +32,6 @@
|
|||
#include <I18N.hpp>
|
||||
#include <wx/wupdlock.h>
|
||||
#include "SysInfoDialog.hpp"
|
||||
#if ENABLE_IMGUI
|
||||
#include <imgui\imgui.h>
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
@ -58,11 +55,16 @@ const wxString file_wildcards[FT_SIZE] = {
|
|||
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
|
||||
|
||||
IMPLEMENT_APP(GUI_App)
|
||||
|
||||
GUI_App::GUI_App()
|
||||
: wxApp()
|
||||
, m_imgui(new ImGuiWrapper())
|
||||
{}
|
||||
|
||||
bool GUI_App::OnInit()
|
||||
{
|
||||
#if ENABLE_IMGUI
|
||||
if (!m_imgui.init())
|
||||
return false;
|
||||
wxCHECK_MSG(m_imgui->init(), false, "Failed to initialize ImGui");
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
SetAppName("Slic3rPE-alpha");
|
||||
|
@ -185,14 +187,6 @@ bool GUI_App::OnInit()
|
|||
return true;
|
||||
}
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
int GUI_App::OnExit()
|
||||
{
|
||||
m_imgui.shutdown();
|
||||
return 0;
|
||||
}
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
unsigned GUI_App::get_colour_approx_luma(const wxColour &colour)
|
||||
{
|
||||
double r = colour.Red();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue