diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-02-06 10:39:36 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-02-06 10:39:36 +0700 |
commit | 6ef0b0b64522ae45bf3747b26bd6dc5f58358f82 (patch) | |
tree | 267709bb401f10f414534552a39a7697614aa4f9 /src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt | |
parent | 1307b6c8f8f7a4aa4d1fd9781cddb5edd0c9f349 (diff) | |
download | Chatting-6ef0b0b64522ae45bf3747b26bd6dc5f58358f82.tar.gz Chatting-6ef0b0b64522ae45bf3747b26bd6dc5f58358f82.tar.bz2 Chatting-6ef0b0b64522ae45bf3747b26bd6dc5f58358f82.zip |
1.3.0
Diffstat (limited to 'src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt')
-rw-r--r-- | src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt b/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt index d75339b..983e2ed 100644 --- a/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt +++ b/src/main/kotlin/cc/woverflow/chatting/gui/ChatShortcutEditGui.kt @@ -8,10 +8,7 @@ import gg.essential.elementa.WindowScreen import gg.essential.elementa.components.UIBlock import gg.essential.elementa.constraints.CenterConstraint import gg.essential.elementa.constraints.SiblingConstraint -import gg.essential.elementa.dsl.childOf -import gg.essential.elementa.dsl.constrain -import gg.essential.elementa.dsl.percent -import gg.essential.elementa.dsl.pixels +import gg.essential.elementa.dsl.* import gg.essential.vigilance.gui.VigilancePalette import gg.essential.vigilance.gui.settings.ButtonComponent import gg.essential.vigilance.gui.settings.TextComponent @@ -24,7 +21,8 @@ class ChatShortcutEditGui(private var alias: String, private var command: String override fun initScreen(width: Int, height: Int) { super.initScreen(width, height) - val block = UIBlock(VigilancePalette.getBackground()).constrain { + window.clearChildren() // make sure everything is cleared, sometimes the shortcuts duplicated + val block by UIBlock(VigilancePalette.getBackground()).constrain { this.x = CenterConstraint() this.y = CenterConstraint() this.width = 100.pixels() |