new toggler design

This commit is contained in:
minjaesong
2023-05-21 20:46:54 +09:00
parent eee551058f
commit 3ba7ddd30e
4 changed files with 71 additions and 22 deletions

View File

@@ -79,7 +79,7 @@ class UIGraphicsControlPanel(remoCon: UIRemoCon?) : UICanvas() {
}) to { _, _ -> }
}
else if (args.startsWith("toggle")) {
UIItemToggleButton(this, x, y, App.getConfigBoolean(optionName)) to { it: UIItem, optionStr: String ->
UIItemToggleButton(this, x, y, spinnerWidth, App.getConfigBoolean(optionName)) to { it: UIItem, optionStr: String ->
(it as UIItemToggleButton).clickOnceListener = { _, _, _ ->
it.toggle()
App.setConfig(optionStr, it.getStatus())