Skip to content

Commit

Permalink
Ported to linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
anirul committed Mar 23, 2024
1 parent 11aa026 commit bca13af
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/frame/opengl/gui/sdl_opengl_draw_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,11 @@ void SDL2OpenGLDrawGui::AddWindow(
{
throw std::runtime_error("Cannot create a sub window without a name!");
}
window_callbacks_.insert(
{name, {std::move(callback), {0.0f, 0.0f}, {0.0f, 0.0f}}});
CallbackData callback_data;
callback_data.callback = std::move(callback);
callback_data.position = glm::vec2(0.0f, 0.0f);
callback_data.size = glm::vec2(0.0f, 0.0f);
window_callbacks_.emplace(name, std::move(callback_data));
}

void SDL2OpenGLDrawGui::AddOverlayWindow(
Expand All @@ -278,8 +281,11 @@ void SDL2OpenGLDrawGui::AddOverlayWindow(
throw std::runtime_error(
"Cannot create a sub window without a name!");
}
overlay_callbacks_.insert(
{name, {std::move(callback), position, size}});
CallbackData callback_data;
callback_data.callback = std::move(callback);
callback_data.position = position;
callback_data.size = size;
overlay_callbacks_.emplace(name, std::move(callback_data));
}

void SDL2OpenGLDrawGui::AddModalWindow(
Expand Down

0 comments on commit bca13af

Please sign in to comment.