Skip to content

Commit

Permalink
hotID/activeID implementation
Browse files Browse the repository at this point in the history
Removed redundant info, docs fixes
  • Loading branch information
immortalx74 committed Oct 29, 2022
1 parent 30bfe9c commit 12bfa5a
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 79 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- Change the dominant hand by pushing the corresponding trigger button.
- Scroll in ListBox with the Y-axis of the analog stick.
- Text entry is done by an on-screen keyboard (appears when a TextBox has focus)
- Move windows by pointing at them and holding the grip button.
- Enable/Disable interaction with the GUI by pressing the Left Thumbstick down (user configurable)

**Widgets:**

Expand Down Expand Up @@ -141,9 +143,10 @@ NOTE: To set the state on a group of RadioButtons use this idiom:
`-- etc...`

---
`UI.TabBar(tabs, idx)`
`UI.TabBar(name, tabs, idx)`
|Argument|Type|Description
|:---|:---|:---|
|`name`|string|TabBar ID
|`tabs`|table|a table of strings
|`idx`|number|initial active tab index

Expand Down
2 changes: 1 addition & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function lovr.draw( pass )
end

UI.Begin( "TabBar window", mat4( -0.9, 1.4, -1 ) )
local was_clicked, idx = UI.TabBar( { "first", "second", "third" }, tab_bar_idx )
local was_clicked, idx = UI.TabBar( "my tab bar", { "first", "second", "third" }, tab_bar_idx )
if was_clicked then
tab_bar_idx = idx
end
Expand Down
Loading

0 comments on commit 12bfa5a

Please sign in to comment.