@@ -56,6 +56,17 @@ window.onload = function () {
5656 ui_message_scale : 1 ,
5757 ui_message_positionX : 0 ,
5858 ui_message_positionY : 0 ,
59+ ui_day_day : "0" ,
60+ ui_day_orientation : "0" ,
61+ ui_day_scale : 1 ,
62+ ui_day_positionX : 0 ,
63+ ui_day_positionY : 0 ,
64+ ui_date_date : "0" ,
65+ ui_date_orientation : "0" ,
66+ ui_date_delimiter : "0" ,
67+ ui_date_scale : 1 ,
68+ ui_date_positionX : 0 ,
69+ ui_date_positionY : 0 ,
5970 Share ( ) {
6071 copyToClipboard ( paramsToUrl ( { preset : btoa ( JSON . stringify ( gui . save ( ) ) ) } , { } , [ ] ) ) ;
6172 Log ( "Copied Preset URL to clipboard." ) ;
@@ -141,29 +152,46 @@ window.onload = function () {
141152 logoPositionFolder . add ( options , "ui_logo_positionX" ) . min ( - 2500 ) . max ( 2500 ) . step ( 1 ) . name ( "X" ) . onChange ( updateLogo ) ;
142153 logoPositionFolder . add ( options , "ui_logo_positionY" ) . min ( - 2500 ) . max ( 2500 ) . step ( 1 ) . name ( "Y" ) . onChange ( updateLogo ) ;
143154
144- const clockfolder = gui . addFolder ( "Clock" ) ;
145- clockfolder . add ( options , "ui_clock_clock" , optionsToDict ( config . general . properties . ui_clock_clock . options ) ) . name ( "Clock" ) . onChange ( updateMask ) ;
146- clockfolder . add ( options , "ui_clock_24HourFormat" ) . name ( "24 Hour format" ) . onChange ( ( ) => {
155+ const clockFolder = gui . addFolder ( "Clock" ) ;
156+ clockFolder . add ( options , "ui_clock_clock" , optionsToDict ( config . general . properties . ui_clock_clock . options ) ) . name ( "Clock" ) . onChange ( updateMask ) ;
157+ clockFolder . add ( options , "ui_clock_24HourFormat" ) . name ( "24 Hour format" ) . onChange ( ( ) => {
147158 updateTime ( ) ;
148159 updateMask ( ) ;
149160 } ) ;
150- clockfolder . add ( options , "ui_clock_dayLightSaving" ) . min ( - 1 ) . max ( 1 ) . step ( 1 ) . name ( "Day-light Saving" ) . onChange ( ( ) => {
161+ clockFolder . add ( options , "ui_clock_dayLightSaving" ) . min ( - 1 ) . max ( 1 ) . step ( 1 ) . name ( "Day-light Saving" ) . onChange ( ( ) => {
151162 updateTime ( ) ;
152163 updateMask ( ) ;
153164 } ) ;
154- clockfolder . add ( options , "ui_clock_scale" ) . min ( 0 ) . max ( 10 ) . step ( 1 ) . name ( "Scale" ) . onChange ( updateMask ) ;
155- const clockPositionFolder = clockfolder . addFolder ( "Position" ) ;
165+ clockFolder . add ( options , "ui_clock_scale" ) . min ( 0 ) . max ( 10 ) . step ( 1 ) . name ( "Scale" ) . onChange ( updateMask ) ;
166+ const clockPositionFolder = clockFolder . addFolder ( "Position" ) ;
156167 clockPositionFolder . add ( options , "ui_clock_positionX" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "X" ) . onChange ( updateMask ) ;
157168 clockPositionFolder . add ( options , "ui_clock_positionY" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "Y" ) . onChange ( updateMask ) ;
158169
159- const messagefolder = gui . addFolder ( "Message" ) ;
160- messagefolder . add ( options , "ui_message_message" ) . name ( "Message" ) . onChange ( updateMask ) ;
161- messagefolder . add ( options , "ui_message_text" ) . name ( "Message Text" ) . onChange ( updateMask ) ;
162- messagefolder . add ( options , "ui_message_scale" ) . min ( 0 ) . max ( 10 ) . step ( 1 ) . name ( "Scale" ) . onChange ( updateMask ) ;
163- const messagePositionFolder = messagefolder . addFolder ( "Position" ) ;
170+ const messageFolder = gui . addFolder ( "Message" ) ;
171+ messageFolder . add ( options , "ui_message_message" ) . name ( "Message" ) . onChange ( updateMask ) ;
172+ messageFolder . add ( options , "ui_message_text" ) . name ( "Message Text" ) . onChange ( updateMask ) ;
173+ messageFolder . add ( options , "ui_message_scale" ) . min ( 0 ) . max ( 10 ) . step ( 1 ) . name ( "Scale" ) . onChange ( updateMask ) ;
174+ const messagePositionFolder = messageFolder . addFolder ( "Position" ) ;
164175 messagePositionFolder . add ( options , "ui_message_positionX" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "X" ) . onChange ( updateMask ) ;
165176 messagePositionFolder . add ( options , "ui_message_positionY" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "Y" ) . onChange ( updateMask ) ;
166177
178+ const dayFolder = gui . addFolder ( "Day" ) ;
179+ dayFolder . add ( options , "ui_day_day" , optionsToDict ( config . general . properties . ui_day_day . options ) ) . name ( "Day" ) . onChange ( updateMask ) ;
180+ dayFolder . add ( options , "ui_day_orientation" , optionsToDict ( config . general . properties . ui_day_orientation . options ) ) . name ( "Orientation" ) . onChange ( updateMask ) ;
181+ dayFolder . add ( options , "ui_day_scale" ) . min ( 0 ) . max ( 10 ) . step ( 1 ) . name ( "Scale" ) . onChange ( updateMask ) ;
182+ const dayPositionFolder = dayFolder . addFolder ( "Position" ) ;
183+ dayPositionFolder . add ( options , "ui_day_positionX" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "X" ) . onChange ( updateMask ) ;
184+ dayPositionFolder . add ( options , "ui_day_positionY" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "Y" ) . onChange ( updateMask ) ;
185+
186+ const dateFolder = gui . addFolder ( "Date" ) ;
187+ dateFolder . add ( options , "ui_date_date" , optionsToDict ( config . general . properties . ui_date_date . options ) ) . name ( "Day" ) . onChange ( updateMask ) ;
188+ dateFolder . add ( options , "ui_date_orientation" , optionsToDict ( config . general . properties . ui_date_orientation . options ) ) . name ( "Orientation" ) . onChange ( updateMask ) ;
189+ dateFolder . add ( options , "ui_date_delimiter" , optionsToDict ( config . general . properties . ui_date_delimiter . options ) ) . name ( "Delimiter" ) . onChange ( updateMask ) ;
190+ dateFolder . add ( options , "ui_date_scale" ) . min ( 0 ) . max ( 10 ) . step ( 1 ) . name ( "Scale" ) . onChange ( updateMask ) ;
191+ const datePositionFolder = dateFolder . addFolder ( "Position" ) ;
192+ datePositionFolder . add ( options , "ui_date_positionX" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "X" ) . onChange ( updateMask ) ;
193+ datePositionFolder . add ( options , "ui_date_positionY" ) . min ( - 100 ) . max ( 100 ) . step ( 1 ) . name ( "Y" ) . onChange ( updateMask ) ;
194+
167195 const otherFolder = gui . addFolder ( "Other" ) ;
168196 otherFolder . add ( options , 'ui_other_codesCommaSeparated' ) . name ( 'Codes (Comma separated)' ) . onChange ( ( ) => {
169197 options . codes = makeCodes ( options . ui_other_codesCommaSeparated ) ;
@@ -282,6 +310,34 @@ window.onload = function () {
282310 if ( properties . ui_message_message || properties . ui_message_text || properties . ui_message_scale || properties . ui_message_positionx || properties . ui_message_positiony )
283311 updateMask ( ) ;
284312
313+ if ( properties . ui_day_day )
314+ options . ui_day_day = properties . ui_day_day . value ;
315+ if ( properties . ui_day_orientation )
316+ options . ui_day_orientation = properties . ui_day_orientation . value ;
317+ if ( properties . ui_day_scale )
318+ options . ui_day_scale = properties . ui_day_scale . value ;
319+ if ( properties . ui_day_positionx )
320+ options . ui_day_positionX = properties . ui_day_positionx . value ;
321+ if ( properties . ui_day_positiony )
322+ options . ui_day_positionY = properties . ui_day_positiony . value ;
323+ if ( properties . ui_day_day || properties . ui_day_orientation || properties . ui_day_scale || properties . ui_day_positionx || properties . ui_day_positiony )
324+ updateMask ( ) ;
325+
326+ if ( properties . ui_date_date )
327+ options . ui_date_date = properties . ui_date_date . value ;
328+ if ( properties . ui_date_orientation )
329+ options . ui_date_orientation = properties . ui_date_orientation . value ;
330+ if ( properties . ui_date_delimiter )
331+ options . ui_date_delimiter = properties . ui_date_delimiter . value ;
332+ if ( properties . ui_date_scale )
333+ options . ui_date_scale = properties . ui_date_scale . value ;
334+ if ( properties . ui_date_positionx )
335+ options . ui_date_positionX = properties . ui_date_positionx . value ;
336+ if ( properties . ui_date_positiony )
337+ options . ui_date_positionY = properties . ui_date_positiony . value ;
338+ if ( properties . ui_date_date || properties . ui_date_orientation || properties . ui_date_delimiter || properties . ui_date_scale || properties . ui_date_positionx || properties . ui_date_positiony )
339+ updateMask ( ) ;
340+
285341 if ( properties . ui_other_codescommaseparated ) {
286342 options . codes = makeCodes ( properties . ui_other_codescommaseparated . value ) ;
287343 initialAnimation ( ) ;
@@ -422,7 +478,7 @@ window.onload = function () {
422478 case "2" : {
423479 if ( options . ui_clock_scale > 0 ) {
424480 let center = [ Math . floor ( ( columns - 7 * options . ui_clock_scale ) / 2 ) , Math . floor ( ( rows - 11 * options . ui_clock_scale ) / 2 ) ] ;
425- drawTextOnMask ( hour + "\\n" + minute , center [ 0 ] + options . ui_clock_positionX , center [ 1 ] + options . ui_clock_positionY , options . ui_clock_scale ) ;
481+ drawTextOnMask ( hour + "\\n" + minute , center [ 0 ] + options . ui_clock_positionX , center [ 1 ] + options . ui_clock_positionY , options . ui_clock_scale ) ;
426482 } else {
427483 let center = [ Math . floor ( ( columns - 2 ) / 2 ) , Math . floor ( ( rows - 2 ) / 2 ) ] ;
428484 drawTextOnMatrix ( hour + "\\n" + minute , center [ 0 ] + options . ui_clock_positionX , center [ 1 ] + options . ui_clock_positionY ) ;
0 commit comments