diff options
4 files changed, 14 insertions, 6 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/PlayerModelRenderer.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/PlayerModelRenderer.java index 123435ce..3834f966 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/PlayerModelRenderer.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/PlayerModelRenderer.java @@ -153,7 +153,9 @@ public class PlayerModelRenderer extends AnnotatedExportOnlyWidget implements La this.tooltip = null; } else if (toHover != null && this.tooltip == null) PopupMgr.getPopupMgr(getDomElement()) - .openPopup(this.tooltip = new MouseTooltip(absMouseX, absMouseY, actualTooltip), null); + .openPopup(this.tooltip = new MouseTooltip(absMouseX, absMouseY, actualTooltip),(a) -> { + this.tooltip = null; + }); return false; } diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetDataRendererWrapper.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetDataRendererWrapper.java index 04d16318..636a6f26 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetDataRendererWrapper.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetDataRendererWrapper.java @@ -87,7 +87,9 @@ public class WidgetDataRendererWrapper extends Widget implements Layouter, Rende this.tooltip = null; } else if (toHover != null && this.tooltip == null) PopupMgr.getPopupMgr(getDomElement()) - .openPopup(this.tooltip = new MouseTooltip(absMouseX, absMouseY, actualTooltip), null); + .openPopup(this.tooltip = new MouseTooltip(absMouseX, absMouseY, actualTooltip), (a) -> { + this.tooltip = null; + }); return false; } diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetPlayerInventory.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetPlayerInventory.java index c29be21d..04a74357 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetPlayerInventory.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetPlayerInventory.java @@ -90,7 +90,7 @@ public class WidgetPlayerInventory extends Widget implements Renderer, Layouter @Override public boolean mouseMoved(int absMouseX, int absMouseY, double relMouseX, double relMouseY) { List<String> toHover = null; - if (getDomElement().getAbsBounds().contains(absMouseX, absMouseY)) { + if (getDomElement().getAbsBounds().contains(absMouseX, absMouseY) && playerProfile.getInventory() != null) { ItemStack toHoverStack = null; for (int i = 0; i < playerProfile.getInventory().length; i++) { int x = (i % 9) * 18 + 1; @@ -120,11 +120,13 @@ public class WidgetPlayerInventory extends Widget implements Renderer, Layouter if (toHover == null && this.tooltip != null) { PopupMgr.getPopupMgr(getDomElement()) - .closePopup(this.tooltip, null); + .closePopup(this.tooltip); this.tooltip = null; } else if (toHover != null && this.tooltip == null) PopupMgr.getPopupMgr(getDomElement()) - .openPopup(this.tooltip = new MouseTooltip(absMouseX, absMouseY, actualTooltip), null); + .openPopup(this.tooltip = new MouseTooltip(absMouseX, absMouseY, actualTooltip), (a) -> { + this.tooltip = null; + }); return false; } diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetProfileViewerData.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetProfileViewerData.java index d84e0c11..d984c34c 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetProfileViewerData.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/widget/WidgetProfileViewerData.java @@ -121,7 +121,9 @@ public class WidgetProfileViewerData extends AnnotatedWidget { scaler.child.setValue(new WidgetPlayerInventory( playerSkyblockData.getPlayerProfiles()[idx] )); - popupMgr.openPopup(popup = new LocationedPopup(x, y, scaler), null); + popupMgr.openPopup(popup = new LocationedPopup(x, y, scaler), (a) -> { + this.popup = null; + }); } } |