[Core] Update Clay_OnHover to take void* instead of uintptr_t (#334)

This commit is contained in:
TotallyGamerJet 2025-11-25 23:11:34 -05:00 committed by GitHub
parent 7a9a976d42
commit 0c8e300524
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 12 deletions

View file

@ -64,7 +64,7 @@ typedef struct {
void HandleSidebarInteraction(
Clay_ElementId elementId,
Clay_PointerData pointerData,
intptr_t userData
void *userData
) {
SidebarClickData *clickData = (SidebarClickData*)userData;
// If this button was clicked
@ -220,7 +220,7 @@ Clay_RenderCommandArray ClayVideoDemo_CreateLayout(ClayVideoDemo_Data *data) {
*clickData = (SidebarClickData) { .requestedDocumentIndex = i, .selectedDocumentIndex = &data->selectedDocumentIndex };
data->frameArena.offset += sizeof(SidebarClickData);
CLAY_AUTO_ID({ .layout = sidebarButtonLayout, .backgroundColor = (Clay_Color) { 120, 120, 120, Clay_Hovered() ? 120 : 0 }, .cornerRadius = CLAY_CORNER_RADIUS(8) }) {
Clay_OnHover(HandleSidebarInteraction, (intptr_t)clickData);
Clay_OnHover(HandleSidebarInteraction, clickData);
CLAY_TEXT(document.title, CLAY_TEXT_CONFIG({
.fontId = FONT_ID_BODY_16,
.fontSize = 20,