From 2baa6dc4a59db422415bfad996e11619093788c6 Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Thu, 26 Nov 2020 15:33:58 +0900 Subject: add set stuff, done --- src/main/java/kr/syeyoung/dungeonsguide/EventListener.java | 3 +++ .../java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java | 4 ++-- .../dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java b/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java index bce2b573..b563fcfc 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/EventListener.java @@ -5,6 +5,7 @@ import kr.syeyoung.dungeonsguide.dungeon.data.DungeonRoomInfo; import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonDoor; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import kr.syeyoung.dungeonsguide.roomedit.EditingContext; +import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonAddSet; import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonOffsetPointEdit; import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonParameterEdit; import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit; @@ -123,6 +124,8 @@ public class EventListener { if (valueEdit != null) { valueEdit.renderWorld(renderWorldLastEvent.partialTicks); } + } else if (guiScreen instanceof GuiDungeonAddSet) { + ((GuiDungeonAddSet) guiScreen).onWorldRender(renderWorldLastEvent.partialTicks); } } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java index b6275865..a0496b47 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java @@ -36,8 +36,8 @@ public class GuiDungeonAddSet extends GuiScreen { for (OffsetPoint pos:getBlockPoses()) { RenderUtils.highlightBlock(pos.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(0,255,255,50), partialTicks); } - RenderUtils.highlightBlock(start.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(255,0,0,50), partialTicks); - RenderUtils.highlightBlock(end.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(0,255,0,50), partialTicks); + RenderUtils.highlightBlock(start.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(255,0,0,100), partialTicks); + RenderUtils.highlightBlock(end.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(0,255,0,100), partialTicks); } public List getBlockPoses() { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java index 58229623..cf617143 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java @@ -156,6 +156,10 @@ public class ValueEditOffsetPointSet extends MPanel implements ValueEdit blockPoses) { + ((OffsetPointSet)parameter.getNewData()).getOffsetPointList().addAll(blockPoses); + for (OffsetPoint blockPose : blockPoses) { + MParameters.add(new MOffsetPoint(this, blockPose)); + } } public static class Generator implements ValueEditCreator { -- cgit