MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / Clay_GetScrollOffset

Function Clay_GetScrollOffset

include/clay.h:4225–4238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4223
4224CLAY_WASM_EXPORT("Clay_GetScrollOffset")
4225Clay_Vector2 Clay_GetScrollOffset(void) {
4226 Clay_Context* context = Clay_GetCurrentContext();
4227 if (context->booleanWarnings.maxElementsExceeded) {
4228 return CLAY__INIT(Clay_Vector2) CLAY__DEFAULT_STRUCT;
4229 }
4230 Clay_LayoutElement *openLayoutElement = Clay__GetOpenLayoutElement();
4231 for (int32_t i = 0; i < context->scrollContainerDatas.length; i++) {
4232 Clay__ScrollContainerDataInternal *mapping = Clay__ScrollContainerDataInternalArray_Get(&context->scrollContainerDatas, i);
4233 if (mapping->layoutElement == openLayoutElement) {
4234 return mapping->scrollPosition;
4235 }
4236 }
4237 return CLAY__INIT(Clay_Vector2) CLAY__DEFAULT_STRUCT;
4238}
4239
4240CLAY_WASM_EXPORT("Clay_UpdateScrollContainers")
4241void Clay_UpdateScrollContainers(bool enableDragScrolling, Clay_Vector2 scrollDelta, float deltaTime) {

Callers 1

Clay__RenderDebugViewFunction · 0.85

Calls 2

Clay_GetCurrentContextFunction · 0.85

Tested by

no test coverage detected