From 838acc57ff5cd447f35012083fb57df2ba90f646 Mon Sep 17 00:00:00 2001 From: downthecrop Date: Thu, 24 Oct 2024 23:21:55 -0700 Subject: [PATCH] handing for altcanvas in alerts --- plugin-playground/src/main/kotlin/KondoKit/Helpers.kt | 2 +- plugin-playground/src/main/kotlin/KondoKit/plugin.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin-playground/src/main/kotlin/KondoKit/Helpers.kt b/plugin-playground/src/main/kotlin/KondoKit/Helpers.kt index bfcac22..67530e3 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/Helpers.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/Helpers.kt @@ -68,7 +68,7 @@ object Helpers { // Adjust for parent component location if it exists - if (parentComponent != null) { + if (parentComponent != null && GameShell.canvas.isShowing) { val parentLocation = parentComponent.locationOnScreen val x = parentLocation.x val y = GameShell.canvas.locationOnScreen.y diff --git a/plugin-playground/src/main/kotlin/KondoKit/plugin.kt b/plugin-playground/src/main/kotlin/KondoKit/plugin.kt index a1b5137..6e1adbb 100644 --- a/plugin-playground/src/main/kotlin/KondoKit/plugin.kt +++ b/plugin-playground/src/main/kotlin/KondoKit/plugin.kt @@ -324,7 +324,7 @@ class plugin : Plugin() { if (frame != null) { // Create the AltCanvas and add it to the main frame altCanvas = createAltCanvas(canvas) - + canvas.isVisible = false // Use BorderLayout for better layout control frame.layout = BorderLayout()