From c907ec15a437757a4521db6ff5fd58fbdc5449c0 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 21 Jun 2022 23:14:56 +0700 Subject: [PATCH] Move skin elements to framepanel class --- .../mc/otm/client/render/SkinElement.kt | 14 -------------- .../mc/otm/client/screen/panels/FramePanel.kt | 13 +++++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SkinElement.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SkinElement.kt index feb1cc6ce..dfdfa606b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SkinElement.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/SkinElement.kt @@ -223,17 +223,3 @@ class SkinElement @JvmOverloads constructor( winding: UVWindingOrder = UVWindingOrder.U0_V0_U1_V1 ) = renderRawPartial(stack, x.toFloat(), y.toFloat(), width.toFloat(), height.toFloat(), winding) } - -val top_left_window_corner = SkinElement(RenderHelper.WIDGETS, x = 18f, y = 0f, w = 6f, h = 6f) -val top_right_window_corner = SkinElement(RenderHelper.WIDGETS, x = 24f, y = 0f, w = 6f, h = 6f) -val left_window_border = SkinElement(RenderHelper.WIDGETS, x = 18f, y = 4f, w = 3f, h = 5f) -val right_window_border = SkinElement(RenderHelper.WIDGETS, x = 27f, y = 3f, w = 3f, h = 5f) -val top_window_border = SkinElement(RenderHelper.WIDGETS, x = 22f, y = 0f, w = 5f, h = 3f) -val window_background = SkinElement(RenderHelper.WIDGETS, x = 30f, y = 12f, w = 6f, h = 6f) - -val tab_right_connection = SkinElement(RenderHelper.WIDGETS, x = 30f, y = 0f, w = 3f, h = 5f) -val tab_left_connection = SkinElement(RenderHelper.WIDGETS, x = 33f, y = 0f, w = 3f, h = 5f) -val tab_background = SkinElement(RenderHelper.WIDGETS, x = 30f, y = 6f, w = 6f, h = 6f) -val bottom_left_window_corner = SkinElement(RenderHelper.WIDGETS, x = 18f, y = 6f, w = 6f, h = 6f) -val bottom_right_window_corner = SkinElement(RenderHelper.WIDGETS, x = 24f, y = 6f, w = 6f, h = 6f) -val bottom_window_border = SkinElement(RenderHelper.WIDGETS, x = 21f, y = 9f, w = 5f, h = 3f) 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 26bb3c3b6..fb9fd1151 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 @@ -292,5 +292,18 @@ open class FramePanel( companion object { const val PADDING = 4f const val PADDING_TOP = 14f + + val top_left_window_corner = SkinElement(RenderHelper.WIDGETS, x = 18f, y = 0f, w = 6f, h = 6f) + val top_right_window_corner = SkinElement(RenderHelper.WIDGETS, x = 24f, y = 0f, w = 6f, h = 6f) + val left_window_border = SkinElement(RenderHelper.WIDGETS, x = 18f, y = 4f, w = 3f, h = 5f) + val right_window_border = SkinElement(RenderHelper.WIDGETS, x = 27f, y = 3f, w = 3f, h = 5f) + val top_window_border = SkinElement(RenderHelper.WIDGETS, x = 22f, y = 0f, w = 5f, h = 3f) + val window_background = SkinElement(RenderHelper.WIDGETS, x = 30f, y = 12f, w = 6f, h = 6f) + val tab_right_connection = SkinElement(RenderHelper.WIDGETS, x = 30f, y = 0f, w = 3f, h = 5f) + val tab_left_connection = SkinElement(RenderHelper.WIDGETS, x = 33f, y = 0f, w = 3f, h = 5f) + val tab_background = SkinElement(RenderHelper.WIDGETS, x = 30f, y = 6f, w = 6f, h = 6f) + val bottom_left_window_corner = SkinElement(RenderHelper.WIDGETS, x = 18f, y = 6f, w = 6f, h = 6f) + val bottom_right_window_corner = SkinElement(RenderHelper.WIDGETS, x = 24f, y = 6f, w = 6f, h = 6f) + val bottom_window_border = SkinElement(RenderHelper.WIDGETS, x = 21f, y = 9f, w = 5f, h = 3f) } } \ No newline at end of file