| 349 | } |
| 350 | |
| 351 | void SetCurrentWindow(const sf::Window& window) |
| 352 | { |
| 353 | auto found = std::find_if(s_windowContexts.begin(), |
| 354 | s_windowContexts.end(), |
| 355 | [&](std::unique_ptr<WindowContext>& ctx) |
| 356 | { return ctx->window->getNativeHandle() == window.getNativeHandle(); }); |
| 357 | assert(found != s_windowContexts.end() && |
| 358 | "Failed to find the window. Forgot to call ImGui::SFML::Init for the window?"); |
| 359 | s_currWindowCtx = found->get(); |
| 360 | ImGui::SetCurrentContext(s_currWindowCtx->imContext); |
| 361 | } |
| 362 | |
| 363 | void ProcessEvent(const sf::Window& window, const sf::Event& event) |
| 364 | { |
no outgoing calls
no test coverage detected