From ec50b7f6efc6188441485eb1d7a177bb96d1eae6 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 29 Sep 2022 13:33:49 +0700 Subject: [PATCH] @UnsafeVariance forsenD --- .../mc/otm/client/screen/panels/AnalogScrollBarPanel.kt | 4 ++-- .../mc/otm/client/screen/panels/DiscreteScrollBarPanel.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt index 05ff7ea12..f7bcf3f16 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/AnalogScrollBarPanel.kt @@ -9,8 +9,8 @@ import kotlin.math.roundToInt open class AnalogScrollBarPanel( screen: S, parent: EditablePanel<*>?, - val maxScroll: (panel: AnalogScrollBarPanel<*>) -> Float, - val scrollCallback: (panel: AnalogScrollBarPanel<*>, oldScroll: Float, newScroll: Float) -> Unit = { _, _, _ -> }, + val maxScroll: (panel: AnalogScrollBarPanel<@UnsafeVariance S>) -> Float, + val scrollCallback: (panel: AnalogScrollBarPanel<@UnsafeVariance S>, oldScroll: Float, newScroll: Float) -> Unit = { _, _, _ -> }, val smoothScrollCallback: (panel: AnalogScrollBarPanel<*>, oldScroll: Float, newScroll: Float) -> Unit = { _, _, _ -> }, x: Float = 0f, y: Float = 0f, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/DiscreteScrollBarPanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/DiscreteScrollBarPanel.kt index 8b61ad4ff..a2abea412 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/DiscreteScrollBarPanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/DiscreteScrollBarPanel.kt @@ -8,8 +8,8 @@ import kotlin.math.roundToInt open class DiscreteScrollBarPanel( screen: S, parent: EditablePanel<*>?, - val maxScroll: (panel: DiscreteScrollBarPanel<*>) -> Int, - val scrollCallback: (panel: DiscreteScrollBarPanel<*>, oldScroll: Int, newScroll: Int) -> Unit, + val maxScroll: (panel: DiscreteScrollBarPanel<@UnsafeVariance S>) -> Int, + val scrollCallback: (panel: DiscreteScrollBarPanel<@UnsafeVariance S>, oldScroll: Int, newScroll: Int) -> Unit, x: Float = 0f, y: Float = 0f, height: Float = 20f,