mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-16 03:08:05 +00:00
Added window dimensions and title to Clay_Raylib_Initialize function (#56)
This commit is contained in:
parent
18f06e5faf
commit
35d72e5fba
@ -207,7 +207,7 @@ int main(void) {
|
||||
Clay_Arena clayMemory = (Clay_Arena) { .label = CLAY_STRING("Clay Memory Arena"), .memory = malloc(totalMemorySize), .capacity = totalMemorySize };
|
||||
Clay_SetMeasureTextFunction(Raylib_MeasureText);
|
||||
Clay_Initialize(clayMemory, (Clay_Dimensions) { (float)GetScreenWidth(), (float)GetScreenHeight() });
|
||||
Clay_Raylib_Initialize(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_WINDOW_HIGHDPI | 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),
|
||||
|
@ -124,9 +124,9 @@ static inline Clay_Dimensions Raylib_MeasureText(Clay_String *text, Clay_TextEle
|
||||
return textSize;
|
||||
}
|
||||
|
||||
void Clay_Raylib_Initialize(unsigned int flags) {
|
||||
void Clay_Raylib_Initialize(int width, int height, const char *title, unsigned int flags) {
|
||||
SetConfigFlags(flags);
|
||||
InitWindow(1024, 768, "Clay - Raylib Renderer Example");
|
||||
InitWindow(width, height, title);
|
||||
// EnableEventWaiting();
|
||||
}
|
||||
|
||||
@ -236,4 +236,4 @@ void Clay_Raylib_Render(Clay_RenderCommandArray renderCommands)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user