aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/config
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-05-06 20:52:16 +0200
committerLinnea Gräf <nea@nea.moe>2024-05-06 20:52:16 +0200
commit79fbb4e6f69df86e885464ddb84b163b90872eee (patch)
treee6d0ede3289a41b838d172a2ba394596ead2268b /src/main/kotlin/moe/nea/ledger/config
parent12f7f03344decf77d96997bf2d4898c6b978bb3c (diff)
downloadLocalTransactionLedger-79fbb4e6f69df86e885464ddb84b163b90872eee.tar.gz
LocalTransactionLedger-79fbb4e6f69df86e885464ddb84b163b90872eee.tar.bz2
LocalTransactionLedger-79fbb4e6f69df86e885464ddb84b163b90872eee.zip
Add config gui
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/config')
-rw-r--r--src/main/kotlin/moe/nea/ledger/config/LedgerConfig.kt27
-rw-r--r--src/main/kotlin/moe/nea/ledger/config/Synchronization.kt11
2 files changed, 38 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/config/LedgerConfig.kt b/src/main/kotlin/moe/nea/ledger/config/LedgerConfig.kt
new file mode 100644
index 0000000..7ba5abf
--- /dev/null
+++ b/src/main/kotlin/moe/nea/ledger/config/LedgerConfig.kt
@@ -0,0 +1,27 @@
+package moe.nea.ledger.config
+
+import io.github.notenoughupdates.moulconfig.Config
+import io.github.notenoughupdates.moulconfig.DescriptionRendereringBehaviour
+import io.github.notenoughupdates.moulconfig.annotations.Category
+import io.github.notenoughupdates.moulconfig.processor.ProcessedOption
+import moe.nea.ledger.Ledger
+
+class LedgerConfig : Config() {
+ override fun getTitle(): String {
+ return "§6Ledger §7- §6Hypixel SkyBlock data logger §7by §anea89o"
+ }
+
+ override fun saveNow() {
+ super.saveNow()
+ Ledger.managedConfig.saveToFile()
+ }
+
+ override fun getDescriptionBehaviour(option: ProcessedOption?): DescriptionRendereringBehaviour {
+ return DescriptionRendereringBehaviour.EXPAND_PANEL
+ }
+
+ @Category(name = "Synchronization", desc = "")
+ @JvmField
+ val synchronization = Synchronization()
+
+} \ No newline at end of file
diff --git a/src/main/kotlin/moe/nea/ledger/config/Synchronization.kt b/src/main/kotlin/moe/nea/ledger/config/Synchronization.kt
new file mode 100644
index 0000000..e8d5906
--- /dev/null
+++ b/src/main/kotlin/moe/nea/ledger/config/Synchronization.kt
@@ -0,0 +1,11 @@
+package moe.nea.ledger.config
+
+import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean
+import io.github.notenoughupdates.moulconfig.annotations.ConfigOption
+
+class Synchronization {
+ @ConfigOption(name = "Test Option", desc = "Test Description")
+ @ConfigEditorBoolean
+ @JvmField
+ var testOption = false
+} \ No newline at end of file