Skip to content

Commit

Permalink
GUI dropdown fixes #407
Browse files Browse the repository at this point in the history
  • Loading branch information
Avalon2106 committed Dec 23, 2024
1 parent 40af521 commit 091c857
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ public void initGui()

//Ammo types
String[] names = AmmoRegistry.getAllAmmoItems().stream().map(IAmmoTypeItem::getName).toArray(String[]::new);
bulletList = new GuiButtonDropdownList(buttonList.size(), guiLeft+122, guiTop+20-6, 136, 12, 6, names);
bulletList = new GuiButtonDropdownList(buttonList.size(), guiLeft+122, guiTop+20-6, 68, 12, 6, names);
bulletList.setTranslationFunc(s -> I18n.format("item.immersiveintelligence."+s.toLowerCase()+".bullet.name"));

//Core types
String[] cores = Arrays.stream(tile.producedAmmo.getAllowedCoreTypes()).map(CoreType::getName).toArray(String[]::new);
typeList = new GuiButtonDropdownList(buttonList.size(), guiLeft+122, guiTop+20+32-8-7, 136, 12, 3, cores);
typeList = new GuiButtonDropdownList(buttonList.size(), guiLeft+122, guiTop+20+32-8-7, 68, 12, 3, cores);
typeList.setTranslationFunc(s -> I18n.format(IIReference.DESCRIPTION_KEY+"bullet_core_type."+s));
typeList.selectedEntry = Arrays.asList(cores).indexOf(tile.coreType.getName());
addButton(typeList);
Expand Down

0 comments on commit 091c857

Please sign in to comment.