diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt index 71590fef0..def2d9c69 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt @@ -797,6 +797,8 @@ private fun gui(provider: MatteryLanguageProvider) { gui("slot_filter.filtered", "This slot is filtered for automation") gui("slot_filter.forbidden", "This slot is forbidden for automation mechanisms") gui("slot_filter.hint", "To remove slot filter press Ctrl + LMB") + + gui("tooltip.enum.active", "> %s") } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/EnumRectangleButtonPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/EnumRectangleButtonPanel.kt index c7332ec61..44d1a1d34 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/EnumRectangleButtonPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/button/EnumRectangleButtonPanel.kt @@ -11,12 +11,8 @@ import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite import ru.dbotthepony.mc.otm.client.render.IGUIRenderable import ru.dbotthepony.mc.otm.client.render.UVWindingOrder import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel -import ru.dbotthepony.mc.otm.core.GetterSetter -import ru.dbotthepony.mc.otm.core.TextComponent -import ru.dbotthepony.mc.otm.core.next -import ru.dbotthepony.mc.otm.core.prev +import ru.dbotthepony.mc.otm.core.* import ru.dbotthepony.mc.otm.core.util.EnumValueCodec -import ru.dbotthepony.mc.otm.core.value import ru.dbotthepony.mc.otm.menu.input.IPlayerInputWithFeedback import java.util.* import java.util.function.Predicate @@ -164,7 +160,9 @@ abstract class EnumRectangleButtonPanel>( for ((k, entry) in enumMapping) { if (entry.tooltip != null && predicate.test(k)) { - listing.add(entry.tooltip.copy().withStyle(if (entry.key == prop.get()) ChatFormatting.WHITE else ChatFormatting.GRAY)) + val active = entry.key == prop.get() + val tooltip = entry.tooltip.copy().withStyle(if (active) ChatFormatting.WHITE else ChatFormatting.GRAY) + listing.add(if (active) TranslatableComponent("otm.gui.tooltip.enum.active", tooltip) else tooltip) } }