mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 20:03:41 +01:00
Simplify ImGuiListClipper initialization
This commit is contained in:
parent
d25b16aa93
commit
a1b8dbcf27
7 changed files with 12 additions and 31 deletions
|
|
@ -112,10 +112,7 @@ internal class ConsoleWindow : Window, IDisposable
|
|||
|
||||
this.configuration.DalamudConfigurationSaved += this.OnDalamudConfigurationSaved;
|
||||
|
||||
unsafe
|
||||
{
|
||||
this.clipperPtr = new(ImGui.ImGuiListClipper());
|
||||
}
|
||||
this.clipperPtr = ImGui.ImGuiListClipper();
|
||||
}
|
||||
|
||||
/// <summary>Gets the queue where log entries that are not processed yet are stored.</summary>
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget
|
|||
var addon = Service<DataManager>.GetNullable()?.GetExcelSheet<Addon>() ??
|
||||
throw new InvalidOperationException("Addon sheet not loaded.");
|
||||
|
||||
var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper());
|
||||
var clipper = ImGui.ImGuiListClipper();
|
||||
clipper.Begin(addon.Count);
|
||||
while (clipper.Step())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ internal class TexWidget : IDataWindowWidget
|
|||
sortSpecs.SpecsDirty = false;
|
||||
}
|
||||
|
||||
var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper());
|
||||
var clipper = ImGui.ImGuiListClipper();
|
||||
clipper.Begin(allBlames.Count);
|
||||
|
||||
while (clipper.Step())
|
||||
|
|
@ -538,7 +538,7 @@ internal class TexWidget : IDataWindowWidget
|
|||
(ImGui.GetStyle().ItemSpacing.X * 1 * numIcons));
|
||||
ImGui.TableHeadersRow();
|
||||
|
||||
var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper());
|
||||
var clipper = ImGui.ImGuiListClipper();
|
||||
clipper.Begin(textures.Count);
|
||||
|
||||
using (var enu = textures.GetEnumerator())
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ internal class UiColorWidget : IDataWindowWidget
|
|||
ImGui.TableSetupColumn("Clear Blue", ImGuiTableColumnFlags.WidthFixed, colorw);
|
||||
ImGui.TableHeadersRow();
|
||||
|
||||
var clipper = new ImGuiListClipperPtr(ImGui.ImGuiListClipper());
|
||||
var clipper = ImGui.ImGuiListClipper();
|
||||
clipper.Begin(colors.Count, ImGui.GetFrameHeightWithSpacing());
|
||||
while (clipper.Step())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue