Move stuff in base
This commit is contained in:
@@ -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
|
||||
)
|
||||
Reference in New Issue
Block a user