diff options
4 files changed, 21 insertions, 18 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java index f72dcce4..a1c4410b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java @@ -28,8 +28,8 @@ public class DataRenderDungeonFloorStat implements DataRenderer { FloorSpecificData<DungeonStat.PlayedFloor> playedFloorFloorSpecificData = dungeonStatDungeonSpecificData.getData().getPlays().get(floor); if (playedFloorFloorSpecificData != null) { flag = true; - fr.drawString("§b" + floorName + " §a" + playedFloorFloorSpecificData.getData().getBestScore() + " §f" + playedFloorFloorSpecificData.getData().getCompletions() + "§7/§f" + playedFloorFloorSpecificData.getData().getWatcherKills() + "§7/§f" + playedFloorFloorSpecificData.getData().getTimes_played() + " §7(" + (int) (playedFloorFloorSpecificData.getData().getCompletions() / (double) playedFloorFloorSpecificData.getData().getWatcherKills()) + "%)", 0, 0, -1); - fr.drawString("§6S+ §e" + (playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "n/a") + " §6S §e" + (playedFloorFloorSpecificData.getData().getFastestTimeS() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "n/a"), 0, fr.FONT_HEIGHT, -1); + fr.drawString("§b" + floorName + " §a" + playedFloorFloorSpecificData.getData().getBestScore() + " §f" + playedFloorFloorSpecificData.getData().getCompletions() + "§7/§f" + playedFloorFloorSpecificData.getData().getWatcherKills() + "§7/§f" + playedFloorFloorSpecificData.getData().getTimes_played() + " §7(" + (int) (playedFloorFloorSpecificData.getData().getCompletions()*100 / (double) playedFloorFloorSpecificData.getData().getWatcherKills()) + "%)", 0, 0, -1); + fr.drawString("§6S+ §e" + (playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "N/A") + " §6S §e" + (playedFloorFloorSpecificData.getData().getFastestTimeS() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "N/A"), 0, fr.FONT_HEIGHT, -1); } } if (!flag) { @@ -70,9 +70,9 @@ public class DataRenderDungeonFloorStat implements DataRenderer { "§bTotal Completions§7: §f"+playedFloorFloorSpecificData.getData().getCompletions(), "§bTotal Watcher kills§7: §f"+playedFloorFloorSpecificData.getData().getWatcherKills(), "§bTotal Runs§7: §f"+playedFloorFloorSpecificData.getData().getTimes_played(), - "§bFastest S+§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "n/a"), - "§bFastest S§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeS() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "n/a"), - "§bFastest Run§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTime() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTime()) : "n/a"), + "§bFastest S+§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "N/A"), + "§bFastest S§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeS() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "N/A"), + "§bFastest Run§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTime() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTime()) : "N/A"), "§bMost Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMostMobsKilled(), "§bTotal Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMobsKilled() ), mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java index 631fad58..cc27bb70 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java @@ -27,14 +27,14 @@ public class DataRenderDungeonHighestFloorStat implements DataRenderer { String floorName = (dungeonType == DungeonType.CATACOMBS ? "F" : "M") + dungeonStatDungeonSpecificData.getData().getHighestCompleted(); if (playedFloorFloorSpecificData != null) { flag = true; - fr.drawString("§bH: " + floorName + " §a" + playedFloorFloorSpecificData.getData().getBestScore() + " §f" + playedFloorFloorSpecificData.getData().getCompletions() + "§7/§f" + playedFloorFloorSpecificData.getData().getWatcherKills() + "§7/§f" + playedFloorFloorSpecificData.getData().getTimes_played() + " §7(" + (int) (playedFloorFloorSpecificData.getData().getCompletions() / (double) playedFloorFloorSpecificData.getData().getWatcherKills()) + "%)", 0, 0, -1); - fr.drawString("§6S+ §e" + (playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "n/a") + " §6S §e" + (playedFloorFloorSpecificData.getData().getFastestTimeS() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "n/a"), 0, fr.FONT_HEIGHT, -1); + fr.drawString("§bH: " + floorName + " §a" + playedFloorFloorSpecificData.getData().getBestScore() + " §f" + playedFloorFloorSpecificData.getData().getCompletions() + "§7/§f" + playedFloorFloorSpecificData.getData().getWatcherKills() + "§7/§f" + playedFloorFloorSpecificData.getData().getTimes_played() + " §7(" + (int) (playedFloorFloorSpecificData.getData().getCompletions() *100/ (double) playedFloorFloorSpecificData.getData().getWatcherKills()) + "%)", 0, 0, -1); + fr.drawString("§6S+ §e" + (playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "N/A") + " §6S §e" + (playedFloorFloorSpecificData.getData().getFastestTimeS() != -1 ? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "N/A"), 0, fr.FONT_HEIGHT, -1); } } } if (!flag) { fr.drawString("§cNo Highest Floor for ", 0,0,-1); - fr.drawString("§c"+dungeonType.getFamiliarName(), 0,0,-1); + fr.drawString("§c"+dungeonType.getFamiliarName(), 0,fr.FONT_HEIGHT,-1); } return getDimension(); @@ -72,9 +72,9 @@ public class DataRenderDungeonHighestFloorStat implements DataRenderer { "§bTotal Completions§7: §f"+playedFloorFloorSpecificData.getData().getCompletions(), "§bTotal Watcher kills§7: §f"+playedFloorFloorSpecificData.getData().getWatcherKills(), "§bTotal Runs§7: §f"+playedFloorFloorSpecificData.getData().getTimes_played(), - "§bFastest S+§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "n/a"), - "§bFastest S§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeS() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "n/a"), - "§bFastest Run§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTime() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTime()) : "n/a"), + "§bFastest S+§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeSPlus() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeSPlus()) : "N/A"), + "§bFastest S§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTimeS() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTimeS()) : "N/A"), + "§bFastest Run§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTime() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTime()) : "N/A"), "§bMost Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMostMobsKilled(), "§bTotal Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMobsKilled() ), mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java index 1e30e5eb..b42f1aa0 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererEditor.java @@ -33,7 +33,7 @@ public class DataRendererEditor extends MPanel { private int lastX; private int lastY; private int scrollY; - private final int baseWidth = 100; + private final int baseWidth = 120; private final int hamburgerWidth = Minecraft.getMinecraft().fontRendererObj.getStringWidth("=="); @Override @@ -194,7 +194,7 @@ public class DataRendererEditor extends MPanel { Set<String> rest = new HashSet<>(DataRendererRegistry.getValidDataRenderer()); rest.removeAll( feature.<List<String>>getParameter("datarenderers").getValue()); rest.remove(currentlySelected); - int culmutativeY = 0; + int culmutativeY = -scrollY; for (String datarenderers : rest) { DataRenderer dataRenderer = DataRendererRegistry.getDataRenderer(datarenderers); Dimension dim; @@ -210,7 +210,7 @@ public class DataRendererEditor extends MPanel { if (legitRelY < culmutativeY) { currentlySelected = datarenderers; selectedX = 155; - selectedY = culmutativeY - dim.height + 5+fr.FONT_HEIGHT + 3 - scrollY; + selectedY = culmutativeY - dim.height + 5+fr.FONT_HEIGHT + 3; break; } } @@ -294,10 +294,13 @@ public class DataRendererEditor extends MPanel { super.mouseScrolled(absMouseX, absMouseY, relMouseX0, relMouseY0, scrollAmount); FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; - if (!new Rectangle(155,5+fr.FONT_HEIGHT + 3, hamburgerWidth, 230).contains(relMouseX0, relMouseY0)) return; + if (!new Rectangle(155,5+fr.FONT_HEIGHT + 3, hamburgerWidth+baseWidth+1, 230).contains(relMouseX0, relMouseY0)) return; - if (scrollAmount > 0) scrollY += 20; - if (scrollAmount < 0) scrollY -= 20; + if (scrollAmount < 0) scrollY += 20; + if (scrollAmount > 0) scrollY -= 20; if (scrollY < 0) scrollY = 0; + System.out.println(scrollY); + + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java index 5e68e174..814ed011 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java @@ -111,7 +111,7 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen if (popupRect == null) { - popupRect = new Rectangle(mouseX, mouseY, 200, 220); + popupRect = new Rectangle(mouseX, mouseY, 220, 220); if (popupRect.y + popupRect.height > scaledResolution.getScaledHeight()) { popupRect.y -= popupRect.y + popupRect.height - scaledResolution.getScaledHeight(); } |