diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-05-09 18:09:24 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-05-09 18:09:24 +0300 |
| commit | 9b9c0f0594209b8c4ecdb7901293734ccf567437 (patch) | |
| tree | 0843cb07aa00ce80418f01a1ad083f72e45d7d93 /src/main/kotlin/me/kyren223/trident/data/SettingsData.kt | |
| parent | 1e30fa7ded9939fa45a45f82f84c1e8cd95d68aa (diff) | |
Finished implementing all the settings, mapping menu, trident list menu, and fixed all the bugs/issues.
Added more index actions for a total of 10 actions (compared to the original 4).
Updated README.md and TODO.md.
Changed version to 2.0.0.
Versions now follow the semver standard. which means that for each major version there will be backwards incompatible changes. for minor versions there will be new features and bug fixes. and for patch versions there will be bug fixes only.
Diffstat (limited to 'src/main/kotlin/me/kyren223/trident/data/SettingsData.kt')
| -rw-r--r-- | src/main/kotlin/me/kyren223/trident/data/SettingsData.kt | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/main/kotlin/me/kyren223/trident/data/SettingsData.kt b/src/main/kotlin/me/kyren223/trident/data/SettingsData.kt index 2c5c467..eed655e 100644 --- a/src/main/kotlin/me/kyren223/trident/data/SettingsData.kt +++ b/src/main/kotlin/me/kyren223/trident/data/SettingsData.kt @@ -16,14 +16,15 @@ class SettingsData { val panel: JPanel - private val width = JBIntSpinner(SettingsState.instance.width, minValue, maxValue, step) - private val height = JBIntSpinner(SettingsState.instance.height, minValue, maxValue, step) - private val fontSize = JBIntSpinner(SettingsState.instance.fontSize, minValue, maxValue, step) + private val width = JBIntSpinner(Settings.state.width, minValue, maxValue, step) + private val height = JBIntSpinner(Settings.state.height, minValue, maxValue, step) + private val fontSize = JBIntSpinner(Settings.state.fontSize, minValue, maxValue, step) - private val enterToSelect = JBCheckBox(null, SettingsState.instance.enterToSelect) - private val rememberLine = JBCheckBox(null, SettingsState.instance.rememberLine) - private val automaticMapping = JBCheckBox(null, SettingsState.instance.automaticMapping) - private val recursiveMapping = JBCheckBox(null, SettingsState.instance.recursiveMapping) + private val enterToSelect = JBCheckBox(null, Settings.state.enterToSelect) + private val rememberLine = JBCheckBox(null, Settings.state.rememberLine) + private val automaticMapping = JBCheckBox(null, Settings.state.automaticMapping) + private val recursiveMapping = JBCheckBox(null, Settings.state.recursiveMapping) + private val indexCycling = JBCheckBox(null, Settings.state.indexCycling) init { panel = FormBuilder.createFormBuilder() @@ -56,6 +57,10 @@ class SettingsData { "and will be selected when the TridentList is opened.")) .addComponent(desc("Note, this does not persist across restarts, it's run-time only.")) + .addLabeledComponent("Index cycling", indexCycling) + .addComponent(desc("If enabled, indexes will be cyclic, " + + "For example if you have 3 files and hotkey to 4, it'll cycle to 1.")) + .addComponentFillVertically(JPanel(), 0) .panel } @@ -121,4 +126,12 @@ class SettingsData { fun setRecursiveMapping(recursiveMapping: Boolean) { this.recursiveMapping.isSelected = recursiveMapping } + + fun getIndexCycling(): Boolean { + return indexCycling.isSelected + } + + fun setIndexCycling(indexCycling: Boolean) { + this.indexCycling.isSelected = indexCycling + } } |
