Lay out the overlay panels in a fixed 3-column scheme
Panels used to Begin at cascade positions, so they overlapped and clipped. A new apply_panel_layout() in app_chrome positions/sizes each panel from the main viewport work area (ImGuiCond_FirstUseEver, still movable): Injection left column full height (room for hook diagnostics), Controllers/Video/Audio stacked in the center column, Log right edge full height (max room for the log stream). Added a "View -> Reset layout" menu item (request_layout_reset / apply_layout_end_frame re-apply the defaults once via ImGuiCond_Always). Each panel now calls apply_panel_layout(Panel::X) instead of its own ad-hoc SetNextWindowPos/Size. Verified live: captured the host overlay -- Injection (left, full height), Controllers/Video/Audio (center stack), Log (right, full height), no overlap among the panels. x64 build + ctest green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
#include "ui/app_chrome.hpp"
|
||||
|
||||
namespace coop
|
||||
{
|
||||
|
||||
@@ -67,8 +69,7 @@ void draw_pad(int index, const PadInfo& pad, bool debug_details)
|
||||
|
||||
void ControllersPanel::draw(const InputSource& input, const HookStatusView& status, bool debug_details)
|
||||
{
|
||||
ImGui::SetNextWindowPos(ImVec2(24, 40), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2(420, 0), ImGuiCond_FirstUseEver);
|
||||
apply_panel_layout(Panel::Controllers);
|
||||
ImGui::Begin("Controllers");
|
||||
|
||||
ImGui::Text("Input backend: %s", input.name());
|
||||
|
||||
Reference in New Issue
Block a user