diff options
author | inglettronald <inglettronald@gmail.com> | 2023-07-19 10:34:12 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-07-19 10:34:12 -0500 |
commit | 261370d3539579b23f3cf07733d310e9ff35becb (patch) | |
tree | 799742697b26243d376a0b9030c909446e0b377c /src/main/kotlin | |
parent | 306e32869357f2151d733a6b11e547b676d06954 (diff) | |
download | DulkirMod-Fabric-261370d3539579b23f3cf07733d310e9ff35becb.tar.gz DulkirMod-Fabric-261370d3539579b23f3cf07733d310e9ff35becb.tar.bz2 DulkirMod-Fabric-261370d3539579b23f3cf07733d310e9ff35becb.zip |
working on some polish for animations code
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt index 0b04c0f..a3a73aa 100644 --- a/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt +++ b/src/main/kotlin/com/dulkirfabric/config/DulkirConfig.kt @@ -152,18 +152,21 @@ class DulkirConfig { //TODO: Come up with some custome float slider instead of int slider jank animations.addEntry( - entryBuilder.startIntSlider(Text.literal("posX"), configOptions.heldItemPosX, -300, 300) + entryBuilder.startIntSlider(Text.literal("posX"), configOptions.heldItemPosX, -150, 150) .setSaveConsumer { newValue -> configOptions.heldItemPosX = newValue } + .setDefaultValue(0) .build() ) animations.addEntry( - entryBuilder.startIntSlider(Text.literal("posY"), configOptions.heldItemPosY, -300, 300) + entryBuilder.startIntSlider(Text.literal("posY"), configOptions.heldItemPosY, -150, 150) .setSaveConsumer { newValue -> configOptions.heldItemPosY = newValue } + .setDefaultValue(0) .build() ) animations.addEntry( - entryBuilder.startIntSlider(Text.literal("posZ"), configOptions.heldItemPosZ, -300, 300) + entryBuilder.startIntSlider(Text.literal("posZ"), configOptions.heldItemPosZ, -150, 50) .setSaveConsumer { newValue -> configOptions.heldItemPosZ = newValue } + .setDefaultValue(0) .build() ) animations.addEntry( @@ -182,7 +185,7 @@ class DulkirConfig { .build() ) animations.addEntry( - entryBuilder.startFloatField(Text.literal("scale"), configOptions.heldItemScale) + entryBuilder.startFloatField(Text.literal("Held Item Scale"), configOptions.heldItemScale) .setTooltip(Text.literal("Recommended range of .1 - 2")) .setSaveConsumer { newValue -> configOptions.heldItemScale = newValue @@ -190,10 +193,13 @@ class DulkirConfig { .build() ) animations.addEntry( - entryBuilder.startIntSlider(Text.literal("rotationZ"), configOptions.handSwingDuration, 2, 15) + entryBuilder.startIntSlider(Text.literal("Swing Speed"), configOptions.handSwingDuration, 2, 20) .setSaveConsumer { newValue -> configOptions.handSwingDuration = newValue } .build() ) + animations.addEntry( + entryBuilder.mkToggle(Text.literal("Cancel Re-equip Animation"), configOptions::cancelReEquip) + ) builder.transparentBackground() @@ -224,10 +230,11 @@ class DulkirConfig { var heldItemRotX: Int = 0, var heldItemRotY: Int = 0, var heldItemRotZ: Int = 0, - var heldItemScale: Float = 0f, + var heldItemScale: Float = 1f, + var handSwingDuration: Int = 6, + var cancelReEquip: Boolean = false, var duraCooldown: Boolean = false, - var alarmTimeout: Int = 300, - var handSwingDuration: Int = 6 + var alarmTimeout: Int = 300 ) @Serializable |