| 4223 | |
| 4224 | CLAY_WASM_EXPORT("Clay_GetScrollOffset") |
| 4225 | Clay_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 | |
| 4240 | CLAY_WASM_EXPORT("Clay_UpdateScrollContainers") |
| 4241 | void Clay_UpdateScrollContainers(bool enableDragScrolling, Clay_Vector2 scrollDelta, float deltaTime) { |
no test coverage detected