@@ -13,6 +13,8 @@ export function Config(onClose) {
1313 this . set65c02 ( this . model . tube ) ;
1414 this . setTeletext ( this . model . hasTeletextAdaptor ) ;
1515 this . setMusic5000 ( this . model . hasMusic5000 ) ;
16+ this . setSnowstorm ( this . model . snow ) ;
17+ setModelMenus ( this . model . name ) ;
1618 } ) ;
1719
1820 $configuration . addEventListener ( "hide.bs.modal" , ( ) => onClose ( changed ) ) ;
@@ -46,17 +48,34 @@ export function Config(onClose) {
4648 this . addRemoveROM ( "ats-3.0.rom" , enabled ) ;
4749 } ;
4850
51+ this . setSnowstorm = function ( enabled ) {
52+ enabled = ! ! enabled ;
53+ $ ( "#showAtomSnowstorm" ) . prop ( "checked" , enabled ) ;
54+ this . model . snow = enabled ;
55+ } ;
56+
4957 function setDropdownText ( modelName ) {
5058 $ ( "#bbc-model-dropdown .bbc-model" ) . text ( modelName ) ;
5159 }
5260
61+ function setModelMenus ( modelname ) {
62+ // set BBC and ATOM stuff
63+ let atom = modelname . includes ( "Atom" ) ;
64+
65+ $ ( "#65c02" ) . prop ( "disabled" , atom ) ;
66+ $ ( "#hasTeletextAdaptor" ) . prop ( "disabled" , atom ) ;
67+ $ ( "#hasMusic5000" ) . prop ( "disabled" , atom ) ;
68+ $ ( "#showAtomSnowstorm" ) . prop ( "disabled" , ! atom ) ;
69+ }
70+
5371 $ ( ".model-menu a" ) . on (
5472 "click" ,
5573 function ( e ) {
5674 const modelName = $ ( e . target ) . attr ( "data-target" ) ;
5775 changed . model = modelName ;
5876
5977 setDropdownText ( $ ( e . target ) . text ( ) ) ;
78+ setModelMenus ( modelName ) ;
6079 } . bind ( this )
6180 ) ;
6281
@@ -81,6 +100,13 @@ export function Config(onClose) {
81100 } . bind ( this )
82101 ) ;
83102
103+ $ ( "#showAtomSnowstorm" ) . on (
104+ "click" ,
105+ function ( ) {
106+ changed . snow = $ ( "#showAtomSnowstorm" ) . prop ( "checked" ) ;
107+ } . bind ( this )
108+ ) ;
109+
84110 $ ( ".keyboard-menu a" ) . on (
85111 "click" ,
86112 function ( e ) {
0 commit comments