Skip to content
This repository was archived by the owner on Aug 4, 2024. It is now read-only.

docs: fix link to vLib Lua Documentation #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -41,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

Expand Down