- Added new methods for event polling and handling in the Event module, including `pollName` for retrieving message names. - Introduced new graphics functions for clearing the screen and drawing solid rectangles with RGBA support. - Updated the Window module to expose new settings and graphics functionalities. - Refactored the main script to utilize the new graphics and event features, improving the example game structure.
20 lines
500 B
Plaintext
20 lines
500 B
Plaintext
|
|
function basicWindow() {
|
|
local w = eve.Window();
|
|
local ok = w.setWindowSettings(eve.WindowSettings());
|
|
if (ok == false) return false;
|
|
for (local i = 0; i <10000000; ++i) {local j = i;}
|
|
w.close();
|
|
return true;
|
|
}
|
|
|
|
function settingsFields() {
|
|
local s = eve.WindowSettings();
|
|
s.width = 640;
|
|
s.height = 480;
|
|
s.centered = true;
|
|
if (s.width != 640) return false;
|
|
if (s.height != 480) return false;
|
|
if (s.centered != true) return false;
|
|
return true;
|
|
} |