window_size_title_api #61

Merged
MartinFouilleul merged 8 commits from window_size_title_api into main 2023-08-25 13:29:28 +00:00
3 changed files with 5 additions and 7 deletions
Showing only changes of commit bfd4c2a450 - Show all commits

View File

@ -407,7 +407,7 @@ void ORCA_IMPORT(oc_request_quit)(void);
void ORCA_IMPORT(oc_runtime_window_set_title)(oc_str8 title); void ORCA_IMPORT(oc_runtime_window_set_title)(oc_str8 title);
void ORCA_IMPORT(oc_runtime_window_set_size)(f32 width, f32 height); void ORCA_IMPORT(oc_runtime_window_set_size)(oc_vec2 size);
#endif // !defined(OC_PLATFORM_ORCA) || !(OC_PLATFORM_ORCA) #endif // !defined(OC_PLATFORM_ORCA) || !(OC_PLATFORM_ORCA)

View File

@ -92,9 +92,9 @@ void oc_runtime_window_set_title(oc_str8 title)
} }
} }
void oc_runtime_window_set_size(f32 width, f32 height) void oc_runtime_window_set_size(oc_vec2 size)
{ {
oc_window_set_content_size(__orcaApp.window, (oc_vec2){ .x = width, .y = height }); oc_window_set_content_size(__orcaApp.window, size);
} }
void oc_runtime_log(oc_log_level level, void oc_runtime_log(oc_log_level level,

View File

@ -84,10 +84,8 @@
"cname": "oc_runtime_window_set_size", "cname": "oc_runtime_window_set_size",
"ret": {"name": "void", "tag": "v"}, "ret": {"name": "void", "tag": "v"},
"args": [ "args": [
{ "name": "width", { "name": "size",
"type": {"name": "f32", "tag": "f"}}, "type": {"name": "oc_vec2", "tag": "S"}}
{ "name": "height",
"type": {"name": "f32", "tag": "f"}}
] ]
} }
] ]