24{
25
26 IMGUI_CHECKVERSION();
27 ImGui::CreateContext();
28 ImGui::StyleColorsClassic();
29
30
31 ImGuiIO &io = ImGui::GetIO(); (void)io;
32 io.ConfigWindowsMoveFromTitleBarOnly = true;
33 io.ConfigFlags |= ImGuiConfigFlags_NavNoCaptureKeyboard;
34 io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
35 io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
36 io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable &&
38
39
40 SetUpTheme();
41
42
43#ifdef SCL_PLATFORM_WINDOWS
44 const application &app = application::Get();
45 ImGui_ImplWin32_Init(app.GetWindow().GetHandle());
46#else
47# error Other platforms currently dont support GUI
48#endif
49
50
52 {
55 default:
SCL_CORE_ASSERT(0,
"Other platforms currently dont support GUI");
return;
56 }
57
58
59 event_dispatcher::AddEventListner<keyboard_event>([&io](keyboard_event &) { return io.WantCaptureKeyboard; });
60 event_dispatcher::AddEventListner<mouse_button_event>([&io](mouse_button_event &) { return io.WantCaptureMouse; });
61 event_dispatcher::AddEventListner<mouse_move_event>([&io](mouse_move_event &) { return io.WantCaptureMouse; });
62 event_dispatcher::AddEventListner<mouse_wheel_event>([&io](mouse_wheel_event &) { return io.WantCaptureMouse; });
63
65}