mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added ImGuiWrapper
This commit is contained in:
parent
5c054d11ca
commit
57e9d28a84
9 changed files with 772 additions and 0 deletions
|
@ -32,6 +32,9 @@
|
|||
#include <I18N.hpp>
|
||||
#include <wx/wupdlock.h>
|
||||
#include "SysInfoDialog.hpp"
|
||||
#if ENABLE_IMGUI
|
||||
#include <imgui\imgui.h>
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
@ -57,6 +60,11 @@ static std::string libslic3r_translate_callback(const char *s) { return wxGetTra
|
|||
IMPLEMENT_APP(GUI_App)
|
||||
bool GUI_App::OnInit()
|
||||
{
|
||||
#if ENABLE_IMGUI
|
||||
if (!m_imgui.init())
|
||||
return false;
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
SetAppName("Slic3rPE-alpha");
|
||||
SetAppDisplayName("Slic3r Prusa Edition");
|
||||
|
||||
|
@ -177,6 +185,14 @@ 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