HiImKyle pls say how you create filtering in item giver ( i create it but it glitchy grid layout wokring bad if i filtering text this is my code
ImGui.Begin("Item Giver");
ItemGiverFilter.Draw("");
ImGui.SliderInt("Count", ref ItemGiverItemsCount, 1, 999, ItemGiverItemsCount.ToString());
foreach (var (item, index) in RegisteredItemIds.WithIndex()) {
if (!ItemGiverFilter.PassFilter(item.Key.Value)) {
continue;
}
// yes i took it from imgui issues on ******
if (index > 0 && index % (Math.Round(ImGui.GetWindowSize().x / 41)) == 0) ImGui.NewLine();
if (ImGui.ImageButton(item.Value, new ImVec2(27, 27), new ImVec2(0, 0), new ImVec2(1, 1), 0, new ImVec4(0, 0, 0, 0), new ImVec4(1, 1, 1, 1))) {
Hacks.LocalPlayer.QuickSpawnItem(new EntitySource_Film(), item.Key.Key, ItemGiverItemsCount);
}
ImGui.SameLine();
}
ImGui.End();
video: https ://dri ve .go ogle .c om /fil e/d/1FN cqwYi 8tCuIS nuds MfWx Uvy9A MEt3n_/vie w?usp =s harin g (without spaces)
- - - Updated - - -
UPD: I think I can somehow fix this, but I need not to draw only the last elements, it don't draw random ones, and because of this, somewhere there are more buttons and somewhere less
- - - Updated - - -
but i don't know how....