mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
allow to get the default screen instance
Instead of being forced to always specify the type The screen_js constructor now behaves properly (reusing already initialized screens properly ...so also the ones not created by the javascript, where jsobj is still NULL while initilized is true)
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
// it also shows the usage of keyboard controller
|
||||
// press 'q' to quit while running
|
||||
|
||||
W = get_width();
|
||||
H = get_height();
|
||||
|
||||
x = 100;
|
||||
y = 100;
|
||||
@@ -15,9 +13,11 @@ PI = 3.141592654;
|
||||
c = PI * 2;
|
||||
o = -PI / 2;
|
||||
|
||||
scr = new Screen("sdl");
|
||||
scr.init(W,H);
|
||||
add_screen(scr);
|
||||
scr = new Screen();
|
||||
W = get_width();
|
||||
H = get_height();
|
||||
//scr.init(W,H);
|
||||
//add_screen(scr);
|
||||
|
||||
function drawStar(lay, s_mul, s2_mul) {
|
||||
s = s_mul / 0.383;
|
||||
|
||||
Reference in New Issue
Block a user