Move stuff in base

This commit is contained in:
2024-08-09 19:54:36 +02:00
parent 8d529b0a45
commit 40ba59e7bd
27 changed files with 1595 additions and 36 deletions

View File

@@ -0,0 +1,36 @@
package nl.astraeus.vst.ui.components
import nl.astraeus.vst.util.formatDouble
/**
* User: rnentjes
* Date: 26-11-17
* Time: 16:52
*/
class KnobComponent(
value: Double = 1.0,
label: String = "",
minValue: Double = 0.0,
maxValue: Double = 5.0,
step: Double = 0.1,
pixelStep: Double = step / 25.0,
width: Int = 50,
height: Int = 60,
renderer: (Double) -> String = { nv -> formatDouble(nv, 2) },
callback: (Double) -> Unit = {}
) : BaseKnobComponent(
value,
label,
minValue,
maxValue,
step,
true,
width,
height,
pixelStep,
{ it },
{ it },
renderer,
callback
)