WIP_CalculatorUI.nv
· 2.0 KiB · Text
Eredeti
Playground
| #strings, br, app, button,
AC, All Clear, C, Clear,
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
|
| #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, derpy
|derpy| 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, herpy
|herpy| 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, erpy
|erpy| next row
| Clear | add string Clear, on log
| on log | @on log
| 1 | | #strings, br, app, button, |
| 2 | AC, All Clear, C, Clear, |
| 3 | 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 | | |
| 7 | | #slots, inner content, vera event | |
| 8 | |
| 9 | | #port, on log string, needs, @on log, clears, @on log | |
| 10 | | #port, on clear log, needs, @clear log, clears, @clear log | |
| 11 | | #port, on reset ui, needs, @reset ui, clears, @reset ui | |
| 12 | | #port, create element, needs, @create element, clears, @create element | |
| 13 | | #port, mount element by id, needs, @mount element by id, clears, @mount element by id | |
| 14 | |
| 15 | || ui init |
| 16 | |
| 17 | | ui init | |
| 18 | @reset ui, |
| 19 | add string app, mount element by id, |
| 20 | create buttons |
| 21 | |
| 22 | | create button | |
| 23 | set slot inner content, |
| 24 | set slot vera event, |
| 25 | create button.2 |
| 26 | |
| 27 | | create button.2 | |
| 28 | add string button, create element |
| 29 | |
| 30 | | next row | |
| 31 | add string br, create element |
| 32 | |
| 33 | | create element | @create element |
| 34 | | mount element by id | @mount element by id |
| 35 | |
| 36 | | create buttons | |
| 37 | create AC C row, |
| 38 | create 7 8 9 / row, |
| 39 | create 4 5 6 * row, |
| 40 | create 1 2 3 - row, |
| 41 | create 0 . = + |
| 42 | |
| 43 | | create AC C row | create AC button, create C button |
| 44 | | create AC button | add string AC, add string All Clear, create button |
| 45 | | create C button | add string C, add string Clear, create button, derpy |
| 46 | |derpy| next row |
| 47 | |
| 48 | | create 7 8 9 / row | add button 7, add button 8, add button 9, add button / |
| 49 | | add button 7 | add string 7, add string Press 7, create button |
| 50 | | add button 8 | add string 8, add string Press 8, create button |
| 51 | | add button 9 | add string 9, add string Press 9, create button |
| 52 | | add button / | add string /, add string Press Divide, create button, herpy |
| 53 | |herpy| next row |
| 54 | |
| 55 | |
| 56 | | create 4 5 6 * row | add button 4, add button 5, add button 6, add button * |
| 57 | | add button 4 | add string 4, add string Press 4, create button |
| 58 | | add button 5 | add string 5, add string Press 5, create button |
| 59 | | add button 6 | add string 6, add string Press 6, create button, |
| 60 | | add button * | add string *, add string Press Multiply, create button, erpy |
| 61 | |erpy| next row |
| 62 | |
| 63 | |
| 64 | |
| 65 | | Clear | add string Clear, on log |
| 66 | |
| 67 | | on log | @on log |
| 68 |