From 49e89ebd054edebac5144852a69f965f25fed2ec Mon Sep 17 00:00:00 2001 From: Leon Nieuwoudt Date: Wed, 20 Dec 2023 21:11:08 +0200 Subject: [PATCH 1/2] docs: example lua code highlighting --- README.md | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 540da18..8f5c651 100644 --- a/README.md +++ b/README.md @@ -13,24 +13,27 @@ vLib tries to stay as close as possible to the Renoise Viewbuilder API. This is If you are not familiar with that API, it's highly recommended to study some [Viewbuilder examples](https://github.com/renoise/xrnx/tree/master/Tools/com.renoise.ExampleToolGui.xrnx) first. However, if you are familiar with the Viewbuilder API, the following syntax should be quite familiar: - -- create a viewbuilder - local vb = renoise.ViewBuilder() - - -- create a vLib toggle button - local toggle_button = vToggleButton{ - vb = vb, - text_enabled = "I'm enabled", - text_disabled = "I'm turned off", - width = 50, - height = 20, - notifier = function(active) - -- do something when clicked - end, - } - - local view = vb:row{ - toggle_button.view -- add to view using the 'view' property - } +```lua +-- create a viewbuilder +local vb = renoise.ViewBuilder() + +-- create a vLib toggle button +local toggle_button = vToggleButton{ + vb = vb, + text_enabled = "I'm enabled", + text_disabled = "I'm turned off", + width = 50, + height = 20, + notifier = function(active) + -- do something when clicked + end, +} + +-- add to view using the 'view' property +local view = vb:row{ + toggle_button.view +} +``` If you look closely, you'll notice a few minor details that are different from how the Viewbuilder API is used. From 6b4b62a2d78644ed5cd4031730b0155dfbd01f41 Mon Sep 17 00:00:00 2001 From: Leon Nieuwoudt Date: Wed, 20 Dec 2023 21:12:22 +0200 Subject: [PATCH 2/2] docs: fix link to vLib Lua Documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f5c651..25fe9cb 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ And secondly, we are keeping a reference to the object and handing over that obj ## Documentation Point your browser to this location to browse the auto-generated luadocs: -https://renoise.github.io/luadocs/vlib +https://renoise.github.io/libraries/vlib/index.html ## Examples