From 142fd09bff5f93cf36dac2b6805795446c9e9ef9 Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Sat, 18 May 2024 21:42:26 +0200 Subject: [PATCH] [orx-gui] Add windowClosable to WindowedGUI --- orx-jvm/orx-gui/src/main/kotlin/WindowedGUI.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/orx-jvm/orx-gui/src/main/kotlin/WindowedGUI.kt b/orx-jvm/orx-gui/src/main/kotlin/WindowedGUI.kt index f52fe313..2a8f72d5 100644 --- a/orx-jvm/orx-gui/src/main/kotlin/WindowedGUI.kt +++ b/orx-jvm/orx-gui/src/main/kotlin/WindowedGUI.kt @@ -11,7 +11,8 @@ private val childWindows = mutableMapOf() class WindowedGUI( val appearance: GUIAppearance = GUIAppearance(), - val defaultStyles: List = defaultStyles() + val defaultStyles: List = defaultStyles(), + val windowClosable: Boolean = false, ) : Extension { override var enabled: Boolean = true @@ -41,7 +42,8 @@ class WindowedGUI( val cw = childWindows.getOrPut(Driver.instance.contextID) { program.window( WindowConfiguration( - width = 200, + closable = windowClosable, + width = appearance.barWidth, height = program.height, position = program.window.position.toInt() - IntVector2(200, 0) )