package com.mime.dualscreenview.view

import android.content.Context
import android.util.AttributeSet
import com.mime.dualscreenview.R

typealias ValueChange = (Int)->Unit

class StepsEditor : SideButtonTextView {
    constructor(context: Context) : super(context)
    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
        context,
        attrs,
        defStyleAttr
    )

    constructor(
        context: Context,
        attrs: AttributeSet?,
        defStyleAttr: Int,
        defStyleRes: Int
    ) : super(context, attrs, defStyleAttr, defStyleRes)

    init {
//        inflate(context, R.layout.layout_steps_editor,this)
        btn_decrement?.setOnClickListener { value = value.dec() }
        btn_increment?.setOnClickListener { value = value.inc() }
        leftButtonTitle = "-"
        rightButtonTitle = "+"
    }
}