From 80090989654f22f61f8dfb70a64302c18c1c8fbb Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Mon, 26 Oct 2026 09:40:23 +0100 Subject: [PATCH] Space out entry editor rows and show empty slots as firework stars Settings in the entry editor start one column after the row headers, and empty particle slots show a firework star instead of a gray pane. --- .../steamwar/lobby/particle/gui/EntryEditor.java | 16 +++++++++------- .../lobby/particle/gui/ParticleMenu.java | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/LobbySystem/src/de/steamwar/lobby/particle/gui/EntryEditor.java b/LobbySystem/src/de/steamwar/lobby/particle/gui/EntryEditor.java index 9eb99fe2..0eb5bff9 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/gui/EntryEditor.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/gui/EntryEditor.java @@ -50,6 +50,8 @@ class EntryEditor { private final int ROW_SHAPE = 2; private final int ROW_TIMING = 3; private final int ROW_CONDITIONS = 4; + // Settings start after the row header and one column of space + private final int FIRST_SETTING = 2; private final int SIZE = 54; private final int BACK = BottomBar.position(SIZE, BottomBar.BACK); private final int COST = BottomBar.position(SIZE, BottomBar.COST); @@ -107,19 +109,19 @@ class EntryEditor { header(inventory, ROW_TIMING, Material.DAYLIGHT_DETECTOR, "PARTICLE_SECTION_TIMING", player); header(inventory, ROW_CONDITIONS, Material.OBSERVER, "PARTICLE_SECTION_CONDITIONS", player); - inventory.setItem(ROW_DESIGN * 9 + 1, new SWItem(design.getIcon(), designName(design, player), List.of(msg("PARTICLE_VALUE_CLICK", player)), false, + inventory.setItem(ROW_DESIGN * 9 + FIRST_SETTING, new SWItem(design.getIcon(), designName(design, player), List.of(msg("PARTICLE_VALUE_CLICK", player)), false, clickType -> Pickers.design(player, design, picked -> changeDesign(context, picked), context::reopen))); if (design.usesEntryParticle()) { - inventory.setItem(ROW_DESIGN * 9 + 2, parameterItem(context, PARTICLE)); + inventory.setItem(ROW_DESIGN * 9 + FIRST_SETTING + 1, parameterItem(context, PARTICLE)); ParticleType type = entry.getValues().get(PARTICLE); if (type.usesColors()) { - inventory.setItem(ROW_DESIGN * 9 + 3, parameterItem(context, COLORS)); + inventory.setItem(ROW_DESIGN * 9 + FIRST_SETTING + 2, parameterItem(context, COLORS)); } else if (type.usesBlock()) { - inventory.setItem(ROW_DESIGN * 9 + 3, parameterItem(context, BLOCK)); + inventory.setItem(ROW_DESIGN * 9 + FIRST_SETTING + 2, parameterItem(context, BLOCK)); } row(inventory, context, ROW_PARTICLE, List.of(COUNT, SPEED, SPREAD_X, SPREAD_Y, SPREAD_Z)); } else { - inventory.setItem(ROW_PARTICLE * 9 + 1, new SWItem(Material.STRUCTURE_VOID, msg("PARTICLE_FIXED_LOOK", player), clickType -> { + inventory.setItem(ROW_PARTICLE * 9 + FIRST_SETTING, new SWItem(Material.STRUCTURE_VOID, msg("PARTICLE_FIXED_LOOK", player), clickType -> { })); } row(inventory, context, ROW_SHAPE, design.getParameters()); @@ -146,8 +148,8 @@ class EntryEditor { } private void row(SWInventory inventory, Context context, int row, List> parameters) { - for (int i = 0; i < parameters.size() && i < 8; i++) { - inventory.setItem(row * 9 + 1 + i, parameterItem(context, parameters.get(i))); + for (int i = 0; i < parameters.size() && FIRST_SETTING + i < 9; i++) { + inventory.setItem(row * 9 + FIRST_SETTING + i, parameterItem(context, parameters.get(i))); } } diff --git a/LobbySystem/src/de/steamwar/lobby/particle/gui/ParticleMenu.java b/LobbySystem/src/de/steamwar/lobby/particle/gui/ParticleMenu.java index 1923cb38..18211b5c 100644 --- a/LobbySystem/src/de/steamwar/lobby/particle/gui/ParticleMenu.java +++ b/LobbySystem/src/de/steamwar/lobby/particle/gui/ParticleMenu.java @@ -87,7 +87,7 @@ public class ParticleMenu { }); } List lore = List.of(msg("PARTICLE_SLOT_CREATE", player)); - return new SWItem(Material.GRAY_STAINED_GLASS_PANE, msg("PARTICLE_SLOT_EMPTY", player), lore, false, clickType -> { + return new SWItem(Material.FIREWORK_STAR, msg("PARTICLE_SLOT_EMPTY", player), lore, false, clickType -> { lobbyPlayer.setSlot(index, new ParticleSlot(ParticleSlots.defaultName(index))); SlotEditor.open(player, index); });