MCPcopy Create free account
hub / github.com/defold/defold / SetSize

Function SetSize

engine/gamesys/src/gamesys/scripts/script_window.cpp:420–429  ·  view source on GitHub ↗

set the size of the window * * Sets the window size. Works on desktop platforms only. * * @name window.set_size * @param width [type:number] Width of window * @param height [type:number] Height of window */

Source from the content-addressed store, hash-verified

418 * @param height [type:number] Height of window
419 */
420static int SetSize(lua_State* L)
421{
422 DM_LUA_STACK_CHECK(L, 0);
423
424 int width = luaL_checkinteger(L, 1);
425 int height = luaL_checkinteger(L, 2);
426 dmPlatform::SetWindowSize(g_Window.m_Window, width, height);
427
428 return 0;
429}
430
431
432/*# set the position of the window

Callers

nothing calls this directly

Calls 2

luaL_checkintegerFunction · 0.85
SetWindowSizeFunction · 0.50

Tested by

no test coverage detected