Fix frame tabs being too wide
This commit is contained in:
parent
1a9877a49d
commit
dde37bc502
@ -32,7 +32,7 @@ open class FramePanel<out S : Screen>(
|
|||||||
var onClose: Runnable? = null,
|
var onClose: Runnable? = null,
|
||||||
var activeIcon: IGUIRenderable? = null,
|
var activeIcon: IGUIRenderable? = null,
|
||||||
var inactiveIcon: IGUIRenderable? = null,
|
var inactiveIcon: IGUIRenderable? = null,
|
||||||
) : AbstractButtonPanel<S>(this@FramePanel.screen, this@FramePanel, 0f, 0f, 28f, 28f) {
|
) : AbstractButtonPanel<S>(this@FramePanel.screen, this@FramePanel, 0f, 0f, 26f, 28f) {
|
||||||
var isActive = tabs.isEmpty()
|
var isActive = tabs.isEmpty()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@ -81,7 +81,7 @@ open class FramePanel<out S : Screen>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
activeIcon?.render(graphics, x = width / 2f - 1f, y = height / 2f + 1f, gravity = RenderGravity.CENTER_CENTER)
|
activeIcon?.render(graphics, x = width / 2f, y = height / 2f + 1f, gravity = RenderGravity.CENTER_CENTER)
|
||||||
} else {
|
} else {
|
||||||
if (tabIndex() == 0) {
|
if (tabIndex() == 0) {
|
||||||
if (isDisabled) {
|
if (isDisabled) {
|
||||||
@ -105,7 +105,7 @@ open class FramePanel<out S : Screen>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inactiveIcon?.render(graphics, x = width / 2f - 1f, y = height / 2f + 1f, gravity = RenderGravity.CENTER_CENTER)
|
inactiveIcon?.render(graphics, x = width / 2f, y = height / 2f + 1f, gravity = RenderGravity.CENTER_CENTER)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user