diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-07-30 17:23:41 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-07-30 17:25:04 +0200 |
| commit | 6300ff493fe90fd06162d2f4ce91339c07a50d11 (patch) | |
| tree | 5ee5bc676567ab2b025067d6bebd992f659144b9 /src/main/kotlin/features/macros | |
| parent | a30e0810604ee9122758879205434563ccc94738 (diff) | |
| download | Firmament-6300ff493fe90fd06162d2f4ce91339c07a50d11.tar.gz Firmament-6300ff493fe90fd06162d2f4ce91339c07a50d11.tar.bz2 Firmament-6300ff493fe90fd06162d2f4ce91339c07a50d11.zip | |
feat(dev): unpleasant gradient cape
Diffstat (limited to 'src/main/kotlin/features/macros')
| -rw-r--r-- | src/main/kotlin/features/macros/MacroUI.kt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/kotlin/features/macros/MacroUI.kt b/src/main/kotlin/features/macros/MacroUI.kt index 8c22c5c..5a7d406 100644 --- a/src/main/kotlin/features/macros/MacroUI.kt +++ b/src/main/kotlin/features/macros/MacroUI.kt @@ -1,7 +1,9 @@ package moe.nea.firmament.features.macros +import io.github.notenoughupdates.moulconfig.common.text.StructuredText import io.github.notenoughupdates.moulconfig.gui.CloseEventListener import io.github.notenoughupdates.moulconfig.observer.ObservableList +import io.github.notenoughupdates.moulconfig.platform.MoulConfigPlatform import io.github.notenoughupdates.moulconfig.xml.Bind import moe.nea.firmament.annotations.Subscribe import moe.nea.firmament.commands.thenExecute @@ -62,6 +64,9 @@ class MacroUI { val parent: Wheel, ) { @Bind + fun textR() = StructuredText.of(text) + + @Bind fun delete() { parent.editableCommands.removeIf { it === this } parent.editableCommands.update() @@ -82,7 +87,7 @@ class MacroUI { } @Bind("keyCombo") - fun text() = binding.format().string + fun text() = MoulConfigPlatform.wrap(binding.format()) @field:Bind("commands") val commands = commands.mapTo(ObservableList(mutableListOf())) { Command(it.command, this) } @@ -246,12 +251,15 @@ class MacroUI { @field:Bind("command") var command: String = (action.action as CommandAction).command + @Bind + fun commandR() = StructuredText.of(command) + @field:Bind("combo") val combo = action.keys.map { KeyBindingEditor(it, this) }.toObservableList() @Bind fun formattedCombo() = - combo.joinToString(" > ") { it.binding.toString() } + StructuredText.of(combo.joinToString(" > ") { it.binding.toString() }) // TODO: this can be joined without .toString() @Bind fun addStep() { |
