From 93ae41347be7736ba6e63e1cf24266ea78b56a76 Mon Sep 17 00:00:00 2001 From: Kevin Harrison Date: Thu, 17 Oct 2019 19:56:26 -0400 Subject: [PATCH] Add *GetScroll and *SetScroll functions --- Documentation.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation.md b/Documentation.md index 383614b..26cf8cf 100644 --- a/Documentation.md +++ b/Documentation.md @@ -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)...)