Compare commits

...

3 Commits

Author SHA1 Message Date
Valentin Berman
9c54d17e70
Merge 4c02bd08a7 into c2c445e455 2025-01-12 01:08:04 -03:00
Nic Barker
c2c445e455 Fix broken ifdef on MSVC
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Failing after 12s
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Failing after 13s
2025-01-12 10:49:00 +13:00
Valentin Berman
4c02bd08a7 [Renderers/Raylib] Faulty high DPI layout and mouse position calculation after resizing #116 2025-01-01 21:26:43 -03:00
2 changed files with 4 additions and 3 deletions

5
clay.h
View File

@ -399,7 +399,7 @@ CLAY__TYPEDEF(Clay_Border, struct {
Clay_Color color;
});
CLAY__TYPEDEF(Clay_BorderElementConfig, struct {
struct Clay_BorderElementConfig {
Clay_Border left;
Clay_Border right;
Clay_Border top;
@ -409,7 +409,8 @@ CLAY__TYPEDEF(Clay_BorderElementConfig, struct {
#ifdef CLAY_EXTEND_CONFIG_BORDER
CLAY_EXTEND_CONFIG_BORDER
#endif
});
};
CLAY__TYPEDEF(Clay_BorderElementConfig, struct Clay_BorderElementConfig);
CLAY__TYPEDEF(Clay_ElementConfigUnion, union {
Clay_RectangleElementConfig *rectangleElementConfig;

View File

@ -220,7 +220,7 @@ int main(void) {
Clay_Arena clayMemory = Clay_CreateArenaWithCapacityAndMemory(totalMemorySize, malloc(totalMemorySize));
Clay_SetMeasureTextFunction(Raylib_MeasureText);
Clay_Initialize(clayMemory, (Clay_Dimensions) { (float)GetScreenWidth(), (float)GetScreenHeight() }, (Clay_ErrorHandler) { HandleClayErrors });
Clay_Raylib_Initialize(1024, 768, "Clay - Raylib Renderer Example", FLAG_VSYNC_HINT | FLAG_WINDOW_RESIZABLE | FLAG_WINDOW_HIGHDPI | FLAG_MSAA_4X_HINT);
Clay_Raylib_Initialize(1024, 768, "Clay - Raylib Renderer Example", FLAG_VSYNC_HINT | FLAG_WINDOW_RESIZABLE | FLAG_MSAA_4X_HINT);
profilePicture = LoadTextureFromImage(LoadImage("resources/profile-picture.png"));
Raylib_fonts[FONT_ID_BODY_24] = (Raylib_Font) {
.font = LoadFontEx("resources/Roboto-Regular.ttf", 48, 0, 400),