package ru.dbotthepony.mc.otm.client.screen.panels.button

import net.minecraft.client.gui.screens.Screen
import net.minecraft.network.chat.Component
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
import ru.dbotthepony.mc.otm.client.screen.panels.Label
import ru.dbotthepony.mc.otm.core.GetterSetter

open class CheckBoxLabelPanel<out S : Screen>(
	screen: S,
	parent: EditablePanel<*>?,
	text: Component,
	x: Float = 0f,
	y: Float = 0f,
	width: Float = CheckBoxPanel.REGULAR_DIMENSIONS + 120f,
	height: Float = CheckBoxPanel.REGULAR_DIMENSIONS,
	isChecked: GetterSetter<Boolean> = GetterSetter.box(false)
) : AbstractCheckBoxLabelPanel<S>(screen, parent, x, y, width, height) {
	override val checkbox = CheckBoxPanel(screen, this, 0f, 0f, isChecked = isChecked)
	override val label = Label(screen, this, CheckBoxPanel.REGULAR_DIMENSIONS + 4f, 4f, text = text)
}
