[orx-jvm] Move panel, gui, dnk3, keyframer, triangulation to orx-jvm

This commit is contained in:
Edwin Jakobs
2021-06-27 21:32:24 +02:00
parent 5814acef8f
commit 874d49779f
159 changed files with 22 additions and 21 deletions

View File

@@ -0,0 +1,43 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extensions.SingleScreenshot
import org.openrndr.extra.gui.GUI
import org.openrndr.extra.parameters.*
/**
* A simple demonstration of a GUI with a drop down menu
*/
enum class BackgroundColors {
Pink,
Black,
Yellow
}
suspend fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val gui = GUI()
gui.compartmentsCollapsedByDefault = false
val settings = @Description("Settings") object {
@OptionParameter("Background color")
var option = BackgroundColors.Pink
}
gui.add(settings)
extend(gui)
extend {
when(settings.option) {
BackgroundColors.Pink -> drawer.clear(ColorRGBa.PINK)
BackgroundColors.Black -> drawer.clear(ColorRGBa.BLACK)
BackgroundColors.Yellow -> drawer.clear(ColorRGBa.YELLOW)
}
}
}
}