2024-09-28 23:53:46 +00:00
|
|
|
#include <iostream>
|
|
|
|
#define CLAY_IMPLEMENTATION
|
|
|
|
#include "../../clay.h"
|
|
|
|
|
2024-10-22 07:41:35 +00:00
|
|
|
Clay_LayoutConfig layoutElement = Clay_LayoutConfig { .padding = {5} };
|
|
|
|
|
2024-12-26 06:58:59 +00:00
|
|
|
void HandleClayErrors(Clay_ErrorData errorData) {
|
|
|
|
printf("%s", errorData.errorText.chars);
|
|
|
|
}
|
|
|
|
|
2024-09-28 23:53:46 +00:00
|
|
|
int main(void) {
|
|
|
|
uint64_t totalMemorySize = Clay_MinMemorySize();
|
2024-12-26 06:58:59 +00:00
|
|
|
Clay_Arena clayMemory = Clay_CreateArenaWithCapacityAndMemory(totalMemorySize, (char *)malloc(totalMemorySize));
|
|
|
|
Clay_Initialize(clayMemory, Clay_Dimensions {1024,768}, Clay_ErrorHandler { HandleClayErrors });
|
2024-10-22 07:41:35 +00:00
|
|
|
Clay_BeginLayout();
|
2025-02-04 04:00:19 +00:00
|
|
|
CLAY({ .layout = layoutElement, .backgroundColor = {255,255,255,0} }) {
|
2025-01-29 04:14:01 +00:00
|
|
|
CLAY_TEXT(CLAY_STRING(""), CLAY_TEXT_CONFIG({ .fontId = 0 }));
|
|
|
|
}
|
2024-10-22 07:41:35 +00:00
|
|
|
Clay_EndLayout();
|
2024-09-28 23:53:46 +00:00
|
|
|
return 0;
|
|
|
|
}
|