@@ -13,6 +13,7 @@ import net.minecraftforge.api.distmarker.Dist
1313import net.minecraftforge.api.distmarker.OnlyIn
1414import net.minecraftforge.client.event.ScreenEvent
1515import net.minecraftforge.common.MinecraftForge
16+ import yarden_zamir.column_quick_swap.ClientConfig
1617import yarden_zamir.column_quick_swap.ColumnQuickSwap
1718import yarden_zamir.column_quick_swap.DrawableNineSliceTexture
1819import yarden_zamir.column_quick_swap.networking.C2SSwapColumnSlotPacket
@@ -101,17 +102,19 @@ class ColumnPickScreen(
101102 }
102103
103104 private fun selectSlot (columnRow : Int ) {
104- // Play click sound - quieter, higher pitch
105- minecraft?.soundManager?.play(
106- SimpleSoundInstance .forUI(SoundEvents .UI_BUTTON_CLICK .value(), 1.4f , 0.3f )
107- )
105+ val cfg = ClientConfig .config
106+ if (cfg.playSound) {
107+ minecraft?.soundManager?.play(
108+ SimpleSoundInstance .forUI(SoundEvents .UI_BUTTON_CLICK .value(), cfg.soundPitch, cfg.soundVolume)
109+ )
110+ }
108111 Networking .channel.sendToServer(C2SSwapColumnSlotPacket (hotbarSlot, columnRow))
109112 onClose()
110113 }
111114
112115 override fun render (guiGraphics : GuiGraphics , mouseX : Int , mouseY : Int , partialTick : Float ) {
113- // Check if key released - select hovered item
114- if (! SlotInteractManager .columnPicking) {
116+ // Check if key released - select hovered item (if closeOnRelease enabled)
117+ if (ClientConfig .config.closeOnRelease && ! SlotInteractManager .columnPicking) {
115118 renderables.asSequence()
116119 .filterIsInstance<ColumnSlotButton >()
117120 .firstOrNull { it.isMouseOver(mouseX.toDouble(), mouseY.toDouble()) }
@@ -156,6 +159,8 @@ class ColumnPickScreen(
156159 override fun isPauseScreen (): Boolean = false
157160
158161 override fun mouseScrolled (mouseX : Double , mouseY : Double , delta : Double ): Boolean {
162+ if (! ClientConfig .config.allowScroll) return false
163+
159164 // Allow scrolling to change hotbar selection
160165 val player = minecraft?.player ? : return false
161166 val inventory = player.inventory
@@ -207,8 +212,8 @@ private class ColumnSlotButton(
207212
208213 // Hover highlight
209214 if (isMouseOver(mouseX.toDouble(), mouseY.toDouble())) {
210- guiGraphics.fill(x + 1 , y + 1 , x + width - 1 , y + height - 1 , 0x80FFFFFF .toInt() )
211- if (! item.isEmpty) {
215+ guiGraphics.fill(x + 1 , y + 1 , x + width - 1 , y + height - 1 , ClientConfig .config.highlightColor )
216+ if (! item.isEmpty && ClientConfig .config.showTooltips ) {
212217 renderTooltip(guiGraphics, mouseX, mouseY)
213218 }
214219 }
0 commit comments