|
| 1 | + function on.paint(gc) |
1 | 2 | gc:setFont("sansserif", "b", 15) |
2 | | - drawXCenteredString(gc, "Ndless for OS 4.5.3.14", 30) |
| 3 | + drawXCenteredString(gc, "Ndless for OS:", 10) |
| 4 | + gc:setFont("sansserif", "b", 12) |
| 5 | + drawXCenteredString(gc, "4.5.3.14", 40) |
| 6 | + |
| 7 | + drawXCenteredString(gc, "4.5.4.48", 60) |
| 8 | + drawXCenteredString(gc, "5.2.0.771", 90) |
| 9 | + drawXCenteredString(gc, "5.3.0.564", 110) |
3 | 10 |
|
4 | 11 | gc:setFont("sansserif", "r", 10) |
5 | 12 |
|
6 | 13 | if ndless then |
7 | | - gc:drawString("Ndless is already installed!", 5, 60, "top") |
| 14 | + gc:drawString("Ndless is already installed!", 5, 150, "top") |
8 | 15 | return |
9 | 16 | end |
10 | 17 |
|
11 | | - gc:setColorRGB(0, 0, 0) |
12 | | - gc:fillRect(0, 100, platform.window:width(), 2) |
13 | | - |
14 | | - gc:setFont("sansserif", "r", 9) |
15 | | - gc:drawString("(this line is just deco)", 198 + 0, 53 + 30, "top") |
| 18 | + gc:drawString("Installing ndless...", 5, 150, "top") |
16 | 19 |
|
17 | | - s = "" |
18 | | - s = string.rep(installer, 768) |
| 20 | + if attempt > 2 then |
| 21 | + gc:drawString("Several attempts failed,", 5, 170, "top") |
| 22 | + gc:drawString("missing ndless_resources.tns?", 5, 185, "top") |
| 23 | + end |
| 24 | + end |
19 | 25 |
|
20 | | - timer.start(0.2) |
| 26 | + s = "" |
| 27 | + s = string.rep(installer, 768) |
| 28 | + if not ndless then |
| 29 | + timer.start(0.3) |
21 | 30 | end |
22 | 31 |
|
23 | 32 | function on.timer() |
|
32 | 41 | shape = physics.CircleShape(body, 1, physics.Vect(0, 0)) |
33 | 42 | space:addShape(shape) |
34 | 43 |
|
35 | | - a = "" |
36 | | - x = string.pack("u32", 0x13000000) |
| 44 | + local a = "" |
| 45 | + local x = string.pack("u32", 0x13000000) |
37 | 46 |
|
38 | 47 | function preSolveCb() |
39 | 48 | space:removeCollisionHandler(0, 0) |
|
45 | 54 | end |
46 | 55 | space:addCollisionHandler(0, 0, {preSolve = preSolveCb}) |
47 | 56 | space:step(1) |
| 57 | + |
| 58 | + attempt = attempt + 1 |
| 59 | + platform.window:invalidate() |
| 60 | + timer.start(1) |
48 | 61 | end |
49 | 62 | </sc:script> |
50 | 63 | </wdgt> |
|
0 commit comments