@@ -178,41 +178,69 @@ import org.openrndr.extra.parameters.DoubleParameter
178178## Demos
179179### DemoAppearance01
180180
181- A simple demonstration of a GUI for drawing some circles
181+ Demonstrates how to customize the appearance of the GUI by using
182+ ` GUIAppearance() ` .
183+
184+ In this demo, we make the GUI wider (400 pixels) and translucent.
182185
183186![ DemoAppearance01Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoAppearance01Kt.png )
184187
185188[ source code] ( src/demo/kotlin/DemoAppearance01.kt )
186189
187190### DemoHide01
188191
189- A simple demonstration of a GUI for drawing some circles
192+ Demonstrates how to hide the GUI when the mouse pointer is outside of it.
190193
191194![ DemoHide01Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoHide01Kt.png )
192195
193196[ source code] ( src/demo/kotlin/DemoHide01.kt )
194197
195198### DemoOptions01
196199
197- A simple demonstration of a GUI with a drop down menu
200+ A simple demonstration of a GUI with a drop-down menu.
201+
202+ The entries in the drop-down menu are taken from an ` enum class ` .
198203
199204![ DemoOptions01Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoOptions01Kt.png )
200205
201206[ source code] ( src/demo/kotlin/DemoOptions01.kt )
202207
208+ ### DemoOptions02
209+
210+ A simple demonstration of a GUI with a drop-down menu.
211+
212+ The entries in the drop-down menu are taken from an ` enum class ` .
213+ The ` enum class ` entries contain both a name (used in the drop-down)
214+ and a ` ColorRGBa ` instance (used for rendering).
215+
216+ ![ DemoOptions02Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoOptions02Kt.png )
217+
218+ [ source code] ( src/demo/kotlin/DemoOptions02.kt )
219+
203220### DemoPath01
204221
222+ Demonstrates how to include a button for loading images in a GUI, and how to display
223+ the loaded image.
224+
225+ The program applies the ` @PathParameter ` annotation to a ` String ` variable, which gets
226+ rendered by the GUI as an image-picker button. Note the allowed file ` extensions ` .
205227
228+ This mechanism only updates the ` String ` containing the path of an image file.
229+
230+ The ` watchingImagePath() ` delegate property is used to automatically load an image
231+ when its ` String ` argument changes.
206232
207233![ DemoPath01Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoPath01Kt.png )
208234
209235[ source code] ( src/demo/kotlin/DemoPath01.kt )
210236
211237### DemoPresets01
212238
213- Shows how to store and retrieve in-memory gui presets.
239+ Shows how to store and retrieve in-memory GUI presets,
240+ each containing two integer values and two colors.
241+
214242Keyboard controls:
215- [ Left Shift] + [ 0] ..[ 9] => store current gui values to a preset
243+ [ Left Shift] + [ 0] ..[ 9] => store current GUI values to a preset
216244[ 0] ..[ 9] => recall a preset
217245
218246![ DemoPresets01Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoPresets01Kt.png )
@@ -221,22 +249,44 @@ Keyboard controls:
221249
222250### DemoSideCanvas01
223251
224- A simple demonstration of a GUI for drawing some circles
252+ Demonstrates the ` GUI.enableSideCanvas ` feature.
253+
254+ When set to true, the ` GUI ` provides a ` canvas ` property where one can draw.
255+ The size of this canvas is the window size minus the GUI size.
256+
257+ That's why if we draw a circle at ` drawer.width / 2.0 ` it is centered
258+ on the ` canvas ` , not on the window.
259+
260+ This demo sets the window to resizable, so if you resize the window
261+ you should see tha the circle stays at the center of the canvas.
262+
225263
226264![ DemoSideCanvas01Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoSideCanvas01Kt.png )
227265
228266[ source code] ( src/demo/kotlin/DemoSideCanvas01.kt )
229267
230268### DemoSimple01
231269
232- A simple demonstration of a GUI for drawing some circles
270+ Demonstrates how to create a simple GUI with 4 inputs:
271+ - A ` ColorParameter ` which creates a color picker.
272+ - A ` DoubleParameter ` to control the radius of a circle.
273+ - A ` Vector2Parameter ` to set the position of that circle.
274+ - A ` DoubleListParameter ` which sets the radii of six circles.
275+
276+ The demo also shows how to use the variables controlled by the GUI
277+ inside the program, so changes to those variables affect
278+ the rendering in real time.
233279
234280![ DemoSimple01Kt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoSimple01Kt.png )
235281
236282[ source code] ( src/demo/kotlin/DemoSimple01.kt )
237283
238284### DemoXYParameter
239285
286+ Demonstrates the use of the ` @XYParameter ` annotation applied to a ` Vector2 ` variable.
287+
288+ This annotation creates an interactive XY control in a GUI that can be used to update
289+ a ` Vector2 ` variable. In this demo it sets the position of a circle.
240290
241291
242292![ DemoXYParameterKt] ( https://raw.githubusercontent.com/openrndr/orx/media/orx-jvm/orx-gui/images/DemoXYParameterKt.png )
0 commit comments