Added generics

This commit is contained in:
Willem Cazander 2022-02-01 18:39:59 +01:00
parent cbd2d75c5f
commit 201f8f7ae3

View file

@ -48,7 +48,7 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.combo("Type", selectedBasePart, bases.toArray(items)); ImGui.combo("Type", selectedBasePart, bases.toArray(items));
String selectedItem = items[selectedBasePart.get()]; String selectedItem = items[selectedBasePart.get()];
Integer baseNumber = Integer.valueOf(selectedItem); Integer baseNumber = Integer.valueOf(selectedItem);
BassBone[] baseParts = BasePartFactory.buildBassBonesByBase(baseNumber); BassBone<?>[] baseParts = BasePartFactory.buildBassBonesByBase(baseNumber);
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV; int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
ImGui.beginTable("base-part", 10, flags); ImGui.beginTable("base-part", 10, flags);
@ -64,7 +64,7 @@ public class BasePartRenderer extends ImGuiRendererMain {
ImGui.tableSetupColumn("Alt4"); ImGui.tableSetupColumn("Alt4");
ImGui.tableHeadersRow(); ImGui.tableHeadersRow();
for (BassBone part:baseParts) { for (BassBone<?> part:baseParts) {
ImGui.tableNextRow(); ImGui.tableNextRow();
ImGui.tableNextColumn(); ImGui.tableNextColumn();
ImGui.text(part.name()); ImGui.text(part.name());