diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt index cc4cf4670..7d400ffb5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/AndroidResearchType.kt @@ -22,7 +22,7 @@ import net.minecraft.world.item.crafting.Ingredient import net.minecraft.world.level.ItemLike import net.minecraftforge.registries.ForgeRegistries import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite -import ru.dbotthepony.mc.otm.client.render.SkinElementType +import ru.dbotthepony.mc.otm.client.render.SpriteType import ru.dbotthepony.mc.otm.core.ListSet import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.core.isActuallyEmpty @@ -102,7 +102,7 @@ class AndroidResearchType( val resolvedSkinIcon by lazy { check(isClient) { "Invalid realm" } if (skinIcon != null) - SkinElementType.fromJson(skinIcon) + SpriteType.fromJson(skinIcon) else null } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt index d2805f377..453e38637 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt @@ -34,7 +34,7 @@ import ru.dbotthepony.mc.otm.capability.extractEnergyInnerExact import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource import ru.dbotthepony.mc.otm.client.render.ResearchIcons -import ru.dbotthepony.mc.otm.client.render.element +import ru.dbotthepony.mc.otm.client.render.sprite import ru.dbotthepony.mc.otm.client.render.linesIgnoreZRenderType import ru.dbotthepony.mc.otm.core.Vector import ru.dbotthepony.mc.otm.core.asVector @@ -394,7 +394,7 @@ class EnderTeleporterFeature(capability: MatteryPlayerCapability) : AndroidActiv private val SHAPE_CHECK_NOT_FENCE = Block.box(6.0, 17.0, 6.0, 10.0, 31.0, 10.0) private val SHAPE_CHECK_SUPPORT_PLAYER = Block.box(6.0, 0.0, 6.0, 10.0, 16.0, 10.0) - val SPRITE = ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/item/black_hole.png").element(0f, 0f, 16f, 16f, 16f, 16f) + val SPRITE = ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/item/black_hole.png").sprite(0f, 0f, 16f, 16f, 16f, 16f) val POWER_COST_DESCRIPTION = AndroidResearchManager.descriptionFunc( diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt index a7f6ddbfc..9e91f0ade 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -29,11 +29,11 @@ import kotlin.math.ceil object MatteryGUI { private val BARS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/player_bars.png"), 80f, 35f) - val CHARGE = BARS.subElement(height = 9f) - val CHARGE_BG = BARS.subElement(y = 9f, height = 9f) + val CHARGE = BARS.sprite(height = 9f) + val CHARGE_BG = BARS.sprite(y = 9f, height = 9f) - val CHARGE_HUNGER = BARS.subElement(y = 18f, height = 9f) - val CHARGE_HUNGER_BG = BARS.subElement(y = 27f, height = 9f) + val CHARGE_HUNGER = BARS.sprite(y = 18f, height = 9f) + val CHARGE_HUNGER_BG = BARS.sprite(y = 27f, height = 9f) private var originalBedButtonX = -1 private var originalBedButtonY = -1 diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt index 02435dc3e..55cb45618 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AbstractMatterySprite.kt @@ -14,7 +14,6 @@ import net.minecraft.resources.ResourceLocation import org.lwjgl.opengl.GL11.GL_ALWAYS import ru.dbotthepony.mc.otm.core.RGBAColor import ru.dbotthepony.mc.otm.core.linearInterpolation -import java.lang.ref.WeakReference import java.util.concurrent.ConcurrentHashMap sealed class AbstractMatterySprite { @@ -43,7 +42,7 @@ sealed class AbstractMatterySprite { return v0 + (offset / height) * (v1 - v0) } - abstract val type: SkinElementType + abstract val type: SpriteType open val winding: UVWindingOrder get() = UVWindingOrder.NORMAL diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatteryAtlas.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatteryAtlas.kt index 601ba15bb..9052dcdae 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatteryAtlas.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatteryAtlas.kt @@ -8,7 +8,7 @@ data class MatteryAtlas( val height: Float, val winding: UVWindingOrder = UVWindingOrder.NORMAL, ) { - fun subElement( + fun sprite( x: Float = 0f, y: Float = 0f, width: Float = this.width, @@ -17,8 +17,8 @@ data class MatteryAtlas( ) = MatterySprite(texture, x = x, y = y, width = width, height = height, atlasHeight = this.height, atlasWidth = this.width, winding = winding) @Deprecated("Construct grid directly instead") - fun subGrid(rows: Int, columns: Int) = GridAtlas(texture, this.width / rows, this.height / columns, rows = rows, columns = columns) + fun grid(rows: Int, columns: Int) = GridAtlas(texture, this.width / rows, this.height / columns, rows = rows, columns = columns) @Deprecated("Construct grid directly instead") - fun subGrid(width: Float, height: Float, rows: Int, columns: Int) = GridAtlas(texture, width, height, rows, columns) + fun grid(width: Float, height: Float, rows: Int, columns: Int) = GridAtlas(texture, width, height, rows, columns) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatterySprite.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatterySprite.kt index 352afb437..980a6f166 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatterySprite.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/MatterySprite.kt @@ -2,7 +2,7 @@ package ru.dbotthepony.mc.otm.client.render import net.minecraft.resources.ResourceLocation -fun ResourceLocation.element( +fun ResourceLocation.sprite( x: Float, y: Float, width: Float, @@ -62,7 +62,7 @@ data class MatterySprite @JvmOverloads constructor( override val u1 = (this.x + width) / atlasWidth override val v1 = (this.y + height) / atlasHeight - override val type: SkinElementType - get() = SkinElementType.SINGLE + override val type: SpriteType + get() = SpriteType.SINGLE } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt index f71d40de4..f043c2c74 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/ResearchIcons.kt @@ -31,7 +31,7 @@ object ResearchIcons { val ICON_EXTENDED_REACH: AbstractMatterySprite val ICON_PHANTOM_ATTRACTOR: AbstractMatterySprite - val KOT = ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/block/ph_kitty.png").element(0f, 0f, 32f, 32f, 32f, 32f) + val KOT = ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/block/ph_kitty.png").sprite(0f, 0f, 32f, 32f, 32f, 32f) init { val grid = GridAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/android_upgrades.png"), 18f, 18f, 7, 7) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SkinElementType.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SpriteType.kt similarity index 97% rename from src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SkinElementType.kt rename to src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SpriteType.kt index a672e32ab..677e6a132 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SkinElementType.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SpriteType.kt @@ -7,7 +7,7 @@ import net.minecraft.network.FriendlyByteBuf import net.minecraft.resources.ResourceLocation import ru.dbotthepony.mc.otm.core.set -enum class SkinElementType { +enum class SpriteType { SINGLE { override fun toJson(value: AbstractMatterySprite): JsonObject { require(value is MatterySprite) { "Invalid skin element provided, expected SkinElement, got ${value::class.qualifiedName}" } @@ -63,7 +63,7 @@ enum class SkinElementType { return MatterySprite(ResourceLocation.tryParse(texture) ?: throw JsonSyntaxException("Invalid resource location: $texture"), x, y, width, height, imageWidth, imageHeight, UVWindingOrder.valueOf(winding)) } }, - SUBELEMENT { + SUBSPRITE { override fun toJson(value: AbstractMatterySprite): JsonObject { require(value is SubMatterySprite) { "Invalid skin element provided, expected SubSkinElement, got ${value::class.qualifiedName}" } @@ -125,12 +125,12 @@ enum class SkinElementType { companion object { fun fromNetwork(buff: FriendlyByteBuf): AbstractMatterySprite { - val type = buff.readEnum(SkinElementType::class.java) + val type = buff.readEnum(SpriteType::class.java) return type.fromNetwork(buff) } fun fromJson(element: JsonObject): AbstractMatterySprite { - val type = SkinElementType.valueOf(element["type"].asString) + val type = SpriteType.valueOf(element["type"].asString) return type.fromJson(element) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/StretchingRectangleElement.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/StretchingRectangleElement.kt index 4af924f63..971011285 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/StretchingRectangleElement.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/StretchingRectangleElement.kt @@ -60,8 +60,8 @@ data class StretchingRectangleElement( val padding = sideThickness - innerThickness return StretchingRectangleElement( - topLeft = texture.element(x, y, cornerWidth, cornerHeight, imageWidth, imageHeight), - topRight = texture.element( + topLeft = texture.sprite(x, y, cornerWidth, cornerHeight, imageWidth, imageHeight), + topRight = texture.sprite( x + width - cornerWidth, y, cornerWidth, @@ -69,7 +69,7 @@ data class StretchingRectangleElement( imageWidth, imageHeight ), - bottomLeft = texture.element( + bottomLeft = texture.sprite( x, y + height - cornerHeight, cornerWidth, @@ -77,7 +77,7 @@ data class StretchingRectangleElement( imageWidth, imageHeight ), - bottomRight = texture.element( + bottomRight = texture.sprite( x + width - cornerWidth, y + height - cornerHeight, cornerWidth, @@ -86,7 +86,7 @@ data class StretchingRectangleElement( imageHeight ), - top = texture.element( + top = texture.sprite( x + cornerWidth, y, width - cornerWidth * 2f, @@ -94,7 +94,7 @@ data class StretchingRectangleElement( imageWidth, imageHeight ), - bottom = texture.element( + bottom = texture.sprite( x + cornerWidth, y + height - sideThickness, width - cornerWidth * 2f, @@ -102,8 +102,8 @@ data class StretchingRectangleElement( imageWidth, imageHeight ), - left = texture.element(x, y, sideThickness, height - cornerHeight * 2f, imageWidth, imageHeight), - right = texture.element( + left = texture.sprite(x, y, sideThickness, height - cornerHeight * 2f, imageWidth, imageHeight), + right = texture.sprite( x, y + width - sideThickness, sideThickness, @@ -112,7 +112,7 @@ data class StretchingRectangleElement( imageHeight ), - middle = texture.element( + middle = texture.sprite( x + innerThickness, y + innerThickness, width - innerThickness * 2f, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SubMatterySprite.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SubMatterySprite.kt index 08b60e242..4dbdf4087 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SubMatterySprite.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SubMatterySprite.kt @@ -18,8 +18,8 @@ class SubMatterySprite( override val texture: ResourceLocation get() = parent.texture - override val type: SkinElementType - get() = SkinElementType.SUBELEMENT + override val type: SpriteType + get() = SpriteType.SUBSPRITE override val winding: UVWindingOrder get() = overrideWinding ?: parent.winding @@ -33,7 +33,7 @@ class SubMatterySprite( ) = SubMatterySprite(parent, xOffset, yOffset, width, height, overrideWinding) } -fun AbstractMatterySprite.subElement( +fun AbstractMatterySprite.sprite( x: Float = 0f, y: Float = 0f, width: Float = this.width, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets.kt index 3a23df616..5248b2d71 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets.kt @@ -1,12 +1,12 @@ package ru.dbotthepony.mc.otm.client.render object Widgets { - val SLOT = WidgetLocation.MISC.subElement(0f, 0f, 18f, 18f) + val SLOT = WidgetLocation.MISC.sprite(0f, 0f, 18f, 18f) - val ARROW_UP_BUTTON_IDLE = WidgetLocation.MISC.subElement(0f, 18f, 18f, 6f) - val ARROW_UP_BUTTON_HOVERED = WidgetLocation.MISC.subElement(0f, 18f + 6f, 18f, 6f) - val ARROW_UP_BUTTON_PRESSED = WidgetLocation.MISC.subElement(0f, 18f + 6f * 2f, 18f, 6f) - val ARROW_UP_BUTTON_DISABLED = WidgetLocation.MISC.subElement(0f, 18f + 6f * 3f, 18f, 6f) + val ARROW_UP_BUTTON_IDLE = WidgetLocation.MISC.sprite(0f, 18f, 18f, 6f) + val ARROW_UP_BUTTON_HOVERED = WidgetLocation.MISC.sprite(0f, 18f + 6f, 18f, 6f) + val ARROW_UP_BUTTON_PRESSED = WidgetLocation.MISC.sprite(0f, 18f + 6f * 2f, 18f, 6f) + val ARROW_UP_BUTTON_DISABLED = WidgetLocation.MISC.sprite(0f, 18f + 6f * 3f, 18f, 6f) val ARROW_DOWN_BUTTON_IDLE = ARROW_UP_BUTTON_IDLE.copy(winding = UVWindingOrder.FLIP) val ARROW_DOWN_BUTTON_HOVERED = ARROW_UP_BUTTON_HOVERED.copy(winding = UVWindingOrder.FLIP) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt index 741279d5d..84cde28be 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/Widgets18.kt @@ -5,15 +5,15 @@ private fun makeButton(grid: GridAtlas): StretchingRectangleElement { val y = grid.currentY return StretchingRectangleElement( - topLeft = WidgetLocation.WIDGETS_18.element(x, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight), - topRight = WidgetLocation.WIDGETS_18.element(x + 16f, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight), - bottomLeft = WidgetLocation.WIDGETS_18.element(x, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight), - bottomRight = WidgetLocation.WIDGETS_18.element(x + 16f, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight), - middle = WidgetLocation.WIDGETS_18.element(x + 2f, y + 2f, 14f, 14f, grid.atlasWidth, grid.atlasHeight), - top = WidgetLocation.WIDGETS_18.element(x + 2f, y, 14f, 2f, grid.atlasWidth, grid.atlasHeight), - left = WidgetLocation.WIDGETS_18.element(x, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight), - right = WidgetLocation.WIDGETS_18.element(x + 16f, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight), - bottom = WidgetLocation.WIDGETS_18.element(x + 2f, y + 16f, 14f, 2f, grid.atlasWidth, grid.atlasHeight), + topLeft = WidgetLocation.WIDGETS_18.sprite(x, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight), + topRight = WidgetLocation.WIDGETS_18.sprite(x + 16f, y, 2f, 2f, grid.atlasWidth, grid.atlasHeight), + bottomLeft = WidgetLocation.WIDGETS_18.sprite(x, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight), + bottomRight = WidgetLocation.WIDGETS_18.sprite(x + 16f, y + 16f, 2f, 2f, grid.atlasWidth, grid.atlasHeight), + middle = WidgetLocation.WIDGETS_18.sprite(x + 2f, y + 2f, 14f, 14f, grid.atlasWidth, grid.atlasHeight), + top = WidgetLocation.WIDGETS_18.sprite(x + 2f, y, 14f, 2f, grid.atlasWidth, grid.atlasHeight), + left = WidgetLocation.WIDGETS_18.sprite(x, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight), + right = WidgetLocation.WIDGETS_18.sprite(x + 16f, y + 2f, 2f, 14f, grid.atlasWidth, grid.atlasHeight), + bottom = WidgetLocation.WIDGETS_18.sprite(x + 2f, y + 16f, 14f, 2f, grid.atlasWidth, grid.atlasHeight), ) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt index 9489bb4b4..3f5456b3e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/ExoPackInventoryScreen.kt @@ -6,7 +6,7 @@ import ru.dbotthepony.mc.otm.client.mousePos import ru.dbotthepony.mc.otm.client.moveMousePosScaled import ru.dbotthepony.mc.otm.client.render.Widgets18 import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.client.render.element +import ru.dbotthepony.mc.otm.client.render.sprite import ru.dbotthepony.mc.otm.client.screen.panels.* import ru.dbotthepony.mc.otm.client.screen.panels.buttons.LargeRectangleButtonPanel import ru.dbotthepony.mc.otm.client.setMousePos @@ -206,8 +206,8 @@ class ExoPackInventoryScreen(menu: ExoPackInventoryMenu) : MatteryScreen> @JvmOverloads constru val SLOT_HIGHLIGHT = RGBAColor(255, 255, 255, 100) val SLOT_HIGHLIGHT_DRAG = RGBAColor(200, 200, 200, 150) const val SIZE = 18f - val SLOT_BACKGROUND = WidgetLocation.MISC.subElement(0f, 0f, SIZE, SIZE) + val SLOT_BACKGROUND = WidgetLocation.MISC.sprite(0f, 0f, SIZE, SIZE) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/BackgroundPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/BackgroundPanel.kt index 34cbe3a26..4ab428291 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/BackgroundPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/BackgroundPanel.kt @@ -2,12 +2,8 @@ package ru.dbotthepony.mc.otm.client.screen.panels import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.gui.screens.Screen -import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen import ru.dbotthepony.mc.otm.client.render.StretchingRectangleElement import ru.dbotthepony.mc.otm.client.render.WidgetLocation -import ru.dbotthepony.mc.otm.client.render.element -import ru.dbotthepony.mc.otm.client.render.subElement -import ru.dbotthepony.mc.otm.client.screen.MatteryScreen open class BackgroundPanel( screen: S, @@ -45,15 +41,15 @@ open class BackgroundPanel( ) = BackgroundPanel(screen, parent, x - 3f, y - 3f, width + 6f, height + 6f) val RECTANGLE = StretchingRectangleElement( - topLeft = WidgetLocation.MISC.subElement(18f, 24f, 3f, 3f), - topRight = WidgetLocation.MISC.subElement(27f, 24f, 3f, 3f), - bottomLeft = WidgetLocation.MISC.subElement(18f, 33f, 3f, 3f), - bottomRight = WidgetLocation.MISC.subElement(27f, 33f, 3f, 3f), - top = WidgetLocation.MISC.subElement(21f, 24f, 6f, 2f), - bottom = WidgetLocation.MISC.subElement(21f, 34f, 6f, 2f), - left = WidgetLocation.MISC.subElement(18f, 27f, 2f, 6f), - right = WidgetLocation.MISC.subElement(28f, 27f, 2f, 6f), - middle = WidgetLocation.MISC.subElement(30f, 12f, 6f, 6f), + topLeft = WidgetLocation.MISC.sprite(18f, 24f, 3f, 3f), + topRight = WidgetLocation.MISC.sprite(27f, 24f, 3f, 3f), + bottomLeft = WidgetLocation.MISC.sprite(18f, 33f, 3f, 3f), + bottomRight = WidgetLocation.MISC.sprite(27f, 33f, 3f, 3f), + top = WidgetLocation.MISC.sprite(21f, 24f, 6f, 2f), + bottom = WidgetLocation.MISC.sprite(21f, 34f, 6f, 2f), + left = WidgetLocation.MISC.sprite(18f, 27f, 2f, 6f), + right = WidgetLocation.MISC.sprite(28f, 27f, 2f, 6f), + middle = WidgetLocation.MISC.sprite(30f, 12f, 6f, 6f), padding = DockProperty(-1f, -1f, -1f, -1f) ) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt index 97924708c..e9292ea60 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EffectListPanel.kt @@ -14,7 +14,7 @@ import ru.dbotthepony.mc.otm.client.render.TextAlign import ru.dbotthepony.mc.otm.client.render.determineTooltipPosition import ru.dbotthepony.mc.otm.client.render.drawAligned import ru.dbotthepony.mc.otm.client.render.drawScaledAligned -import ru.dbotthepony.mc.otm.client.render.element +import ru.dbotthepony.mc.otm.client.render.sprite import ru.dbotthepony.mc.otm.client.render.render import ru.dbotthepony.mc.otm.core.RGBAColor import ru.dbotthepony.mc.otm.core.TranslatableComponent @@ -266,9 +266,9 @@ open class EffectListPanel @JvmOverloads constructor( } companion object { - val BAR = AbstractContainerScreen.INVENTORY_LOCATION.element(0f, 166f, 120f, 32f) - val SQUARE = AbstractContainerScreen.INVENTORY_LOCATION.element(0f, 198f, 32f, 32f) - val SQUARE_THIN = AbstractContainerScreen.INVENTORY_LOCATION.element(141f, 166f, 24f, 24f) - val SQUARE_THIN_HIGHLIGHT = AbstractContainerScreen.INVENTORY_LOCATION.element(165f, 166f, 24f, 24f) + val BAR = AbstractContainerScreen.INVENTORY_LOCATION.sprite(0f, 166f, 120f, 32f) + val SQUARE = AbstractContainerScreen.INVENTORY_LOCATION.sprite(0f, 198f, 32f, 32f) + val SQUARE_THIN = AbstractContainerScreen.INVENTORY_LOCATION.sprite(141f, 166f, 24f, 24f) + val SQUARE_THIN_HIGHLIGHT = AbstractContainerScreen.INVENTORY_LOCATION.sprite(165f, 166f, 24f, 24f) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt index d38d25977..179c7d261 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EntityRendererPanel.kt @@ -8,7 +8,7 @@ import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.player.Player import ru.dbotthepony.mc.otm.capability.matteryPlayer import ru.dbotthepony.mc.otm.client.render.Widgets8 -import ru.dbotthepony.mc.otm.client.render.element +import ru.dbotthepony.mc.otm.client.render.sprite import ru.dbotthepony.mc.otm.client.screen.ExoPackInventoryScreen import ru.dbotthepony.mc.otm.client.screen.panels.buttons.SmallBooleanRectangleButtonPanel import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleRenderButton @@ -127,6 +127,6 @@ class EntityRendererPanel @JvmOverloads constructor( } companion object { - val ENTITY_RECTANGLE = AbstractContainerScreen.INVENTORY_LOCATION.element(25f, 7f, 51f, 72f) + val ENTITY_RECTANGLE = AbstractContainerScreen.INVENTORY_LOCATION.sprite(25f, 7f, 51f, 72f) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/FramePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/FramePanel.kt index fc9688dd9..1eb70ae8b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/FramePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/FramePanel.kt @@ -232,21 +232,21 @@ open class FramePanel( const val PADDING_TOP = 14f val RECTANGLE = StretchingRectangleElement( - topLeft = WidgetLocation.MISC.subElement(x = 18f, y = 0f, width = 6f, height = 6f), - topRight = WidgetLocation.MISC.subElement(x = 24f, y = 0f, width = 6f, height = 6f), - left = WidgetLocation.MISC.subElement(x = 18f, y = 4f, width = 3f, height = 5f), - right = WidgetLocation.MISC.subElement(x = 25f, y = 3f, width = 5f, height = 5f), - top = WidgetLocation.MISC.subElement(x = 22f, y = 0f, width = 5f, height = 3f), - bottomLeft = WidgetLocation.MISC.subElement(x = 18f, y = 6f, width = 6f, height = 6f), - bottomRight = WidgetLocation.MISC.subElement(x = 24f, y = 6f, width = 6f, height = 6f), - bottom = WidgetLocation.MISC.subElement(x = 21f, y = 9f, width = 5f, height = 3f), - middle = WidgetLocation.MISC.subElement(x = 30f, y = 12f, width = 6f, height = 6f), + topLeft = WidgetLocation.MISC.sprite(x = 18f, y = 0f, width = 6f, height = 6f), + topRight = WidgetLocation.MISC.sprite(x = 24f, y = 0f, width = 6f, height = 6f), + left = WidgetLocation.MISC.sprite(x = 18f, y = 4f, width = 3f, height = 5f), + right = WidgetLocation.MISC.sprite(x = 25f, y = 3f, width = 5f, height = 5f), + top = WidgetLocation.MISC.sprite(x = 22f, y = 0f, width = 5f, height = 3f), + bottomLeft = WidgetLocation.MISC.sprite(x = 18f, y = 6f, width = 6f, height = 6f), + bottomRight = WidgetLocation.MISC.sprite(x = 24f, y = 6f, width = 6f, height = 6f), + bottom = WidgetLocation.MISC.sprite(x = 21f, y = 9f, width = 5f, height = 3f), + middle = WidgetLocation.MISC.sprite(x = 30f, y = 12f, width = 6f, height = 6f), padding = DockProperty(-3f, -3f, -3f, -3f) ) - val TAB_RIGHT_CONNECTION = WidgetLocation.MISC.subElement(x = 30f, y = 0f, width = 3f, height = 5f) - val TAB_LEFT_CONNECTION = WidgetLocation.MISC.subElement(x = 33f, y = 0f, width = 3f, height = 5f) - val TAB_BACKGROUND = WidgetLocation.MISC.subElement(x = 30f, y = 6f, width = 6f, height = 6f) + val TAB_RIGHT_CONNECTION = WidgetLocation.MISC.sprite(x = 30f, y = 0f, width = 3f, height = 5f) + val TAB_LEFT_CONNECTION = WidgetLocation.MISC.sprite(x = 33f, y = 0f, width = 3f, height = 5f) + val TAB_BACKGROUND = WidgetLocation.MISC.sprite(x = 30f, y = 6f, width = 6f, height = 6f) const val TAB_HEIGHT = 28f const val TAB_WIDTH = 28f diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/ScrollBarConstants.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/ScrollBarConstants.kt index f30839f85..e9473e0a6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/ScrollBarConstants.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/ScrollBarConstants.kt @@ -3,7 +3,7 @@ package ru.dbotthepony.mc.otm.client.screen.panels import net.minecraft.resources.ResourceLocation import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.client.render.MatteryAtlas -import ru.dbotthepony.mc.otm.client.render.subElement +import ru.dbotthepony.mc.otm.client.render.sprite object ScrollBarConstants { const val WIDTH = 14f @@ -12,24 +12,24 @@ object ScrollBarConstants { val NORMAL_ATLAS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/scrollbar.png"), 62f, 15f) val SLIM_ATLAS = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/scrollbar_slim.png"), 32f, 15f) - val BACKGROUND = NORMAL_ATLAS.subElement(width = 14f, height = 8f) - val BACKGROUND_SLIM = SLIM_ATLAS.subElement(width = 8f, height = 8f) + val BACKGROUND = NORMAL_ATLAS.sprite(width = 14f, height = 8f) + val BACKGROUND_SLIM = SLIM_ATLAS.sprite(width = 8f, height = 8f) - val TOP = BACKGROUND.subElement(height = 2f) - val BODY = BACKGROUND.subElement(y = 2f, height = 5f) - val BOTTOM = BACKGROUND.subElement(y = 6f, height = 2f) + val TOP = BACKGROUND.sprite(height = 2f) + val BODY = BACKGROUND.sprite(y = 2f, height = 5f) + val BOTTOM = BACKGROUND.sprite(y = 6f, height = 2f) - val BUTTON = NORMAL_ATLAS.subElement(x = 15f, width = 12f) - val BUTTON_HOVER = NORMAL_ATLAS.subElement(x = 15f + 12f, width = 12f) - val BUTTON_PRESS = NORMAL_ATLAS.subElement(x = 15f + 12f * 2f, width = 12f) - val BUTTON_DISABLED = NORMAL_ATLAS.subElement(x = 15f + 12f * 3f, width = 12f) + val BUTTON = NORMAL_ATLAS.sprite(x = 15f, width = 12f) + val BUTTON_HOVER = NORMAL_ATLAS.sprite(x = 15f + 12f, width = 12f) + val BUTTON_PRESS = NORMAL_ATLAS.sprite(x = 15f + 12f * 2f, width = 12f) + val BUTTON_DISABLED = NORMAL_ATLAS.sprite(x = 15f + 12f * 3f, width = 12f) - val SLIM_TOP = BACKGROUND_SLIM.subElement(height = 2f) - val SLIM_BODY = BACKGROUND_SLIM.subElement(y = 2f, height = 5f) - val SLIM_BOTTOM = BACKGROUND_SLIM.subElement(y = 6f, height = 2f) + val SLIM_TOP = BACKGROUND_SLIM.sprite(height = 2f) + val SLIM_BODY = BACKGROUND_SLIM.sprite(y = 2f, height = 5f) + val SLIM_BOTTOM = BACKGROUND_SLIM.sprite(y = 6f, height = 2f) - val SLIM_BUTTON = SLIM_ATLAS.subElement(x = 9f, width = 6f) - val SLIM_BUTTON_HOVER = SLIM_ATLAS.subElement(x = 9f + 6f, width = 6f) - val SLIM_BUTTON_PRESS = SLIM_ATLAS.subElement(x = 9f + 6f * 2f, width = 6f) - val SLIM_BUTTON_DISABLED = SLIM_ATLAS.subElement(x = 9f + 6f * 3f, width = 6f) + val SLIM_BUTTON = SLIM_ATLAS.sprite(x = 9f, width = 6f) + val SLIM_BUTTON_HOVER = SLIM_ATLAS.sprite(x = 9f + 6f, width = 6f) + val SLIM_BUTTON_PRESS = SLIM_ATLAS.sprite(x = 9f + 6f * 2f, width = 6f) + val SLIM_BUTTON_DISABLED = SLIM_ATLAS.sprite(x = 9f + 6f * 3f, width = 6f) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/CheckBoxPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/CheckBoxPanel.kt index bbd0e6415..1e9e8b4af 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/CheckBoxPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/buttons/CheckBoxPanel.kt @@ -6,7 +6,6 @@ import net.minecraft.client.gui.screens.Screen import ru.dbotthepony.mc.otm.client.playGuiClickSound import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite import ru.dbotthepony.mc.otm.client.render.WidgetLocation -import ru.dbotthepony.mc.otm.client.render.subGrid import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel open class CheckBoxPanel @JvmOverloads constructor( @@ -91,7 +90,7 @@ open class CheckBoxPanel @JvmOverloads constructor( val DISABLED_CHECKED: AbstractMatterySprite init { - val grid = WidgetLocation.CHECKBOX.subGrid(columns = 2, rows = 4) + val grid = WidgetLocation.CHECKBOX.grid(columns = 2, rows = 4) IDLE_UNCHECKED = grid.next() IDLE_CHECKED = grid.next() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/HorizontalPowerGaugePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/HorizontalPowerGaugePanel.kt index 2d27ff716..2cf60554e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/HorizontalPowerGaugePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/HorizontalPowerGaugePanel.kt @@ -4,8 +4,6 @@ import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.gui.screens.Screen import ru.dbotthepony.mc.otm.client.render.UVWindingOrder import ru.dbotthepony.mc.otm.client.render.WidgetLocation -import ru.dbotthepony.mc.otm.client.render.element -import ru.dbotthepony.mc.otm.client.render.subElement import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget @@ -45,11 +43,11 @@ open class HorizontalPowerGaugePanel( } companion object { - val GAUGE_BACKGROUND_TALL = WidgetLocation.HORIZONTAL_GAUGES.subElement(width = 96f, height = 18f) - val GAUGE_FOREGROUND_TALL = WidgetLocation.HORIZONTAL_GAUGES.subElement(y = 18f, width = 96f, height = 18f) + val GAUGE_BACKGROUND_TALL = WidgetLocation.HORIZONTAL_GAUGES.sprite(width = 96f, height = 18f) + val GAUGE_FOREGROUND_TALL = WidgetLocation.HORIZONTAL_GAUGES.sprite(y = 18f, width = 96f, height = 18f) - val GAUGE_BACKGROUND = WidgetLocation.HORIZONTAL_GAUGES.subElement(y = 36f, width = 96f, height = 9f) - val GAUGE_FOREGROUND = WidgetLocation.HORIZONTAL_GAUGES.subElement(y = 45f, width = 96f, height = 9f) + val GAUGE_BACKGROUND = WidgetLocation.HORIZONTAL_GAUGES.sprite(y = 36f, width = 96f, height = 9f) + val GAUGE_FOREGROUND = WidgetLocation.HORIZONTAL_GAUGES.sprite(y = 45f, width = 96f, height = 9f) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt index 9c7980c41..18efc0375 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/MatterGaugePanel.kt @@ -10,8 +10,6 @@ import net.minecraft.client.renderer.GameRenderer import net.minecraft.network.chat.Component import org.lwjgl.opengl.GL11 import ru.dbotthepony.mc.otm.client.render.WidgetLocation -import ru.dbotthepony.mc.otm.client.render.element -import ru.dbotthepony.mc.otm.client.render.subElement import ru.dbotthepony.mc.otm.client.render.tesselator import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel import ru.dbotthepony.mc.otm.core.TranslatableComponent @@ -118,7 +116,7 @@ open class MatterGaugePanel @JvmOverloads constructor( } companion object { - val GAUGE_BACKGROUND = WidgetLocation.VERTICAL_GAUGES.subElement(x = 18f, width = 9f) - val GAUGE_FOREGROUND = WidgetLocation.VERTICAL_GAUGES.subElement(x = 27f, width = 9f) + val GAUGE_BACKGROUND = WidgetLocation.VERTICAL_GAUGES.sprite(x = 18f, width = 9f) + val GAUGE_FOREGROUND = WidgetLocation.VERTICAL_GAUGES.sprite(x = 27f, width = 9f) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PatternGaugePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PatternGaugePanel.kt index 3fe2eb7f6..69ceb56f2 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PatternGaugePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PatternGaugePanel.kt @@ -3,10 +3,7 @@ package ru.dbotthepony.mc.otm.client.screen.widget import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.Component -import ru.dbotthepony.mc.otm.client.render.UVWindingOrder import ru.dbotthepony.mc.otm.client.render.WidgetLocation -import ru.dbotthepony.mc.otm.client.render.element -import ru.dbotthepony.mc.otm.client.render.subElement import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget @@ -48,7 +45,7 @@ open class PatternGaugePanel @JvmOverloads constructor( } companion object { - val GAUGE_BACKGROUND = WidgetLocation.VERTICAL_GAUGES.subElement(width = 9f) - val GAUGE_FOREGROUND = WidgetLocation.VERTICAL_GAUGES.subElement(x = 9f, width = 9f) + val GAUGE_BACKGROUND = WidgetLocation.VERTICAL_GAUGES.sprite(width = 9f) + val GAUGE_FOREGROUND = WidgetLocation.VERTICAL_GAUGES.sprite(x = 9f, width = 9f) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt index ec2bab3ab..5cf9f63a3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/PowerGaugePanel.kt @@ -61,11 +61,11 @@ open class PowerGaugePanel @JvmOverloads constructor( } companion object { - val GAUGE_BACKGROUND = WidgetLocation.VERTICAL_GAUGES.subElement(x = 36f, width = 9f) - val GAUGE_FOREGROUND = WidgetLocation.VERTICAL_GAUGES.subElement(x = 45f, width = 9f) + val GAUGE_BACKGROUND = WidgetLocation.VERTICAL_GAUGES.sprite(x = 36f, width = 9f) + val GAUGE_FOREGROUND = WidgetLocation.VERTICAL_GAUGES.sprite(x = 45f, width = 9f) - val GAUGE_BACKGROUND_WIDE = WidgetLocation.VERTICAL_GAUGES.subElement(x = 54f, width = 18f) - val GAUGE_FOREGROUND_WIDE = WidgetLocation.VERTICAL_GAUGES.subElement(x = 72f, width = 18f) + val GAUGE_BACKGROUND_WIDE = WidgetLocation.VERTICAL_GAUGES.sprite(x = 54f, width = 18f) + val GAUGE_FOREGROUND_WIDE = WidgetLocation.VERTICAL_GAUGES.sprite(x = 72f, width = 18f) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/ProgressGaugePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/ProgressGaugePanel.kt index 5b157ea43..bd54da6eb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/ProgressGaugePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/widget/ProgressGaugePanel.kt @@ -7,8 +7,6 @@ import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.Component import ru.dbotthepony.mc.otm.client.render.UVWindingOrder import ru.dbotthepony.mc.otm.client.render.WidgetLocation -import ru.dbotthepony.mc.otm.client.render.element -import ru.dbotthepony.mc.otm.client.render.subElement import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.menu.widget.ProgressGaugeWidget @@ -80,7 +78,7 @@ open class ProgressGaugePanel @JvmOverloads constructor( } companion object { - val GAUGE_BACKGROUND = WidgetLocation.PROGRESS_ARROWS.subElement(y = 0f, width = 22f, height = 15f) - val GAUGE_FOREGROUND = WidgetLocation.PROGRESS_ARROWS.subElement(y = 15f, width = 22f, height = 15f) + val GAUGE_BACKGROUND = WidgetLocation.PROGRESS_ARROWS.sprite(y = 0f, width = 22f, height = 15f) + val GAUGE_FOREGROUND = WidgetLocation.PROGRESS_ARROWS.sprite(y = 15f, width = 22f, height = 15f) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt index ced32ebc1..c7d053404 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/cos/CosmeticArmorCompat.kt @@ -18,7 +18,7 @@ import net.minecraft.world.item.ItemStack import net.minecraftforge.fml.ModList import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.MatterySprite -import ru.dbotthepony.mc.otm.client.render.element +import ru.dbotthepony.mc.otm.client.render.sprite import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel import ru.dbotthepony.mc.otm.client.screen.panels.buttons.RectangleButtonPanel import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleButton.Companion.BUTTON_ACTIVE @@ -185,8 +185,8 @@ class CosmeticToggleButton( } companion object { - val BUTTON_INACTIVE = GuiCosArmorInventory.TEXTURE.element(0f, 176f, 5f, 5f) - val BUTTON_ACTIVE = GuiCosArmorInventory.TEXTURE.element(5f, 176f, 5f, 5f) + val BUTTON_INACTIVE = GuiCosArmorInventory.TEXTURE.sprite(0f, 176f, 5f, 5f) + val BUTTON_ACTIVE = GuiCosArmorInventory.TEXTURE.sprite(5f, 176f, 5f, 5f) } }