natiny.window.create

Lua
natiny.window.create(title, width, height)

Creates a new application window.

Parameters

Name Type Description
title string Window title
width number Requested window width; its on-screen size follows OS display scaling
height number Requested window height; its on-screen size follows OS display scaling

Returns

Type Description
number Window handle

Example

Lua
local win = natiny.window.create("My Game", 1280, 720)

Notes

  • Web builds support one window only; it maps to the page's <canvas> element.