MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / TranslateWindow

Function TranslateWindow

imgui_tiny_app/imgui/imgui.cpp:5548–5558  ·  view source on GitHub ↗

This is called during NewFrame()->UpdateViewportsNewFrame() only. Need to keep in sync with SetWindowPos()

Source from the content-addressed store, hash-verified

5546// This is called during NewFrame()->UpdateViewportsNewFrame() only.
5547// Need to keep in sync with SetWindowPos()
5548static void TranslateWindow(ImGuiWindow* window, const ImVec2& delta)
5549{
5550 window->Pos += delta;
5551 window->ClipRect.Translate(delta);
5552 window->OuterRectClipped.Translate(delta);
5553 window->InnerRect.Translate(delta);
5554 window->DC.CursorPos += delta;
5555 window->DC.CursorStartPos += delta;
5556 window->DC.CursorMaxPos += delta;
5557 window->DC.IdealMaxPos += delta;
5558}
5559
5560static void ScaleWindow(ImGuiWindow* window, float scale)
5561{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected