update oc_window_set_content_size to use oc_vec2 for consistency

This commit is contained in:
Reuben Dunnington 2023-08-23 13:13:38 -07:00
parent 81712c14c1
commit bfd4c2a450
Signed by: rdunnington
GPG Key ID: 3D57C8938EA08E90
3 changed files with 5 additions and 7 deletions

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_size)(f32 width, f32 height);
void ORCA_IMPORT(oc_runtime_window_set_size)(oc_vec2 size);
#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,

View File

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