MCPcopy Create free account
hub / github.com/SFML/imgui-sfml / SetCurrentWindow

Function SetCurrentWindow

imgui-SFML.cpp:351–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351void 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
363void ProcessEvent(const sf::Window& window, const sf::Event& event)
364{

Callers 4

ProcessEventFunction · 0.85
UpdateFunction · 0.85
RenderFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected