/*
 * Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#include <imgui.h>

#include <turbine/gfx.hpp>

namespace studio::ig {

void centerNextWindow(turbine::Context &ctx) noexcept {
	auto const sz = turbine::getScreenSize(ctx);
	auto const screenW = static_cast<float>(sz.width);
	auto const screenH = static_cast<float>(sz.height);
	auto const mod = ImGui::GetWindowDpiScale() * 2;
	ImGui::SetNextWindowPos(ImVec2(screenW / mod, screenH / mod), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
}

}
