Add *GetScroll and *SetScroll functions

Kevin Harrison 2019-10-17 19:56:26 -04:00
parent 631c5372ec
commit 93ae41347b

@ -132,6 +132,12 @@ Return the bounds of the current window's content region.
#### focused = ui:windowHasFocus()
Return `true` if the current window is focused, and `false` otherwise.
#### sx, sy = ui:windowGetScroll()
Get the scroll position (`sx`, `sy`) of the current window.
#### ui:windowSetScroll(sx, sy)
Set the scroll position (`sx`, `sy`) of the current window.
#### collapsed = ui:windowIsCollapsed(name)
Return `true` if the given window is collapsed, and `false` otherwise.
@ -153,6 +159,8 @@ Return `true` if any window is hovered by the mouse, and `false` otherwise.
#### active = ui:itemIsAnyActive()
Return `true` if any item is active, and `false` otherwise.
#### ui:windowSetBounds(name, x, y, width, height)
Set the bounds of the given window.
@ -346,6 +354,12 @@ body(ui)
ui:groupEnd()
```
#### sx, sy = ui:groupGetScroll(id)
Get the scroll position (`sx`, `sy`) of the group with the given `id`.
#### ui:groupSetScroll(id, sx, sy)
Set the scroll position (`sx`, `sy`) of the group with the given `id`.
### Trees
#### open = ui:treePush('node'/'tab', title)
@ -416,6 +430,12 @@ if ui:popupBegin(...) then
end
```
#### sx, sy = ui:popupGetScroll()
Get the scroll position (`sx`, `sy`) of the current popup.
#### ui:popupSetScroll(sx, sy)
Set the scroll position (`sx`, `sy`) of the current popup.
### Context Menus
#### open = ui:contextualBegin(width, height, triggerX, triggerY, triggerWidth, triggerHeight, [flags](#flags)...)