ImGui.NET
                                
                                
                                
                                    ImGui.NET copied to clipboard
                            
                            
                            
                        How to add new line after ~10 buttons?
I have a foreach that displays buttons and I want them to be displayed in a grid format (
)
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)
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