We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I want to display a table containing HEX data in a UI, with a large amount of data. That's why I need to use the ImGuiListClipper object.
Unfortunately, this object does not contain the Begin, Step, and End methods.
public static void ShowHex(byte[] data) { ImGui.BeginTable("Hex", 16, ImGuiTableFlags.Resizable | ImGuiTableFlags.NoSavedSettings | ImGuiTableFlags.Borders, new Vector2(500, 0)); for (int i = 0; i <= 0xF; i++) { ImGui.TableSetupColumn(" " + i.ToString("X"), ImGuiTableColumnFlags.NoResize); } ImGui.TableHeadersRow(); int valuesPerRow = 16; for (int i = 0; i < data.Length; i += valuesPerRow) { ImGui.TableNextRow(); for (int j = 0; j < valuesPerRow; j++) { ImGui.TableNextColumn(); int index = i + j; if (index < data.Length) { var oct = data[index].ToString("X2"); ImGui.TextColored(oct == "00" ? (Vector4)Color.Gray : (Vector4)Color.WhiteSmoke, oct); } else { ImGui.Text(""); } } } ImGui.EndTable(); }
Is there perhaps another way to optimize the display of my table ?
Regards.
The text was updated successfully, but these errors were encountered:
Hello, this is how I use it:
var clipper = new ImGuiListClipperPtr(ImGuiNative.ImGuiListClipper_ImGuiListClipper()); clipper.Begin(data.Length, ImGui.GetTextLineHeightWithSpacing()); while (clipper.Step()) { for (var i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) { ... } } clipper.Destroy();
Sorry, something went wrong.
No branches or pull requests
Hello,
I want to display a table containing HEX data in a UI, with a large amount of data.
That's why I need to use the ImGuiListClipper object.
Unfortunately, this object does not contain the Begin, Step, and End methods.
Is there perhaps another way to optimize the display of my table ?
Regards.
The text was updated successfully, but these errors were encountered: