aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java6
2 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java
index 94f79f7d..088a1bd9 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MStringSelectionButton.java
@@ -51,6 +51,10 @@ public class MStringSelectionButton extends MPanel {
});
}
+ public String selectionToDisplay(String selection) {
+ return selection;
+ }
+
public String getSelected() {
if (possible.size() == 0) return null;
return possible.get(selectedIndex);
@@ -58,7 +62,7 @@ public class MStringSelectionButton extends MPanel {
private void updateSelected() {
if (possible.size() == 0) selected.setText("-Empty-");
- else selected.setText(possible.get(selectedIndex));
+ else selected.setText(selectionToDisplay(possible.get(selectedIndex)));
}
@Override
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 21b05bfd..777f9736 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/gui/GuiDungeonParameterEdit.java
@@ -61,6 +61,12 @@ public class GuiDungeonParameterEdit extends GuiScreen {
public void resize(int parentWidth, int parentHeight) {
setBounds(new Rectangle(0, 20, parentWidth,20));
}
+
+ @Override
+ public String selectionToDisplay(String selection) {
+ String[] split = selection.split("\\.");
+ return super.selectionToDisplay(split[split.length - 1]);
+ }
};
mStringSelectionButton.setOnUpdate(new Runnable() {