forked from SteamWar/SteamWar
Give particle menus a shared bottom bar
Back, use, add, rename, icon, particle count and delete or reset now sit in the same column of the last row in every particle menu, and columns a menu does not use show a barrier.
This commit is contained in:
@@ -50,9 +50,10 @@ class EntryEditor {
|
||||
private final int ROW_SHAPE = 2;
|
||||
private final int ROW_TIMING = 3;
|
||||
private final int ROW_CONDITIONS = 4;
|
||||
private final int BACK = 45;
|
||||
private final int COST = 49;
|
||||
private final int DELETE = 53;
|
||||
private final int SIZE = 54;
|
||||
private final int BACK = BottomBar.position(SIZE, BottomBar.BACK);
|
||||
private final int COST = BottomBar.position(SIZE, BottomBar.COST);
|
||||
private final int DELETE = BottomBar.position(SIZE, BottomBar.DELETE);
|
||||
|
||||
private final Map<Parameter<?>, Material> ICONS = Map.ofEntries(
|
||||
Map.entry(COUNT, Material.GLOWSTONE_DUST),
|
||||
@@ -97,7 +98,7 @@ class EntryEditor {
|
||||
ParticleEntry entry = context.entry();
|
||||
ParticleDesign design = entry.getDesign();
|
||||
|
||||
SWInventory inventory = new SWInventory(player, 54, msg("PARTICLE_ENTRY_EDITOR", player, designName(design, player)));
|
||||
SWInventory inventory = new SWInventory(player, SIZE, msg("PARTICLE_ENTRY_EDITOR", player, designName(design, player)));
|
||||
header(inventory, ROW_DESIGN, Material.PAINTING, "PARTICLE_SECTION_DESIGN", player);
|
||||
header(inventory, ROW_PARTICLE, Material.FIREWORK_STAR, "PARTICLE_SECTION_PARTICLE", player);
|
||||
header(inventory, ROW_SHAPE, Material.ARMOR_STAND, "PARTICLE_SECTION_SHAPE", player);
|
||||
@@ -128,7 +129,8 @@ class EntryEditor {
|
||||
SlotEditor.save(player, index, slot);
|
||||
SlotEditor.open(player, index);
|
||||
}));
|
||||
SlotEditor.fill(inventory, 0, 54);
|
||||
BottomBar.fillUnused(inventory, SIZE, false);
|
||||
SlotEditor.fill(inventory, 0, SIZE);
|
||||
inventory.open();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user