Open FramePanel's title getter/setter to public

This commit is contained in:
DBotThePony 2023-07-15 19:37:56 +07:00
parent 57b2b64ff9
commit c71a1ab0d6
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -20,7 +20,7 @@ open class FramePanel<out S : Screen>(
y: Float, y: Float,
width: Float, width: Float,
height: Float, height: Float,
protected var title: Component? var title: Component? = null,
) : EditablePanel<S>(screen, parent, x, y, width, height), NarratableEntry { ) : EditablePanel<S>(screen, parent, x, y, width, height), NarratableEntry {
constructor(screen: S, width: Float, height: Float, title: Component?) : this(screen, null, 0f, 0f, width, height, title) constructor(screen: S, width: Float, height: Float, title: Component?) : this(screen, null, 0f, 0f, width, height, title)
@ -345,7 +345,7 @@ open class FramePanel<out S : Screen>(
y: Float, y: Float,
width: Float, width: Float,
height: Float, height: Float,
title: Component? title: Component? = null,
) = FramePanel(screen, parent, x, y, width + PADDING * 2, height + PADDING_TOP + PADDING, title) ) = FramePanel(screen, parent, x, y, width + PADDING * 2, height + PADDING_TOP + PADDING, title)
fun <S : Screen> padded( fun <S : Screen> padded(
@ -353,14 +353,14 @@ open class FramePanel<out S : Screen>(
parent: EditablePanel<*>?, parent: EditablePanel<*>?,
width: Float, width: Float,
height: Float, height: Float,
title: Component? title: Component? = null,
) = FramePanel(screen, parent, 0f, 0f, width + PADDING * 2, height + PADDING_TOP + PADDING, title) ) = FramePanel(screen, parent, 0f, 0f, width + PADDING * 2, height + PADDING_TOP + PADDING, title)
fun <S : Screen> padded( fun <S : Screen> padded(
screen: S, screen: S,
width: Float, width: Float,
height: Float, height: Float,
title: Component? title: Component? = null,
) = FramePanel(screen, null, 0f, 0f, width + PADDING * 2, height + PADDING_TOP + PADDING, title) ) = FramePanel(screen, null, 0f, 0f, width + PADDING * 2, height + PADDING_TOP + PADDING, title)
const val PADDING = 8f const val PADDING = 8f