calc_numpad.nv
· 2.9 KiB · Text
Eredeti
Playground
| #strings, br, app, button,
AC, All Clear, C, Clear,
0,9,8,7,6,5,4,3,2,1, +,/,*,-,.,=,
Press 7, Press 8, Press 9, Press Divide,
Press 4, Press 5, Press 6, Press Multiply,
Press 1, Press 2, Press 3, Press Subtract,
Press 0, Press Dot, Press Equal, Press Add,
|
| #slots, inner content, vera event |
| #port, on log string, needs, @on log, clears, @on log |
| #port, on clear log, needs, @clear log, clears, @clear log |
| #port, on reset ui, needs, @reset ui, clears, @reset ui |
| #port, create element, needs, @create element, clears, @create element |
| #port, mount element by id, needs, @mount element by id, clears, @mount element by id |
|| ui init
| ui init |
@reset ui,
add string app, mount element by id,
create buttons
| create button |
set slot inner content,
set slot vera event,
create button.2
| create button.2 |
add string button, create element
| next row |
add string br, create element
| create element | @create element
| mount element by id | @mount element by id
| create buttons |
create AC C row,
create 7 8 9 / row,
create 4 5 6 * row,
create 1 2 3 - row,
create 0 . = +
| create AC C row | create AC button, create C button
| create AC button | add string AC, add string All Clear, create button
| create C button | add string C, add string Clear, create button, ACC finish
|ACC finish| next row
| create 7 8 9 / row | add button 7, add button 8, add button 9, add button /
| add button 7 | add string 7, add string Press 7, create button
| add button 8 | add string 8, add string Press 8, create button
| add button 9 | add string 9, add string Press 9, create button
| add button / | add string /, add string Press Divide, create button, 789 Finish
|789 Finish| next row
| create 4 5 6 * row | add button 4, add button 5, add button 6, add button *
| add button 4 | add string 4, add string Press 4, create button
| add button 5 | add string 5, add string Press 5, create button
| add button 6 | add string 6, add string Press 6, create button,
| add button * | add string *, add string Press Multiply, create button, 456 Finish
|456 Finish| next row
| create 1 2 3 - row | add button 1, add button 2, add button 3, add button -
| add button 1 | add string 1, add string Press 1, create button
| add button 2 | add string 2, add string Press 2, create button
| add button 3 | add string 3, add string Press 3, create button
| add button - | add string -, add string Press Subtract, create button, 123 Finish
|123 Finish| next row
|create 0 . = +| add button 0, add button ., add button =, add button +
| add button 0 | add string 0, add string Press 0, create button
| add button . | add string ., add string Press Dot, create button
| add button = | add string =, add string Press Equal, create button
| add button + | add string +, add string Press Add, create button
| Clear | add string Clear, on log
| on log | @on log
1 | | #strings, br, app, button, |
2 | AC, All Clear, C, Clear, |
3 | 0,9,8,7,6,5,4,3,2,1, +,/,*,-,.,=, |
4 | Press 7, Press 8, Press 9, Press Divide, |
5 | Press 4, Press 5, Press 6, Press Multiply, |
6 | Press 1, Press 2, Press 3, Press Subtract, |
7 | Press 0, Press Dot, Press Equal, Press Add, |
8 | | |
9 | |
10 | | #slots, inner content, vera event | |
11 | |
12 | | #port, on log string, needs, @on log, clears, @on log | |
13 | | #port, on clear log, needs, @clear log, clears, @clear log | |
14 | | #port, on reset ui, needs, @reset ui, clears, @reset ui | |
15 | | #port, create element, needs, @create element, clears, @create element | |
16 | | #port, mount element by id, needs, @mount element by id, clears, @mount element by id | |
17 | |
18 | || ui init |
19 | |
20 | | ui init | |
21 | @reset ui, |
22 | add string app, mount element by id, |
23 | create buttons |
24 | |
25 | | create button | |
26 | set slot inner content, |
27 | set slot vera event, |
28 | create button.2 |
29 | |
30 | | create button.2 | |
31 | add string button, create element |
32 | |
33 | | next row | |
34 | add string br, create element |
35 | |
36 | | create element | @create element |
37 | | mount element by id | @mount element by id |
38 | |
39 | | create buttons | |
40 | create AC C row, |
41 | create 7 8 9 / row, |
42 | create 4 5 6 * row, |
43 | create 1 2 3 - row, |
44 | create 0 . = + |
45 | |
46 | | create AC C row | create AC button, create C button |
47 | | create AC button | add string AC, add string All Clear, create button |
48 | | create C button | add string C, add string Clear, create button, ACC finish |
49 | |ACC finish| next row |
50 | |
51 | | create 7 8 9 / row | add button 7, add button 8, add button 9, add button / |
52 | | add button 7 | add string 7, add string Press 7, create button |
53 | | add button 8 | add string 8, add string Press 8, create button |
54 | | add button 9 | add string 9, add string Press 9, create button |
55 | | add button / | add string /, add string Press Divide, create button, 789 Finish |
56 | |789 Finish| next row |
57 | |
58 | |
59 | | create 4 5 6 * row | add button 4, add button 5, add button 6, add button * |
60 | | add button 4 | add string 4, add string Press 4, create button |
61 | | add button 5 | add string 5, add string Press 5, create button |
62 | | add button 6 | add string 6, add string Press 6, create button, |
63 | | add button * | add string *, add string Press Multiply, create button, 456 Finish |
64 | |456 Finish| next row |
65 | |
66 | | create 1 2 3 - row | add button 1, add button 2, add button 3, add button - |
67 | |
68 | | add button 1 | add string 1, add string Press 1, create button |
69 | | add button 2 | add string 2, add string Press 2, create button |
70 | | add button 3 | add string 3, add string Press 3, create button |
71 | | add button - | add string -, add string Press Subtract, create button, 123 Finish |
72 | |123 Finish| next row |
73 | |
74 | |
75 | |create 0 . = +| add button 0, add button ., add button =, add button + |
76 | | add button 0 | add string 0, add string Press 0, create button |
77 | | add button . | add string ., add string Press Dot, create button |
78 | | add button = | add string =, add string Press Equal, create button |
79 | | add button + | add string +, add string Press Add, create button |
80 | |
81 | | Clear | add string Clear, on log |
82 | |
83 | | on log | @on log |
84 |