ImGui.NET icon indicating copy to clipboard operation
ImGui.NET copied to clipboard

How to add new line after ~10 buttons?

Open iocmet opened this issue 3 years ago • 1 comments

I have a foreach that displays buttons and I want them to be displayed in a grid format ( image )

iocmet avatar Jun 08 '22 00:06 iocmet

Currently i use if (index % (Math.Round(ImGui.GetWindowSize().x / 41)) != 0) ImGui.NewLine(); but it works a little bad with the filter (i use filter to filter buttons)

iocmet avatar Jun 08 '22 01:06 iocmet

I fixed it recently, it because index is for cycle index but i using continue; to skip elements that not match filter, i created other variable that increases only on match and it works

iocmet avatar Nov 29 '22 20:11 iocmet