Skip to content

Setting up right aligned buttons with AlwaysAutoResize #9329

@Glorou

Description

@Glorou

Version/Branch of Dear ImGui:

Version 1.88, Branch: docking

Back-ends:

imgui_impl_win32_c#.cpp + imgui_impl_dx11_c#.cpp

Compiler, OS:

Windows 10 + MSVC 2022

Full config/build information:

No response

Details:

Hi there!

I want to use the AlwaysAutoResize window flag but I've run in to an issue where I've got some buttons that are aligned to the right side of my window with this snippet ImGui.SameLine(0, ImGui.GetContentRegionAvail().X - btnSpace); so normally they look like this:

Image

But using AutoResize breaks this and results in something like this:

ffxiv_dx11_RmKxikmtOv.mp4

Was wondering if you knew of a good way to right align these buttons such that they dont keep flying out infinitely while not hard coding the numerical values.
Thanks!

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions