@UnsafeVariance forsenD

This commit is contained in:
DBotThePony 2022-09-29 13:33:49 +07:00
parent 3abee0421b
commit ec50b7f6ef
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 4 additions and 4 deletions

View File

@ -9,8 +9,8 @@ import kotlin.math.roundToInt
open class AnalogScrollBarPanel<out S : Screen>(
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,

View File

@ -8,8 +8,8 @@ import kotlin.math.roundToInt
open class DiscreteScrollBarPanel<out S : Screen>(
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,