aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomedit
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-04 21:55:02 +0900
committersyeyoung <cyong06@naver.com>2021-02-04 21:55:02 +0900
commitc37bda238c5072fa50dfa2d87aa137e1bdf5c4ac (patch)
tree5a276b3db53c9275cb0da74cf8aed0cfa0e79491 /src/main/java/kr/syeyoung/dungeonsguide/roomedit
parent809f6b70870ec2a0fd4e4abfd24539e30d8db11b (diff)
downloadSkyblock-Dungeons-Guide-c37bda238c5072fa50dfa2d87aa137e1bdf5c4ac.tar.gz
Skyblock-Dungeons-Guide-c37bda238c5072fa50dfa2d87aa137e1bdf5c4ac.tar.bz2
Skyblock-Dungeons-Guide-c37bda238c5072fa50dfa2d87aa137e1bdf5c4ac.zip
move guis
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java210
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java54
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MColor.java30
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MFloatSelectionButton.java74
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java71
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java48
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabelAndElement.java52
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MParameter.java72
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java74
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java61
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java72
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java349
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MValue.java63
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java7
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java5
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java5
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java5
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java10
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java10
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java12
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java10
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/DynamicEditor.java3
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java9
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java3
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java5
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java9
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java9
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java8
42 files changed, 74 insertions, 1344 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java
deleted file mode 100755
index ad350863..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/MPanel.java
+++ /dev/null
@@ -1,210 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit;
-
-import lombok.AccessLevel;
-import lombok.Getter;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.gui.ScaledResolution;
-import net.minecraft.client.renderer.GlStateManager;
-import net.minecraft.client.renderer.OpenGlHelper;
-import org.lwjgl.opengl.GL11;
-import org.w3c.dom.css.Rect;
-
-import java.awt.*;
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-@Getter
-public class MPanel {
- protected Rectangle bounds = new Rectangle(0,0,0,0); // relative to parent
-
- protected List<MPanel> childComponents = new CopyOnWriteArrayList<MPanel>();
-
- protected Color backgroundColor = new Color(0,0,0,0);
-
- protected Rectangle lastAbsClip = new Rectangle(0,0,0,0);
-
- @Getter(AccessLevel.PUBLIC)
- protected boolean isFocused;
-
- public void setBackgroundColor(Color c) {
- if (c == null) return;
- this.backgroundColor = c;
- }
-
- public void setPosition(Point pt) {
- this.setBounds(new Rectangle(pt.x, pt.y, getBounds().width, getBounds().height));
- }
-
- public void setSize(Dimension dim) {
- this.setBounds(new Rectangle(getBounds().x, getBounds().y, dim.width, dim.height));
- }
-
- public Dimension getSize() {
- return getBounds().getSize();
- }
-
- public void setBounds(Rectangle bounds) {
- if (bounds == null) return;
- this.bounds.x = bounds.x;
- this.bounds.y = bounds.y;
- this.bounds.width = bounds.width;
- this.bounds.height = bounds.height;
-
- for (MPanel childComponent : childComponents) {
- childComponent.resize0(getBounds().width, getBounds().height);
- }
- onBoundsUpdate();
- }
-
- public void onBoundsUpdate() {
-
- }
-
- public void add(MPanel child) {
- this.childComponents.add(child);
- }
-
- public void remove(MPanel panel) {
- this.childComponents.remove(panel);
- }
-
- public void render0(ScaledResolution resolution, Point parentPoint, Rectangle parentClip, int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks) { // 0,0 - a a
-
-
- int relMousex = relMousex0 - getBounds().x;
- int relMousey = relMousey0 - getBounds().y;
-
- GlStateManager.translate(getBounds().x, getBounds().y, 0);
- GlStateManager.color(1,1,1,0);
-
-
- Rectangle absBound = getBounds().getBounds();
- absBound.setLocation(absBound.x + parentPoint.x, absBound.y + parentPoint.y);
- Rectangle clip = determineClip(parentClip, absBound);
- lastAbsClip = clip;
-
- clip(resolution, clip.x, clip.y, clip.width, clip.height);
- GlStateManager.pushAttrib();
- GL11.glEnable(GL11.GL_SCISSOR_TEST);
-
- GlStateManager.pushAttrib();
- GuiScreen.drawRect(0,0, getBounds().width, getBounds().height, backgroundColor.getRGB());
- GlStateManager.popAttrib();
-
- GlStateManager.pushMatrix();
- GlStateManager.pushAttrib();
- render(absMousex, absMousey, relMousex, relMousey, partialTicks, clip);
- GlStateManager.popAttrib();
- GlStateManager.popMatrix();
-
- GL11.glDisable(GL11.GL_SCISSOR_TEST);
- GL11.glPopAttrib();
-
-
- Point newPt = new Point(parentPoint.x + getBounds().x, parentPoint.y + getBounds().y);
-
- for (MPanel mPanel : getChildComponents()){
- GlStateManager.pushMatrix();
- GlStateManager.pushAttrib();
- mPanel.render0(resolution, newPt, clip, absMousex, absMousey, relMousex, relMousey, partialTicks);
- GlStateManager.popAttrib();
- GlStateManager.popMatrix();
- }
- }
-
- public void clip(ScaledResolution resolution, int x, int y, int width, int height) {
- int scale = resolution.getScaleFactor();
- GL11.glScissor((x ) * scale, Minecraft.getMinecraft().displayHeight - (y + height) * scale, (width) * scale, height * scale);
- }
-
- private Rectangle determineClip(Rectangle rect1, Rectangle rect2) {
- int minX = Math.max(rect1.x, rect2.x);
- int minY = Math.max(rect1.y, rect2.y);
- int maxX = Math.min(rect1.x + rect1.width, rect2.x + rect2.width);
- int maxY = Math.min(rect1.y + rect1.height, rect2.y +rect2.height);
- if (minX > maxX) return new Rectangle(0,0,0,0);
- if (minY > maxY) return new Rectangle(0,0,0,0);
- return new Rectangle(minX, minY, maxX - minX, maxY - minY);
- }
-
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {}
-
- public void resize0(int parentWidth, int parentHeight) {
- resize(parentWidth, parentHeight);
- }
-
- public void resize(int parentWidth, int parentHeight) {}
-
-
- public void keyTyped0(char typedChar, int keyCode) {
- for (MPanel childComponent : getChildComponents()) {
- childComponent.keyTyped0(typedChar, keyCode);
- }
-
- if (isFocused)
- keyTyped(typedChar, keyCode);
- }
- public void keyTyped(char typedChar, int keyCode) {}
-
- public boolean mouseClicked0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int mouseButton) {
- int relMousex = relMouseX0 - getBounds().x;
- int relMousey = relMouseY0 - getBounds().y;
-
- boolean noClip = true;
- boolean focusedOverall = false;
- for (MPanel childComponent : getChildComponents()) {
- if (childComponent.mouseClicked0(absMouseX, absMouseY, relMousex, relMousey, mouseButton)) {
- noClip = false;
- focusedOverall = true;
- }
- }
-
- if (getBounds().contains(relMouseX0, relMouseY0) && noClip) {
- isFocused = true;
- focusedOverall = true;
- } else {
- isFocused = false;
- }
-
- mouseClicked(absMouseX, absMouseY, relMousex, relMousey, mouseButton);
- return focusedOverall;
- }
-
- public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {}
-
- public void mouseReleased0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int state) {
- int relMousex = relMouseX0 - getBounds().x;
- int relMousey = relMouseY0 - getBounds().y;
-
- for (MPanel childComponent : getChildComponents()) {
- childComponent.mouseReleased0(absMouseX, absMouseY, relMousex, relMousey, state);
- }
- mouseReleased(absMouseX, absMouseY, relMousex, relMousey, state);
- }
- public void mouseReleased(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int state) {}
-
- public void mouseClickMove0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int clickedMouseButton, long timeSinceLastClick) {
- int relMousex = relMouseX0 - getBounds().x;
- int relMousey = relMouseY0 - getBounds().y;
-
- for (MPanel childComponent : getChildComponents()) {
- childComponent.mouseClickMove0(absMouseX, absMouseY, relMousex, relMousey, clickedMouseButton, timeSinceLastClick);
- }
- mouseClickMove(absMouseX, absMouseY, relMousex, relMousey, clickedMouseButton, timeSinceLastClick);
- }
- public void mouseClickMove(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int clickedMouseButton, long timeSinceLastClick) {}
-
- public void mouseScrolled0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int scrollAmount) {
- int relMousex = relMouseX0 - getBounds().x;
- int relMousey = relMouseY0 - getBounds().y;
-
- for (MPanel childComponent : getChildComponents()) {
- childComponent.mouseScrolled0(absMouseX, absMouseY, relMousex, relMousey, scrollAmount);
- }
- mouseScrolled(absMouseX, absMouseY, relMousex, relMousey, scrollAmount);
- }
- public void mouseScrolled(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int scrollAmount) {}
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java
deleted file mode 100755
index 7d6581fc..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import org.lwjgl.opengl.GL11;
-import org.w3c.dom.css.Rect;
-
-import java.awt.*;
-
-@Getter
-@Setter
-public class MButton extends MPanel {
- private String text;
-
- private Color foreground = Color.white;
- private Color hover = Color.gray;
- private Color clicked = Color.lightGray;
- private Color disabled = Color.darkGray;
-
- private boolean enabled = true;
-
- private Runnable onActionPerformed;
-
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle clip) {
- Dimension bounds = getSize();
-
- Color bg = backgroundColor;
- if (!enabled) {
- bg = disabled;
- } else if (new Rectangle(new Point(0,0),bounds).contains(relMousex0, relMousey0)) {
- bg = hover;
- }
- if (bg != null)
- Gui.drawRect(0,0,getBounds().width, getBounds().height, bg.getRGB());
-
- FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
- int width = renderer.getStringWidth(getText());
- int x = (getBounds().width - width) / 2;
- int y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
-
- renderer.drawString(getText(), x,y, foreground.getRGB());
- }
-
- @Override
- public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
- if (onActionPerformed != null && lastAbsClip.contains(absMouseX, absMouseY))
- onActionPerformed.run();
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MColor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MColor.java
deleted file mode 100644
index 360d1992..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MColor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-import net.minecraft.client.gui.Gui;
-
-import java.awt.*;
-
-@AllArgsConstructor
-@NoArgsConstructor
-public class MColor extends MPanel {
- @Getter
- @Setter
- private Color color = Color.white;
- @Getter
- @Setter
- private Dimension size = new Dimension(20,15);
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- Rectangle rectangle = getBounds();
-
- int x = (rectangle.width - getSize().width) / 2;
- int y = (rectangle.height - getSize().height) / 2;
-
- Gui.drawRect(x,y,x+getSize().width,y+getSize().height, getColor().getRGB());
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MFloatSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MFloatSelectionButton.java
deleted file mode 100755
index 504d3e33..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MFloatSelectionButton.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.awt.*;
-
-@Getter
-@Setter
-public class MFloatSelectionButton extends MPanel {
-
- private float data;
-
- private MButton dec;
- private MButton inc;
- private MTextField selected;
-
- @Getter
- @Setter
- private Runnable onUpdate;
-
- public MFloatSelectionButton(float data2) {
- this.data = data2;
-
- dec = new MButton(); dec.setText("<"); add(dec);
- inc = new MButton(); inc.setText(">"); add(inc);
- selected = new MTextField() {
- @Override
- public String getText() {
- return data +"";
- }
- @Override
- public void edit(String str) {
- try {
- data = Float.parseFloat(str);
- onUpdate.run();
- } catch (Exception e) {}
- }
- }; updateSelected(); add(selected);
-
- dec.setOnActionPerformed(new Runnable() {
- @Override
- public void run() {
- data--;
- updateSelected();
- onUpdate.run();
- }
- });
- inc.setOnActionPerformed(new Runnable() {
- @Override
- public void run() {
- data ++;
- updateSelected();
- onUpdate.run();
- }
- });
- }
-
- public float getSelected() {
- return data;
- }
-
- public void updateSelected() {
- selected.setText(data+"");
- }
-
- @Override
- public void onBoundsUpdate() {
- dec.setBounds(new Rectangle(0,0,getBounds().height, getBounds().height));
- inc.setBounds(new Rectangle(getBounds().width - getBounds().height, 0, getBounds().height, getBounds().height));
- selected.setBounds(new Rectangle(getBounds().height, 0, getBounds().width - getBounds().height - getBounds().height, getBounds().height));
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java
deleted file mode 100755
index c61e4f08..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MIntegerSelectionButton.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.awt.*;
-import java.util.List;
-
-@Getter
-@Setter
-public class MIntegerSelectionButton extends MPanel {
-
- private int data;
-
- private MButton dec;
- private MButton inc;
- private MTextField selected;
-
- @Getter
- @Setter
- private Runnable onUpdate;
-
- public MIntegerSelectionButton(int data2) {
- this.data = data2;
-
- dec = new MButton(); dec.setText("<"); add(dec);
- inc = new MButton(); inc.setText(">"); add(inc);
- selected = new MTextField() {
- @Override
- public void edit(String str) {
- try {
- data = Integer.parseInt(str);
- onUpdate.run();
- } catch (Exception e) {}
- }
- }; updateSelected(); add(selected);
-
- dec.setOnActionPerformed(new Runnable() {
- @Override
- public void run() {
- data--;
- updateSelected();
- onUpdate.run();
- }
- });
- inc.setOnActionPerformed(new Runnable() {
- @Override
- public void run() {
- data ++;
- updateSelected();
- onUpdate.run();
- }
- });
- }
-
- public int getSelected() {
- return data;
- }
-
- private void updateSelected() {
- selected.setText(data+"");
- }
-
- @Override
- public void onBoundsUpdate() {
- dec.setBounds(new Rectangle(0,0,getBounds().height, getBounds().height));
- inc.setBounds(new Rectangle(getBounds().width - getBounds().height, 0, getBounds().height, getBounds().height));
- selected.setBounds(new Rectangle(getBounds().height, 0, getBounds().width - getBounds().height - getBounds().height, getBounds().height));
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java
deleted file mode 100755
index d01b858f..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabel.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-
-import java.awt.*;
-
-public class MLabel extends MPanel {
- @Getter
- @Setter
- private String text;
-
- @Getter
- @Setter
- private Color foreground = Color.white;
-
- public enum Alignment {
- LEFT, CENTER, RIGHT
- }
- @Getter
- @Setter
- private Alignment alignment= Alignment.LEFT;
-
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle clip) {
- Dimension bounds = getSize();
-
- FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
- int width = renderer.getStringWidth(getText());
- int x,y;
- if (alignment == Alignment.CENTER) {
- x = (getBounds().width - width) / 2;
- y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
- } else if (alignment == Alignment.LEFT) {
- x = 0;
- y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
- } else if (alignment == Alignment.RIGHT) {
- x = getBounds().width - width;
- y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
- } else{
- return;
- }
- renderer.drawString(getText(), x,y, 0xffffff);
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabelAndElement.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabelAndElement.java
deleted file mode 100755
index 9bab1bdb..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MLabelAndElement.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-import net.minecraft.client.gui.Gui;
-
-import java.awt.*;
-
-public class MLabelAndElement extends MPanel {
- private MLabel label;
- private MPanel element;
-
- @Getter @Setter
- private Color hover;
- @Getter @Setter
- private Runnable onClick;
-
- public MLabelAndElement(String label, MPanel element) {
- this.add(this.label = new MLabel());
- this.label.setText(label);
- this.add(element);
- this.element = element;
- }
-
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- if (hover != null && new Rectangle(new Point(0,0),getBounds().getSize()).contains(relMousex0, relMousey0)) {
- Gui.drawRect(0,0,getBounds().width, getBounds().height, hover.getRGB());
- }
- }
-
- @Override
- public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
- if (onClick!= null && lastAbsClip.contains(absMouseX, absMouseY)) {
- onClick.run();
- }
- }
-
- @Override
- public void resize(int parentWidth, int parentHeight) {
- this.setSize(new Dimension(parentWidth, getBounds().height));
- label.setBounds(new Rectangle(0,0,parentHeight / 3, getBounds().height));
- element.setBounds(new Rectangle(parentWidth / 3,0,parentWidth / 3 * 2, getBounds().height));
- }
-
- @Override
- public void onBoundsUpdate() {
- label.setBounds(new Rectangle(0,0,getBounds().width / 3, getBounds().height));
- element.setBounds(new Rectangle(getBounds().width / 3,0,getBounds().width / 3 * 2, getBounds().height));
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MParameter.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MParameter.java
deleted file mode 100755
index 12ad9972..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MParameter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonParameterEdit;
-import kr.syeyoung.dungeonsguide.roomedit.panes.DynamicEditor;
-import lombok.Getter;
-import lombok.Setter;
-import net.minecraft.client.gui.Gui;
-
-import java.awt.*;
-
-public class MParameter extends MPanel {
- private MLabel label;
- private MLabel data;
-
- @Getter @Setter
- private Color hover = Color.gray;
-
- @Getter @Setter
- private Parameter parameter;
- private DynamicEditor processorParameterEditPane;
-
- public MParameter(final Parameter parameter, DynamicEditor processorParameterEditPane) {
- this.processorParameterEditPane = processorParameterEditPane;
- this.add(this.label = new MLabel() {
- @Override
- public String getText() {
- return parameter.getName();
- }
- });
- this.add(this.data = new MLabel() {
- @Override
- public String getText() {
- return parameter.getNewData() != null ?parameter.getNewData().toString() :"-empty-";
- }
- });
- this.label.setAlignment(MLabel.Alignment.LEFT);
- this.data.setAlignment(MLabel.Alignment.RIGHT);
-
- this.parameter = parameter;
- }
-
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- if (hover != null && new Rectangle(new Point(0,0),getBounds().getSize()).contains(relMousex0, relMousey0)) {
- Gui.drawRect(0,0,getBounds().width, getBounds().height, hover.getRGB());
- }
- }
-
- @Override
- public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
- if (this.getBounds().x > -20 && lastAbsClip.contains(absMouseX, absMouseY)) {
- // open new gui;
- EditingContext.getEditingContext().openGui(new GuiDungeonParameterEdit(this, processorParameterEditPane));
- }
- }
-
- @Override
- public void resize(int parentWidth, int parentHeight) {
- this.setSize(new Dimension(parentWidth, getBounds().height));
- label.setBounds(new Rectangle(0,0,parentHeight / 3, getBounds().height));
- data.setBounds(new Rectangle(parentWidth / 3,0,parentWidth / 3 * 2, getBounds().height));
- }
-
- @Override
- public void onBoundsUpdate() {
- label.setBounds(new Rectangle(0,0,getBounds().width / 3, getBounds().height));
- data.setBounds(new Rectangle(getBounds().width / 3,0,getBounds().width / 3 * 2, getBounds().height));
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java
deleted file mode 100755
index 39eec74f..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.awt.*;
-import java.util.List;
-
-@Getter
-@Setter
-public class MStringSelectionButton extends MPanel {
-
- private List<String> possible;
- private int selectedIndex;
-
- private MButton dec;
- private MButton inc;
- private MLabel selected;
-
- @Getter
- @Setter
- private Runnable onUpdate;
-
- public MStringSelectionButton(final List<String> possible, String defaultValue) {
- this.possible = possible;
- selectedIndex = possible.indexOf(defaultValue);
- if (selectedIndex == -1) selectedIndex = 0;
-
- dec = new MButton(); dec.setText("<"); add(dec);
- inc = new MButton(); inc.setText(">"); add(inc);
- selected = new MLabel(); updateSelected(); add(selected);
-
- dec.setOnActionPerformed(new Runnable() {
- @Override
- public void run() {
- selectedIndex++;
- if (selectedIndex >= possible.size()) selectedIndex = 0;
- updateSelected();
- onUpdate.run();
- }
- });
- inc.setOnActionPerformed(new Runnable() {
- @Override
- public void run() {
- selectedIndex --;
- if (selectedIndex < 0) selectedIndex = possible.size() - 1;
- updateSelected();
- onUpdate.run();
- }
- });
- }
-
- public String selectionToDisplay(String selection) {
- return selection;
- }
-
- public String getSelected() {
- if (possible.size() == 0) return null;
- return possible.get(selectedIndex);
- }
-
- private void updateSelected() {
- if (possible.size() == 0) selected.setText("-Empty-");
- else selected.setText(selectionToDisplay(possible.get(selectedIndex)));
- }
-
- @Override
- public void onBoundsUpdate() {
- dec.setBounds(new Rectangle(0,0,getBounds().height, getBounds().height));
- inc.setBounds(new Rectangle(getBounds().width - getBounds().height, 0, getBounds().height, getBounds().height));
- selected.setBounds(new Rectangle(getBounds().height, 0, getBounds().width - getBounds().height - getBounds().height, getBounds().height));
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java
deleted file mode 100755
index 799c68a9..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabButton.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-
-import java.awt.*;
-
-@Getter
-@Setter
-public class MTabButton extends MPanel {
- private String text;
-
- private Color foreground = Color.white;
- private Color hover = new Color(236, 236, 236, 64);
- private Color clicked = new Color(30,30,30,0);
- private Color selected = new Color(0,0,0,255);
- private Color disabled = new Color(0,0,0);
-
- private boolean enabled = true;
-
- private MTabbedPane tabbedPane;
-
- public MTabButton(MTabbedPane tabbedPane, String key) {
- this.tabbedPane = tabbedPane;
- this.text = key;
- }
-
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle clip) {
- Dimension bounds = getSize();
-
- Color bg = null;
- if (!enabled) {
- bg = disabled;
- } else if (tabbedPane.getSelectedKey().equals(text)) {
- bg = selected;
- } else if (new Rectangle(new Point(0,0),bounds).contains(relMousex0, relMousey0)) {
- bg = hover;
- }
- if (bg != null)
- Gui.drawRect(0,0,getBounds().width, getBounds().height, bg.getRGB());
-
- FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
- int width = renderer.getStringWidth(text);
- int x = (getBounds().width - width) / 2;
- int y = (getBounds().height - renderer.FONT_HEIGHT) / 2;
-
- renderer.drawString(text, x,y, foreground.getRGB());
- }
-
- @Override
- public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
- if (lastAbsClip.contains(absMouseX, absMouseY)) {
- tabbedPane.setSelectedKey(text);
- }
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java
deleted file mode 100755
index a9a6922e..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTabbedPane.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class MTabbedPane extends MPanel {
-
- private Map<String, MPanel> tabs = new HashMap<String, MPanel>();
- private Map<String, MTabButton> buttons = new HashMap<String, MTabButton>();
-
- @Getter
- @Setter
- private String selectedKey = "";
-
- @Getter
- private Color background2;
-
- public void setBackground2(Color background2) {
- this.background2 = background2;
- for (MPanel value : tabs.values()) {
- value.setBackgroundColor(background2);
- }
- for (MTabButton value : buttons.values()) {
- value.setBackgroundColor(background2.brighter());
- }
- }
-
- public void addTab(String tab, MPanel panel) {
- MPanel panel2 = new MPanel() ;
- panel2.add(panel);
- panel2.setBackgroundColor(background2);
- tabs.put(tab, panel2);
- panel2.setBounds(new Rectangle(0,15,getBounds().width, getBounds().height-15));
-
- MTabButton button = new MTabButton(this, tab);
- button.setBackgroundColor(background2.brighter());
- button.setBounds(new Rectangle(buttons.size()* 50, 0, 50, 15));
- buttons.put(tab, button);
- if (tabs.size() == 1)
- selectedKey = tab;
- }
-
- @Override
- public List<MPanel> getChildComponents() {
- ArrayList<MPanel> dynamic = new ArrayList<MPanel>(buttons.values());
- dynamic.add(tabs.get(selectedKey));
- return dynamic;
- }
-
- @Override
- public void resize(int parentWidth, int parentHeight) {
- this.setBounds(new Rectangle(0,0,parentWidth, parentHeight));
- for (MPanel ma:tabs.values())
- ma.setBounds(new Rectangle(0,15,parentWidth, parentHeight-15));
- }
-
- @Override
- public void setBounds(Rectangle bounds) {
- if (bounds == null) return;
- this.bounds.x = bounds.x;
- this.bounds.y = bounds.y;
- this.bounds.width = bounds.width;
- this.bounds.height = bounds.height;
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java
deleted file mode 100755
index 49c36d3c..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MTextField.java
+++ /dev/null
@@ -1,349 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import lombok.Getter;
-import lombok.Setter;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.gui.ScaledResolution;
-import org.lwjgl.input.Keyboard;
-import org.lwjgl.opengl.GL11;
-
-import java.awt.*;
-import java.awt.datatransfer.*;
-import java.awt.event.KeyEvent;
-import java.io.IOException;
-
-@Getter
-public class MTextField extends MPanel {
- private Color foreground = Color.white;
-
- private String text = "asdasdasd";
- private int cursorBlickTicker = 0;
-
- private int selectionStart = 0;
- private int selectionEnd = 0;
-
- private int cursor = 0;
-
- private int xOffset = 0;
-
- public void edit(String str) {
-
- }
-
- public void setText(String text) {
- this.text = text;
- }
- private void setText0(String text) {
- this.text = text;
- edit(text);
- }
-
-
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle clip) {
- Gui.drawRect(0,0,getBounds().width, getBounds().height, isFocused ? Color.white.getRGB() : Color.gray.getRGB());
- Gui.drawRect(1,1,getBounds().width - 2, getBounds().height - 2, Color.black.getRGB());
-
- Minecraft mc = Minecraft.getMinecraft();
- clip(new ScaledResolution(mc), clip.x + 1, clip.y + 1, clip.width - 2, clip.height - 2);
- FontRenderer fr = mc.fontRendererObj;
- int y = (getBounds().height - fr.FONT_HEIGHT) / 2;
- fr.drawString(text, 3 - xOffset, y, foreground.getRGB());
- // draw selection
- if (isFocused) {
- if (selectionStart != -1) {
- int startX = fr.getStringWidth(text.substring(0, selectionStart)) - xOffset;
- int endX = fr.getStringWidth(text.substring(0, selectionEnd)) - xOffset;
- Gui.drawRect(3 + startX, y, 3 + endX, y + fr.FONT_HEIGHT, 0xFF00FF00);
- fr.drawString(text.substring(selectionStart, selectionEnd), 3 + startX, y, foreground.getRGB());
- }
-
- // draw cursor
- if (cursor != -1) {
- if (cursor > text.length()) cursor = text.length();
- int x = fr.getStringWidth(text.substring(0, cursor)) - xOffset;
- cursorBlickTicker++;
- if (cursorBlickTicker < 10)
- Gui.drawRect(3 + x, y, 4 + x, y + fr.FONT_HEIGHT, 0xFFFFFFFF);
- if (cursorBlickTicker == 20) cursorBlickTicker = 0;
- }
- }
- }
-
- @Override
- public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
- Rectangle actualField = new Rectangle(1, 3,getBounds().width - 2, getBounds().height - 6);
- if (!actualField.contains(relMouseX, relMouseY)) return;
- if (!lastAbsClip.contains(absMouseX, absMouseY)) return;
-
-
-
-
- int relStartT = relMouseX-3;
- int offseted = relStartT + xOffset;
-
- selectionStart = -1;
-
-
- FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
-
- for (int i = 0; i < text.length(); i++) {
- int totalWidth = fr.getStringWidth(text.substring(0, i));
- if (offseted < totalWidth) {
- cursor = i;
- return;
- }
- }
- cursor = text.length();
- }
-
- @Override
- public void mouseClickMove(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int clickedMouseButton, long timeSinceLastClick) {
- if (!isFocused) return;
- selectionStart = cursor;
- selectionEnd = cursor;
-
- int relStartT = relMouseX-3;
- int offseted = relStartT + xOffset;
-
- FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
-
- for (int i = 0; i < text.length(); i++) {
- int totalWidth = fr.getStringWidth(text.substring(0, i));
- if (offseted < totalWidth) {
- if (i < cursor) {
- selectionStart = i;
- selectionEnd = cursor;
- } else {
- selectionStart = cursor;
- selectionEnd = i;
- }
- return;
- }
- }
- selectionEnd = text.length();
- if (selectionStart == selectionEnd) {
- selectionStart = -1;
- }
- }
-
- @Override
- public void mouseScrolled(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int scrollAmount) {
- if (!isFocused) return;
- if (scrollAmount > 0) {
- xOffset += 5;
- } else if (scrollAmount < 0){
- xOffset -= 5;
- }
- if (xOffset < 0) {
- xOffset = 0;
- }
- int width = Minecraft.getMinecraft().fontRendererObj.getStringWidth(text);
- int overflow = getBounds().width - 3 - width;
- if (overflow >= 0) {
- xOffset = 0;
- } else if (width - xOffset + 10 < getBounds().width) {
- xOffset = width - getBounds().width+10;
- }
- }
-
- @Override
- public void keyTyped(char typedChar, int keycode) {
- if (!isFocused) return;
-
-
- if (selectionStart == -1) {
- if (keycode == 199) { // home
- cursor = 0;
- return;
- }
-
- if (keycode == 207) { // end
- cursor = text.length();
- return;
- }
-
- if (keycode == 203) { // left
- cursor--;
- if (cursor < 0) cursor = 0;
- return;
- }
-
- if (keycode == 205) { // right
- cursor ++;
- if (cursor > text.length()) cursor = text.length();
- return;
- }
-
- // backspace
- if (keycode == 14 && cursor > 0) {
- setText0(this.text.substring(0, cursor - 1) + this.text.substring(cursor));
- cursor--;
- return;
- }
-
- //del
- if (keycode == 211 && cursor < text.length()) {
- setText0(this.text.substring(0, cursor) + this.text.substring(cursor+1));
- return;
- }
-
- // paste
- boolean shouldPaste = false;
- if (keycode == 47) {
- if (Minecraft.isRunningOnMac) { // mac
- if (Keyboard.isKeyDown(219) || Keyboard.isKeyDown(220)) {
- shouldPaste = true;
- }
- } else { // literally everything else
- if (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)) {
- shouldPaste = true;
- }
- }
- }
- if (shouldPaste) {
- Transferable transferable = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
- if (transferable != null && transferable.isDataFlavorSupported(DataFlavor.stringFlavor)) {
- try {
- Object theText = transferable.getTransferData(DataFlavor.stringFlavor);
- setText0(
- this.text.substring(0, this.cursor)
- + theText
- + this.text.substring(this.cursor));
-
- cursor += theText.toString().length();
- } catch (UnsupportedFlavorException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return;
- }
-
- // text
- if (isPrintableChar(typedChar)) {
- setText0(
- this.text.substring(0, this.cursor)
- + typedChar
- + this.text.substring(this.cursor));
- this.cursor++;
- return;
- }
- } else {
- if (keycode == 199) { // home
- cursor = 0;
- selectionStart = -1;
- return;
- }
-
- if (keycode == 207) { // end
- selectionStart = -1;
- cursor = text.length();
- return;
- }
-
- if (keycode == 203) { // left
- cursor = selectionStart;
- selectionStart = -1;
- return;
- }
-
- if (keycode == 205) { // right
- cursor = selectionEnd;
- selectionStart = -1;
- return;
- }
-
- // backspace
- if (keycode == 14 && cursor > 0) {
- setText0(this.text.substring(0, selectionStart) + this.text.substring(selectionEnd));
- cursor = selectionStart;
- selectionStart = -1;
- return;
- }
-
- //del
- if (keycode == 211 && cursor < text.length()) {
- setText0(this.text.substring(0, selectionStart) + this.text.substring(selectionEnd));
- cursor = selectionStart;
- selectionStart = -1;
- return;
- }
-
- // paste
- boolean shouldPaste = false;
- if (keycode == 47) {
- if (Minecraft.isRunningOnMac) { // mac
- if (Keyboard.isKeyDown(219) || Keyboard.isKeyDown(220)) {
- shouldPaste = true;
- }
- } else { // literally everything else
- if (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)) {
- shouldPaste = true;
- }
- }
- }
- if (shouldPaste) {
- Transferable transferable = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
- if (transferable != null && transferable.isDataFlavorSupported(DataFlavor.stringFlavor)) {
- try {
- Object theText = transferable.getTransferData(DataFlavor.stringFlavor);
- setText0(
- this.text.substring(0, this.selectionStart)
- + theText
- + this.text.substring(this.selectionEnd));
- cursor = this.selectionStart + theText.toString().length();
- } catch (UnsupportedFlavorException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- selectionStart = -1;
- }
- return;
- }
- boolean shouldCopy = false;
- if (keycode == 46) {
- if (Minecraft.isRunningOnMac) { // mac
- if (Keyboard.isKeyDown(219) || Keyboard.isKeyDown(220)) {
- shouldCopy = true;
- }
- } else { // literally everything else
- if (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)) {
- shouldCopy = true;
- }
- }
- }
- if (shouldCopy) {
- StringSelection selection = new StringSelection(text.substring(selectionStart, selectionEnd));
- Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
- clipboard.setContents(selection, selection);
- return;
- }
-
- // text
- if (isPrintableChar(typedChar)) {
- setText0(
- this.text.substring(0, this.selectionStart)
- + typedChar
- + this.text.substring(this.selectionEnd));
- this.cursor = this.selectionStart + 1;
- selectionStart = -1;
- return;
- }
- }
- }
- public boolean isPrintableChar( char c ) {
- Character.UnicodeBlock block = Character.UnicodeBlock.of( c );
- return (!Character.isISOControl(c)) &&
- c != KeyEvent.CHAR_UNDEFINED &&
- block != null &&
- block != Character.UnicodeBlock.SPECIALS;
- }
-
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MValue.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MValue.java
deleted file mode 100755
index ab568e1c..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MValue.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package kr.syeyoung.dungeonsguide.roomedit.elements;
-
-import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
-import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonValueEdit;
-import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditOffsetPointSet;
-import lombok.Getter;
-import lombok.Setter;
-import net.minecraft.client.gui.Gui;
-
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.List;
-public class MValue<T> extends MPanel {
- @Getter
- private T data;
- private ValueEditOffsetPointSet valueEditOffsetPointSet;
- private MLabel dataLab;
-
- @Getter @Setter
- private Color hover = Color.gray;
-
- private List<MPanel> addons;
-
- public MValue(final T parameter, List<MPanel> addons) {
- this.addons = addons;
- this.add(this.dataLab = new MLabel() {
- @Override
- public String getText() {
- return data != null ?data.toString() :"-empty-";
- }
- });
- this.dataLab.setAlignment(MLabel.Alignment.RIGHT);
-
- this.data = parameter;
- }
-
- @Override
- public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- if (hover != null && new Rectangle(new Point(0,0),getBounds().getSize()).contains(relMousex0, relMousey0)) {
- Gui.drawRect(0,0,getBounds().width, getBounds().height, hover.getRGB());
- }
- }
-
- @Override
- public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
- if (this.getBounds().x > -20 && lastAbsClip.contains(absMouseX, absMouseY)) {
- EditingContext.getEditingContext().openGui(new GuiDungeonValueEdit(data, addons));
- }
- }
-
- @Override
- public void resize(int parentWidth, int parentHeight) {
- this.setSize(new Dimension(parentWidth, getBounds().height));
- dataLab.setBounds(new Rectangle(0,0,parentWidth, getBounds().height));
- }
-
- @Override
- public void onBoundsUpdate() {
- dataLab.setBounds(new Rectangle(0,0,getBounds().width, getBounds().height));
- }
-}
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 651a892a..f0530cfa 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonAddSet.java
@@ -2,8 +2,8 @@ package kr.syeyoung.dungeonsguide.roomedit.gui;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditOffsetPointSet;
import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import net.minecraft.client.Minecraft;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java
index c9bdc050..e39b136a 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java
@@ -2,9 +2,9 @@ package kr.syeyoung.dungeonsguide.roomedit.gui;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.panes.DynamicEditor;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java
index d2c9abd9..d37e7c53 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonRoomEdit.java
@@ -1,11 +1,8 @@
package kr.syeyoung.dungeonsguide.roomedit.gui;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MTabbedPane;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MTextField;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
+import kr.syeyoung.dungeonsguide.gui.elements.MTabbedPane;
import kr.syeyoung.dungeonsguide.roomedit.panes.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java
index 50269853..74bffd78 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonValueEdit.java
@@ -2,10 +2,9 @@ package kr.syeyoung.dungeonsguide.roomedit.gui;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
-import kr.syeyoung.dungeonsguide.roomedit.panes.DynamicEditor;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditRegistry;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java
index f20709b9..3644f425 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditBreakableWall.java
@@ -3,14 +3,12 @@ package kr.syeyoung.dungeonsguide.roomedit.mechanicedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonBreakableWall;
-import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonSecret;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
-import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
import net.minecraft.init.Blocks;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java
index 506b7e8a..aa9684ba 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditDoor.java
@@ -4,9 +4,9 @@ import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonDoor;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java
index 4c208068..f9c0e91a 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java
@@ -2,11 +2,10 @@ package kr.syeyoung.dungeonsguide.roomedit.mechanicedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonLever;
-import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonOnewayLever;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java
index 31b2c6b5..7629360e 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayDoor.java
@@ -2,12 +2,11 @@ package kr.syeyoung.dungeonsguide.roomedit.mechanicedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet;
-import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonDoor;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonOnewayDoor;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java
index 84bba521..ec1702e5 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java
@@ -3,12 +3,12 @@ package kr.syeyoung.dungeonsguide.roomedit.mechanicedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonOnewayLever;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabelAndElement;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MTextField;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MValue;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabel;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabelAndElement;
+import kr.syeyoung.dungeonsguide.gui.elements.MTextField;
+import kr.syeyoung.dungeonsguide.gui.elements.MValue;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java
index 03c2ae73..f52c8b69 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditPressurePlate.java
@@ -3,12 +3,12 @@ package kr.syeyoung.dungeonsguide.roomedit.mechanicedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonPressurePlate;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabelAndElement;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MTextField;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MValue;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabel;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabelAndElement;
+import kr.syeyoung.dungeonsguide.gui.elements.MTextField;
+import kr.syeyoung.dungeonsguide.gui.elements.MValue;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java
index bc153f10..eb8349c4 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java
@@ -3,9 +3,9 @@ package kr.syeyoung.dungeonsguide.roomedit.mechanicedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonSecret;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java
index 5f4f52fc..205c5431 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditTomb.java
@@ -1,18 +1,14 @@
package kr.syeyoung.dungeonsguide.roomedit.mechanicedit;
-import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet;
-import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonSecret;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonTomb;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
-import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import kr.syeyoung.dungeonsguide.utils.TextUtils;
-import net.minecraft.util.BlockPos;
import java.awt.*;
import java.util.Arrays;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java
index 80e74839..60e4995a 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionDisplayPane.java
@@ -1,20 +1,12 @@
package kr.syeyoung.dungeonsguide.roomedit.panes;
-import kr.syeyoung.dungeonsguide.dungeon.actions.Action;
import kr.syeyoung.dungeonsguide.dungeon.actions.ActionChangeState;
import kr.syeyoung.dungeonsguide.dungeon.actions.tree.ActionTree;
-import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry;
-import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
-import kr.syeyoung.dungeonsguide.roomprocessor.ProcessorFactory;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import java.awt.*;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Set;
public class ActionDisplayPane extends MPanel {
private DungeonRoom dungeonRoom;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java
index 13d636ea..b85f9060 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java
@@ -3,20 +3,12 @@ package kr.syeyoung.dungeonsguide.roomedit.panes;
import kr.syeyoung.dungeonsguide.dungeon.actions.Action;
import kr.syeyoung.dungeonsguide.dungeon.actions.tree.ActionTree;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.utils.RenderUtils;
-import net.minecraft.block.Block;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.WorldRenderer;
-import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
-import net.minecraft.client.renderer.vertex.VertexFormat;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
import java.awt.*;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/DynamicEditor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/DynamicEditor.java
index f1b78cb2..c8a1ed9c 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/DynamicEditor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/DynamicEditor.java
@@ -1,7 +1,6 @@
package kr.syeyoung.dungeonsguide.roomedit.panes;
-import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MParameter;
+import kr.syeyoung.dungeonsguide.gui.elements.MParameter;
import java.util.List;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java
index 06cfca2e..11e1982c 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java
@@ -4,8 +4,8 @@ import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry;
import kr.syeyoung.dungeonsguide.e;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.roomprocessor.ProcessorFactory;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
@@ -16,16 +16,11 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
-import scala.collection.immutable.List;
import java.awt.*;
-import java.io.DataOutputStream;
import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.UUID;
-import java.util.zip.GZIPOutputStream;
public class GeneralEditPane extends MPanel {
private DungeonRoom dungeonRoom;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java
index 04747487..9ea8cf79 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ProcessorParameterEditPane.java
@@ -2,10 +2,10 @@ package kr.syeyoung.dungeonsguide.roomedit.panes;
import kr.syeyoung.dungeonsguide.dungeon.data.DungeonRoomInfo;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MParameter;
+import kr.syeyoung.dungeonsguide.gui.elements.MButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MParameter;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditRegistry;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java
index ebffa29d..86739f46 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java
@@ -1,13 +1,12 @@
package kr.syeyoung.dungeonsguide.roomedit.panes;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
-import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java
index 7188c8a7..2daaf265 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java
@@ -3,7 +3,7 @@ package kr.syeyoung.dungeonsguide.roomedit.panes;
import kr.syeyoung.dungeonsguide.config.guiconfig.FeatureEditPane;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.utils.ArrayUtils;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java
index 5369f40a..1bb143ef 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoommatchingPane.java
@@ -1,11 +1,9 @@
package kr.syeyoung.dungeonsguide.roomedit.panes;
-import kr.syeyoung.dungeonsguide.dungeon.actions.ActionChangeState;
-import kr.syeyoung.dungeonsguide.dungeon.actions.tree.ActionTree;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MTextField;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
+import kr.syeyoung.dungeonsguide.gui.elements.MButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MTextField;
import java.awt.*;
import java.util.UUID;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java
index 84c36aab..10a40013 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java
@@ -3,10 +3,10 @@ package kr.syeyoung.dungeonsguide.roomedit.panes;
import kr.syeyoung.dungeonsguide.dungeon.data.DungeonRoomInfo;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MParameter;
+import kr.syeyoung.dungeonsguide.gui.elements.MButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MParameter;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator;
import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditRegistry;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java
index 22b0fe71..b904c039 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java
@@ -1,11 +1,11 @@
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.config.types.AColor;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MColor;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MFloatSelectionButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabelAndElement;
+import kr.syeyoung.dungeonsguide.gui.elements.MColor;
+import kr.syeyoung.dungeonsguide.gui.elements.MFloatSelectionButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabelAndElement;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java
index 5954d857..b485986c 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java
@@ -1,10 +1,10 @@
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabelAndElement;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MStringSelectionButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabel;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabelAndElement;
+import kr.syeyoung.dungeonsguide.gui.elements.MStringSelectionButton;
import java.awt.*;
import java.util.Arrays;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java
index 52b0bcca..c39c2179 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java
@@ -1,9 +1,8 @@
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
-import net.minecraft.client.gui.Gui;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java
index 0e263561..c5d23053 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java
@@ -1,11 +1,10 @@
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MFloatSelectionButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MIntegerSelectionButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabelAndElement;
+import kr.syeyoung.dungeonsguide.gui.elements.MFloatSelectionButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabel;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabelAndElement;
import java.awt.*;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java
index 0dbeeb24..4d61cdd6 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java
@@ -1,11 +1,10 @@
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MIntegerSelectionButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabelAndElement;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MTextField;
+import kr.syeyoung.dungeonsguide.gui.elements.MIntegerSelectionButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabel;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabelAndElement;
import java.awt.*;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java
index 19b90527..3d121493 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java
@@ -2,9 +2,9 @@ package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.*;
+import kr.syeyoung.dungeonsguide.gui.elements.*;
import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
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 1f732cd3..bf26c3ea 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
@@ -3,10 +3,10 @@ package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet;
import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MButton;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MValue;
+import kr.syeyoung.dungeonsguide.gui.elements.MButton;
+import kr.syeyoung.dungeonsguide.gui.elements.MValue;
import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonAddSet;
import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import lombok.Getter;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java
index 2ec869e1..f978d845 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java
@@ -1,10 +1,10 @@
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
-import kr.syeyoung.dungeonsguide.roomedit.MPanel;
+import kr.syeyoung.dungeonsguide.gui.MPanel;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MLabelAndElement;
-import kr.syeyoung.dungeonsguide.roomedit.elements.MTextField;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabel;
+import kr.syeyoung.dungeonsguide.gui.elements.MLabelAndElement;
+import kr.syeyoung.dungeonsguide.gui.elements.MTextField;
import java.awt.*;