[feat] add close button in control bar

This commit is contained in:
dijunkun
2024-09-12 16:22:02 +08:00
parent d493b9a131
commit c3af40a3f0
4 changed files with 46 additions and 28 deletions

View File

@@ -24,6 +24,9 @@
SDL_HitTestResult Render::HitTestCallback(SDL_Window *window,
const SDL_Point *area, void *data) {
Render *render = (Render *)data;
if (!render) {
return SDL_HITTEST_NORMAL;
}
int window_width, window_height;
SDL_GetWindowSize(window, &window_width, &window_height);
@@ -387,7 +390,8 @@ int Render::Run() {
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO &io = ImGui::GetIO();
// Master keyboard navigation enable flag. Enable full Tabbing + directional
// arrows + space/enter to activate.
io.ConfigFlags |=
ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |=