Added SplashScreen

This commit is contained in:
YuSanka 2020-09-04 13:42:44 +02:00
parent c8133b91b7
commit 486c07702c

View File

@ -30,6 +30,7 @@
#include <wx/dialog.h>
#include <wx/textctrl.h>
#include <wx/splash.h>
#include "libslic3r/Utils.hpp"
#include "libslic3r/Model.hpp"
@ -436,6 +437,10 @@ bool GUI_App::on_init_inner()
// Let the libslic3r know the callback, which will translate messages on demand.
Slic3r::I18N::set_translate_callback(libslic3r_translate_callback);
wxBitmap bitmap = create_scaled_bitmap("wrench", nullptr, 400);
wxSplashScreen* scrn = new wxSplashScreen(bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_TIMEOUT, 2500, NULL, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFRAME_NO_TASKBAR | wxSIMPLE_BORDER | wxSTAY_ON_TOP);
wxYield();
// application frame
if (wxImage::FindHandler(wxBITMAP_TYPE_PNG) == nullptr)
wxImage::AddHandler(new wxPNGHandler());