@@ -4,72 +4,68 @@ namespace micromusic {
44 import Button = user_interface_base . Button
55 import ButtonStyles = user_interface_base . ButtonStyles
66 import AppInterface = user_interface_base . AppInterface
7- import CursorSceneEnum = user_interface_base . CursorSceneEnum
87 import font = user_interface_base . font
98 import resolveTooltip = user_interface_base . resolveTooltip
109
1110 export class Home extends CursorScene {
12- private liveDataBtn : Button
13- private recordDataBtn : Button
14- private distributedLoggingBtn : Button
15-
1611 constructor ( app : AppInterface ) {
1712 super ( app )
1813 }
1914
20- /* override */ startup ( ) {
15+ /* override */ startup ( controlSetupFn : ( ) => void ) {
2116 super . startup ( )
22- basic . pause ( 10 )
17+ basic . pause ( 50 )
18+
2319 this . cursor . setBorderThickness ( 2 )
2420 const y = Screen . HEIGHT * 0.234 // y = 30 on an Arcade Shield of height 128 pixels
2521 this . navigator . setBtns ( [
2622 [
27- ( this . liveDataBtn = new Button ( {
28- parent : null ,
29- style : ButtonStyles . Transparent ,
30- icon : "edit_program" ,
31- ariaId : "New Song" ,
32- x : - 40 ,
33- y,
34- onClick : ( ) => {
35- this . app . popScene ( )
36- this . app . pushScene (
37- SongComposerScreen . getInstance ( this . app ) ,
38- )
39- } ,
40- } ) ) ,
41- ( this . recordDataBtn = new Button ( {
42- parent : null ,
43- style : ButtonStyles . Transparent ,
44- icon : "largeDisk" ,
45- ariaId : "Saved Songs" ,
46- x : 0 ,
47- y,
48- onClick : ( ) => { } ,
49- } ) ) ,
50- ( this . distributedLoggingBtn = new Button ( {
51- parent : null ,
52- style : ButtonStyles . Transparent ,
53- icon : "largeSettingsGear" ,
54- ariaId : "Settings" ,
55- x : 40 ,
56- y,
57- onClick : ( ) => {
58- this . app . popScene ( )
59- this . app . pushScene (
60- SettingsScreen . getInstance ( this , this . app ) ,
61- )
62- } ,
63- } ) ) ,
23+ new Button ( {
24+ parent : null ,
25+ style : ButtonStyles . Transparent ,
26+ icon : "edit_program" ,
27+ ariaId : "New Song" ,
28+ x : - 40 ,
29+ y,
30+ onClick : ( ) => {
31+ this . app . popScene ( )
32+ this . app . pushScene (
33+ SongComposerScreen . getInstance ( this . app ) ,
34+ )
35+ } ,
36+ } ) ,
37+ new Button ( {
38+ parent : null ,
39+ style : ButtonStyles . Transparent ,
40+ icon : "largeDisk" ,
41+ ariaId : "Saved Songs" ,
42+ x : 0 ,
43+ y,
44+ onClick : ( ) => { } ,
45+ } ) ,
46+ new Button ( {
47+ parent : null ,
48+ style : ButtonStyles . Transparent ,
49+ icon : "largeSettingsGear" ,
50+ ariaId : "Settings" ,
51+ x : 40 ,
52+ y,
53+ onClick : ( ) => {
54+ this . app . popScene ( )
55+ this . app . pushScene (
56+ SettingsScreen . getInstance ( this , this . app ) ,
57+ )
58+ } ,
59+ } ) ,
6460 ] ,
6561 ] )
6662 }
6763
6864 private drawVersion ( ) {
6965 const font = bitmaps . font5
7066 Screen . print (
71- "v0.1 " ,
72- Screen . RIGHT_EDGE - font . charWidth * "v0.1 " . length ,
67+ "v0.2 " ,
68+ Screen . RIGHT_EDGE - font . charWidth * "v0.2 " . length ,
7369 Screen . BOTTOM_EDGE - font . charHeight - 2 ,
7470 0xb ,
7571 font ,
@@ -124,10 +120,7 @@ namespace micromusic {
124120 )
125121 }
126122
127- this . liveDataBtn . draw ( )
128- this . recordDataBtn . draw ( )
129- this . distributedLoggingBtn . draw ( )
130-
123+ this . navigator . drawComponents ( ) ;
131124 this . drawVersion ( )
132125 super . draw ( )
133126 }
0 commit comments