-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathmain.kv
4954 lines (4497 loc) · 181 KB
/
main.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#: import RiseInTransition kivy.uix.screenmanager.RiseInTransition
#: import Animation kivy.animation.Animation
#:import Toolbar kivymd.toolbar.Toolbar
#:import ThemeManager kivymd.theming.ThemeManager
#:import NavigationDrawer kivymd.navigationdrawer.NavigationDrawer
#:import MDCheckbox kivymd.selectioncontrols.MDCheckbox
#:import MDSwitch kivymd.selectioncontrols.MDSwitch
#:import MDList kivymd.list.MDList
#:import OneLineListItem kivymd.list.OneLineListItem
#:import TwoLineListItem kivymd.list.TwoLineListItem
#:import ThreeLineListItem kivymd.list.ThreeLineListItem
#:import OneLineAvatarListItem kivymd.list.OneLineAvatarListItem
#:import OneLineIconListItem kivymd.list.OneLineIconListItem
#:import OneLineAvatarIconListItem kivymd.list.OneLineAvatarIconListItem
#:import SingleLineTextField kivymd.textfields.SingleLineTextField
#:import MDSpinner kivymd.spinner.MDSpinner
#:import MDCard kivymd.card.MDCard
#:import MDSeparator kivymd.card.MDSeparator
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import colors kivymd.color_definitions.colors
#:import SmartTile kivymd.grid.SmartTile
#:import MDSlider kivymd.slider.MDSlider
#:import MDTabbedPanel kivymd.tabs.MDTabbedPanel
#:import MDTab kivymd.tabs.MDTab
#:import MDProgressBar kivymd.progressbar.MDProgressBar
#:import MDAccordion kivymd.accordion.MDAccordion
#:import MDAccordionItem kivymd.accordion.MDAccordionItem
#:import MDThemePicker kivymd.theme_picker.MDThemePicker
#:import math math
#:import MapSource mapview.MapSource
#on_press: Animation(x=newposition or y=newposition).start(id) #to animate things
#V2.3.0
AnchorLayout:
anchor_x: 'center'
anchor_y: 'top'
ScreenManager:
id: sm
size_hint: 1, 1
MainScreen:
name: "main"
FloatLayout: #Main Elements
size_hint: 1, 1
Image:
id: mainwallpaper
source: app.wallpapernow
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
Image:
source: 'data/elements/AppBar_menu_button_KivyMD.png'
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
Label: #label to display current time
markup: True
text: app.timenow
font_size: 40
pos: 340, 210
FloatLayout: #Radar Elements
size_hint: 1, 1
Image: #image to display if radar is on or off
source: app.radariconsource
center_x: self.center_x
center_y: self.center_y
JZInvisiButton:
elevation_normal: 3
size_hint: None, None
size: dp(64), dp(64)
pos: 613, 415
on_release: app.radar_callback_schedge()
FloatLayout: #Temp Bubble Stuff
size_hint: 1, 1
Button:
#text: Button to call temp
#stays put
id: tempbutt
on_press: app.addtemp()
on_press: Animation(x=680, duration=.4).start(TempBubble) #moves button back to screen
pos: 700, 300
size_hint: .3, .3
background_color:(0.9, 0.9, 0.9, 0.0)
MDFloatingTempActionButton:
id: TempBubble
elevation_normal: 0
size_hint: .12, .2 #96x96
pos: 1200, 300
on_press: Animation(x=1800, duration=.4).start(TempBubble) #moves button off screen
on_press: app.killtemp()
FloatLayout: #LockscreenButton - placed over top right time - used to call lockscreen
size_hint: 1, 1
Button:
on_press: Animation(y=0, duration=.1).start(lockscreenwallpaper)
on_press: Animation(y=0, duration=.1).start(lockscreentime)
on_press: Animation(y=0, duration=.1).start(lockscreenbutton)
pos: 680, 415
size_hint: .3, .2
opacity: 0
Button:
on_press: Animation(y=0, duration=.1).start(lockscreenwallpaper)
on_press: Animation(y=0, duration=.1).start(lockscreentime)
on_press: Animation(y=0, duration=.1).start(lockscreenbutton)
pos: 230, 30
size_hint: .425, .8
opacity: 0
FloatLayout:
size_hint: 1,1
JZLargeButton:
id: OilReminder
size_hint: .5, .5
pos: ((200, 120) if app.changeoil == 1 else (3000, 300))
on_press: self.pos = (3000, 300)
on_press: sm.current = 'maintenance'
on_press: sm.transition.direction = 'up'
Image:
source: 'data/icons/oil_icon.png'
allow_stretch: True
size_hint: .9, .9
FloatLayout:
size_hint: 1, 1
Image:
id: ShortcutDrawerBG
source: 'data/elements/ShortcutDrawer.png'
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
pos: -340, 0
Button:
id: ShortcutDrawerButton
on_press: Animation(x=0, duration=.2).start(ShortcutDrawerBG)
on_press: Animation(x=0, duration=.2).start(SCD_DateButton)
on_press: Animation(x=0, duration=.2).start(SCD_SettingsButton)
on_press: Animation(x=0, duration=.2).start(SCD_GarageButton)
on_press: Animation(x=0, duration=.2).start(SCD_RadarButton)
on_press: Animation(x=0, duration=.2).start(SCD_StopwatchButton)
on_press: Animation(x=-223, duration=.2).start(SCD_Date)
on_press: Animation(x=320, duration=.1).start(ShortcutDrawerReturnButton)
on_press: Animation(x=1800, duration=.4).start(TempBubble) #moves button off screen
on_press: app.killtemp()
pos: -10, 0
size_hint: .1, 1.1
background_color:(0.9, 0.9, 0.9, 0.0)
FloatLayout: #ShortCutDrawer Pieces
size_hint: 1, 1
Button:
id: SCD_DateButton
pos: -340, 408
size_hint: .4, .15
background_normal: 'data/buttons/shortcutdrawer/SD_date.png'
background_down: 'data/buttons/shortcutdrawer/SD_date_pressed.png'
on_press: Animation(x=-340, duration=.2).start(ShortcutDrawerBG)
on_press: Animation(x=-340, duration=.2).start(SCD_DateButton)
on_press: Animation(x=-340, duration=.2).start(SCD_SettingsButton)
on_press: Animation(x=-340, duration=.2).start(SCD_GarageButton)
on_press: Animation(x=-340, duration=.2).start(SCD_RadarButton)
on_press: Animation(x=-340, duration=.2).start(SCD_StopwatchButton)
on_press: Animation(x=-543, duration=.2).start(SCD_Date)
on_press: Animation(x=820, duration=.1).start(ShortcutDrawerReturnButton)
Button:
id: SCD_SettingsButton
pos: -340, 336
size_hint: .4, .15
background_normal: 'data/buttons/shortcutdrawer/SD_settings.png'
background_down: 'data/buttons/shortcutdrawer/SD_settings_pressed.png'
on_press: sm.current = 'settings'
on_press: sm.transition.direction = 'left'
on_press: Animation(x=-340, duration=.2).start(ShortcutDrawerBG)
on_press: Animation(x=-340, duration=.2).start(SCD_DateButton)
on_press: Animation(x=-340, duration=.2).start(SCD_SettingsButton)
on_press: Animation(x=-340, duration=.2).start(SCD_GarageButton)
on_press: Animation(x=-340, duration=.2).start(SCD_RadarButton)
on_press: Animation(x=-340, duration=.2).start(SCD_StopwatchButton)
on_press: Animation(x=-543, duration=.2).start(SCD_Date)
on_press: Animation(x=820, duration=.1).start(ShortcutDrawerReturnButton)
Button:
id: SCD_GarageButton
pos: -340, 264
size_hint: .4, .15
background_normal: 'data/buttons/shortcutdrawer/SD_garage.png'
background_down: 'data/buttons/shortcutdrawer/SD_garage_pressed.png'
on_press: app.garage_callback_schedge()
on_release: app.garage_callback_schedge() #only on when button is pressed
Button:
id: SCD_RadarButton
pos: -340, 192
size_hint: .4, .15
background_normal: 'data/buttons/shortcutdrawer/SD_radar.png'
background_down: 'data/buttons/shortcutdrawer/SD_radar_pressed.png'
on_press: app.radar_callback_schedge()
Button:
id: SCD_StopwatchButton
pos: -340, 120
size_hint: .4, .15
background_normal: 'data/buttons/shortcutdrawer/SD_stopwatch.png'
background_down: 'data/buttons/shortcutdrawer/SD_stopwatch_pressed.png'
on_press: sm.current = 'stopwatch'
on_press: sm.transition.direction = 'left'
on_press: Animation(x=-340, duration=.2).start(ShortcutDrawerBG)
on_press: Animation(x=-340, duration=.2).start(SCD_DateButton)
on_press: Animation(x=-340, duration=.2).start(SCD_SettingsButton)
on_press: Animation(x=-340, duration=.2).start(SCD_GarageButton)
on_press: Animation(x=-340, duration=.2).start(SCD_RadarButton)
on_press: Animation(x=-340, duration=.2).start(SCD_StopwatchButton)
on_press: Animation(x=-543, duration=.2).start(SCD_Date)
on_press: Animation(x=820, duration=.1).start(ShortcutDrawerReturnButton)
Label:
id: SCD_Date
text: app.daynow + ", " + app.datenow
pos: -535, 205
font_size: 20
FloatLayout:
size_hint: 1, 1
Button:
id: ShortcutDrawerReturnButton
on_press: Animation(x=-340, duration=.2).start(ShortcutDrawerBG)
on_press: Animation(x=-340, duration=.2).start(SCD_DateButton)
on_press: Animation(x=-340, duration=.2).start(SCD_SettingsButton)
on_press: Animation(x=-340, duration=.2).start(SCD_GarageButton)
on_press: Animation(x=-340, duration=.2).start(SCD_RadarButton)
on_press: Animation(x=-340, duration=.2).start(SCD_StopwatchButton)
on_press: Animation(x=-543, duration=.2).start(SCD_Date)
on_press: Animation(x=820, duration=.1).start(ShortcutDrawerReturnButton)
pos: 820, 0
size_hint: 1, 1.1
background_color:(0.9, 0.9, 0.9, 0.0)
AudioScreen:
name: "audio"
FloatLayout:
size_hint: 1, 1
Image:
source: 'data/wallpapers/greymaterial.png'
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
Button: #Source Bar - press to return
id: sourcebar
background_normal: 'data/icons/audio/audiocontrol.png'
background_down: 'data/icons/audio/audiocontrol.png'
background_color: app.theme_cls.primary_color
size_hint: 1.1, .4
pos: -6, 450
allow_stretch: True
Button:
id: audio_aux
on_press: app.aux_callback_schedge()
on_release: Animation(y = 500, duration=.2).start(audio_aux)
on_release: Animation(y = 500, duration=.2).start(audio_amfm)
on_release: Animation(y = 450, duration=.2).start(sourcebar)
on_release: Animation(x = 1000, duration=0).start(audio_sourcereturn)
on_release: app.displaybtdata()
background_normal: 'data/icons/audio/auxin.png'
background_down: 'data/icons/audio/auxin_pressed.png'
pos: 486, 500
size_hint: None, None
height: 140
width: 140
Button:
id: audio_amfm
on_press: app.amfm_callback_schedge()
on_release: Animation(y = 500, duration=.2).start(audio_aux)
on_release: Animation(y = 500, duration=.2).start(audio_amfm)
on_release: Animation(y = 450, duration=.2).start(sourcebar)
on_release: Animation(x = 1000, duration=0).start(audio_sourcereturn)
on_release: app.disablebluetooth()
on_release: Animation(x = 48, duration=0).start(bluetooth_enable)
on_release: Animation(x = 1000, duration=0).start(bluetooth_enablereturn)
background_normal: 'data/icons/audio/amfm.png'
background_down: 'data/icons/audio/amfm_pressed.png'
size_hint: None, None
height: 140
width: 140
pos: 146, 500
Toolbar:
id: toolbar
pos_hint: {"right": 1, 'top':1}
#title: ''
background_color: app.theme_cls.primary_color
opacity: 1.0
Label: #label to display current time
markup: True
text: app.timenow
font_size: 40
pos: 340, 210
Label: #label to display screen name
markup: True
text: 'Audio'
font_size: 30
pos: 0, 210
Button: #return button
#text: "return to main"
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
on_press: app.killbtdata()
pos: -365, 399
size_hint: 1, .2
background_color:(0.9, 0.9, 0.9, 0.0)
Image:
source: 'data/icons/arrow_back_white.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 50, 50
allow_stretch: True
Button: #slide to return
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
on_press: app.killbtdata()
opacity: 0
pos: -15, -5
size_hint: .05, 1.1
MDLabel: #label to display Audio Track Name - pulled from bluetooth
text: app.bluetoothtitle
font_style: 'Display2'
theme_text_color: 'Primary'
pos: 60, 90
MDLabel: #label to display Audio Artist - pulled from bluetooth
text: app.bluetoothartist
font_style: 'Display1'
opacity: .6
pos: 64, 42
Image:
source: 'data/elements/audiobar.png'
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
Button:
id: audio_source
elevation_normal: 3
size_hint: .125, .2083333 #100x100
background_normal: 'data/icons/audio/more.png'
background_down: 'data/icons/audio/more_pressed.png'
pos: 654, 104
on_press: Animation(y = 286, duration=.2).start(audio_aux)
on_press: Animation(y = 286, duration=.2).start(audio_amfm)
on_press: Animation(y = 300, duration=.2).start(sourcebar)
on_release: Animation(x = 654, duration=0).start(audio_sourcereturn)
on_press: app.killbtdata()
Button:
id: audio_sourcereturn
elevation_normal: 3
size_hint: .125, .2083333 #100x100
background_normal: 'data/icons/audio/more.png'
background_down: 'data/icons/audio/more_pressed.png'
pos: 3000, 104
on_press: Animation(y = 500, duration=.2).start(audio_aux)
on_press: Animation(y = 500, duration=.2).start(audio_amfm)
on_press: Animation(y = 450, duration=.2).start(sourcebar)
on_press: Animation(x = 3000, duration=0).start(audio_sourcereturn)
on_press: app.displaybtdata()
Button:
id: bluetooth_enable
elevation_normal: 3
size_hint: .125, .2083333 #100x100
background_normal: 'data/icons/audio/bluetoothoff.png'
background_down: 'data/icons/audio/bluetoothoff_pressed.png'
pos: 48, 104
#pos: 3000, 104
on_press: Animation(x = 3000, duration=0).start(bluetooth_enable)
on_press: Animation(x = 48, duration=0).start(bluetooth_enablereturn)
on_press: app.enablebluetooth()
Button:
id: bluetooth_enablereturn
elevation_normal: 3
size_hint: .125, .2083333 #100x100
background_normal: 'data/icons/audio/bluetoothon.png'
background_down: 'data/icons/audio/bluetoothon_pressed.png'
#pos: 3000, 104
pos: 48, 104
on_press: Animation(x = 48, duration=0).start(bluetooth_enable)
on_press: Animation(x = 3000, duration=0).start(bluetooth_enablereturn)
on_press: app.disablebluetooth()
Button: #play
id: audio_play
pos: 337, -200
size_hint: .1575, .2625 #126x126
background_normal: 'data/icons/audio/play.png'
background_down: 'data/icons/audio/play_pressed.png'
on_press: Animation(y = -200, duration=0).start(audio_play)
on_press: Animation(y = 92, duration=0).start(audio_pause)
on_press: app.bluetoothplay_callback_schedge()
background_color: app.theme_cls.primary_color
Button: #pause
id: audio_pause
pos: 337, 92
size_hint: .1575, .2625 #126x126
background_normal: 'data/icons/audio/pause.png'
background_down: 'data/icons/audio/pause_pressed.png'
on_press: Animation(y = -200, duration=0).start(audio_pause)
on_press: Animation(y = 92, duration=0).start(audio_play)
on_press: app.bluetoothpause_callback_schedge()
background_color: app.theme_cls.primary_color
Button: #prev
pos: 180, 105
size_hint: .125, .2083333 #100x100
background_normal: 'data/icons/audio/prev.png'
background_down: 'data/icons/audio/prev_pressed.png'
on_press: app.seekdown_callback_schedge()
Button: #next
pos: 520, 105
size_hint: .125, .2083333 #100x100
background_normal: 'data/icons/audio/next.png'
background_down: 'data/icons/audio/next_pressed.png'
on_press: app.seekup_callback_schedge()
BoxLayout:
orientation:'vertical'
padding: '35dp'
size_hint: 1, .9125
MDProgressBar:
pos: 0, -20
value: app.bluetoothprogress
min: 0
max: app.bluetoothduration
opacity: 0 if app.bluetoothprogress == 0 else 1
PerfScreen:
name: "performance"
FloatLayout:
size_hint: 1, 1
Image:
source: 'data/wallpapers/darkgreyplain.png'
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
Toolbar:
id: toolbar
pos_hint: {"right": 1, 'top':1}
#title: ''
background_color: (.835 ,0, 0, 1)
opacity: 1.0
Button:
on_press: sm.current = 'nosscreen'
on_press: sm.transition.direction = 'left'
on_press: Animation(y=-100, duration=.2).start(dock)
on_press: Animation(y=-100, duration=.2).start(dock_normal_audio)
on_press: Animation(y=-100, duration=.2).start(dock_normal_perf)
on_press: Animation(y=-100, duration=.2).start(dock_normal_obd)
on_press: Animation(y=-100, duration=.2).start(dock_normal_apps)
on_press: Animation(y=-100, duration=.2).start(dock_normal_controls)
on_press: Animation(y=-100, duration=.2).start(dock_normal_brightness)
on_press: Animation(y=-100, duration=.2).start(dock_normal_power)
pos: 680, 415
size_hint: .3, .2
opacity: 0
Label: #label to display current time
markup: True
text: app.timenow
font_size: 40
pos: 340, 210
Label: #label to display screen name
markup: True
text: '[size=30]Performance[/size]'
pos: 0, 210
FloatLayout:
size_hint: 1, 1
Button: #return button
#text: "return to main"
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
pos: -365, 399
size_hint: 1, .2
background_color:(0.9, 0.9, 0.9, 0.0)
Image:
source: 'data/icons/arrow_back_white.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 50, 50
allow_stretch: True
Button: #slide to return
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
opacity: 0
pos: -15, -5
size_hint: .05, 1.1
Button:
text: "\n\n\n\n\nStopwatch"
font_size: 20
on_release: sm.current = 'stopwatch'
on_press: sm.transition.direction = 'left'
pos: 48, 180
size_hint: None, None
height: 140
width: 140
background_normal: 'data/icons/app_icons/stopwatch_icon.png'
background_down: 'data/icons/app_icons/stopwatch_icon_pressed.png' #+14 in GIMP
Button:
text: "\n\n\n\n\nLaunch Control"
font_size: 20
on_release: sm.current = 'launchcontrolsetup'
on_press: sm.transition.direction = 'left'
pos: 236, 180
size_hint: None, None
height: 140
width: 140
background_normal: 'data/icons/app_icons/launch_icon.png'
background_down: 'data/icons/app_icons/launch_icon_pressed.png'
Button:
text: "\n\n\n\n\nAccelerometer"
font_size: 20
on_release: sm.current = 'accelerometer'
on_release: sm.transition.direction = 'left'
on_press: Animation(y=-100, duration=.2).start(dock)
on_press: Animation(y=-100, duration=.2).start(dock_normal_audio)
on_press: Animation(y=-100, duration=.2).start(dock_normal_perf)
on_press: Animation(y=-100, duration=.2).start(dock_normal_obd)
on_press: Animation(y=-100, duration=.2).start(dock_normal_apps)
on_press: Animation(y=-100, duration=.2).start(dock_normal_controls)
on_press: Animation(y=-100, duration=.2).start(dock_normal_brightness)
on_press: Animation(y=-100, duration=.2).start(dock_normal_power)
on_press: app.addaccel()
pos: 424, 180
size_hint: None, None
height: 140
width: 140
background_normal: 'data/icons/app_icons/accel_icon.png'
background_down: 'data/icons/app_icons/accel_icon_pressed.png'
Button:
text: "\n\n\n\n\nOBDII"
font_size: 20
on_release: sm.current = 'gaugeselect'
on_release: sm.transition.direction = 'left'
on_release: app.setup_OBD() #set up obd stuff
pos: 612, 180
size_hint: None, None
height: 140
width: 140
background_normal: 'data/icons/app_icons/obdII_icon.png'
background_down: 'data/icons/app_icons/obdII_icon_pressed.png'
AppsScreen:
name: "apps"
FloatLayout:
size_hint: 1, 1
Image:
source: 'data/wallpapers/darkgreyplain.png'
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
GridLayout:
cols: 5
rows: 4
padding: 30
spacing: 50, 30
size_hint: 1, 1
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'paint'
on_press: sm.transition.direction = 'left'
on_press: Animation(y=-100, duration=0).start(dock)
on_press: Animation(y=-100, duration=0).start(dock_normal_audio)
on_press: Animation(y=-100, duration=0).start(dock_normal_perf)
on_press: Animation(y=-100, duration=0).start(dock_normal_obd)
on_press: Animation(y=-100, duration=0).start(dock_normal_apps)
on_press: Animation(y=-100, duration=0).start(dock_normal_controls)
on_press: Animation(y=-100, duration=0).start(dock_normal_brightness)
on_press: Animation(y=-100, duration=0).start(dock_normal_power)
text: "\n\n\n\nPaint"
font_size: 20
Image:
source: 'data/icons/app_icons/paint_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'logo'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nCoPilot Logo"
font_size: 20
Image:
source: 'data/icons/app_icons/CoPilot_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'clockchooser'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nClocks"
font_size: 20
Image:
source: 'data/icons/app_icons/clocks_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'gps'
on_press: sm.transition.direction = 'left'
on_press: Animation(y=-100, duration=.2).start(dock)
on_press: Animation(y=-100, duration=.2).start(dock_normal_audio)
on_press: Animation(y=-100, duration=.2).start(dock_normal_perf)
on_press: Animation(y=-100, duration=.2).start(dock_normal_obd)
on_press: Animation(y=-100, duration=.2).start(dock_normal_apps)
on_press: Animation(y=-100, duration=.2).start(dock_normal_controls)
on_press: Animation(y=-100, duration=.2).start(dock_normal_brightness)
on_press: Animation(y=-100, duration=.2).start(dock_normal_power)
text: "\n\n\n\nGPS"
font_size: 20
Image:
source: 'data/icons/app_icons/gps_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'stopwatch'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nStopwatch"
font_size: 20
Image:
source: 'data/icons/app_icons/stopwatch_color_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'files'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nFiles"
font_size: 20
Image:
source: 'data/icons/app_icons/files_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'launchcontrolsetup'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nLaunch Control"
font_size: 20
Image:
source: 'data/icons/app_icons/launch_color_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'photos'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nPhotos"
font_size: 20
Image:
source: 'data/icons/app_icons/photos_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'maintenance'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nMaintenance"
font_size: 20
Image:
source: 'data/icons/app_icons/maintenance_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
on_press: sm.current = 'testapp'
on_press: sm.transition.direction = 'left'
text: "\n\n\n\nTest"
font_size: 20
Image:
source: 'data/icons/app_icons/test_icon.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 70, 70
allow_stretch: True
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
#text: "Not Used"
font_size: 30
Button:
background_color:(0.9, 0.9, 0.9, 0.0)
#text: "Not Used"
font_size: 30
ControlsScreen:
name: "controls"
FloatLayout:
size_hint: 1, 1
Image:
source: 'data/wallpapers/darkgreyplain.png'
center_x: self.center_x
center_y: self.center_y
allow_stretch: True
Toolbar:
id: toolbar
pos_hint: {"right": 1, 'top':1}
#title: ''
background_color: (1, .34, .13, 1)
Label: #label to display current time
markup: True
text: app.timenow
font_size: 40
pos: 340, 210
Label: #label to display screen name
markup: True
text: '[size=30]Controls[/size]'
pos: 0, 210
FloatLayout:
size_hint: 1, 1
Button: #return button
#text: "return to main"
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
pos: -365, 399
size_hint: 1, .2
background_color:(0.9, 0.9, 0.9, 0.0)
Image:
source: 'data/icons/arrow_back_white.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 50, 50
allow_stretch: True
Button: #slide to return
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
opacity: 0
pos: -15, -5
size_hint: .05, 1.1
Button:
text: "\n\n\n\n\nGarage"
font_size: 20
on_press: app.garage_callback_schedge()
on_release: app.garage_callback_schedge() #only on when button is pressed
pos: 48, 180
size_hint: None, None
height: 140
width: 140
background_normal: 'data/icons/app_icons/garage_icon.png'
background_down: 'data/icons/app_icons/garage_icon_pressed.png' #+14 in GIMP
Button:
text: "\n\n\n\n\nRadar"
font_size: 20
on_press: app.radar_callback_schedge()
pos: 236, 180
size_hint: None, None
height: 140
width: 140
background_normal: 'data/icons/app_icons/radar_icon.png'
background_down: 'data/icons/app_icons/radar_icon_pressed.png'
Button:
text: "\n\n\n\n\nScreen Off"
font_size: 20
on_press: app.TurnScreenOff()
on_press: sm.current = 'offscreen'
on_press: sm.transition.direction = 'left'
pos: 424, 180
size_hint: None, None
height: 140
width: 140
background_normal: 'data/icons/app_icons/brightness_icon.png'
background_down: 'data/icons/app_icons/brightness_icon_pressed.png'
Button:
text: "\n\n\n\n\nCup Lights"
font_size: 20
on_press: app.leds_callback_schedge()
pos: 612, 180
size_hint: None, None
height: 140
width: 140
background_normal: app.lightsiconsource
background_down: 'data/icons/app_icons/lights_icon_pressed.png'
SettingsScreen:
name: "settings"
FloatLayout:
size_hint: 1, 1
Image:
source: 'data/wallpapers/greyplain.png'
center_x: self.center_x
center_y: self.center_y
Toolbar:
id: toolbar
pos_hint: {"right": 1, 'top':1}
#title: ''
background_color: app.theme_cls.primary_color
Label: #label to display current time
markup: True
text: app.timenow
font_size: 40
pos: 340, 210
Label: #label to display screen name
markup: True
text: '[size=30]Settings[/size]'
pos: 0, 210
Button: #return button
#text: "return to main"
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
on_press: app.save()
pos: -365, 399
size_hint: 1, .2
background_color:(0.9, 0.9, 0.9, 0.0)
Image:
source: 'data/icons/arrow_back_white.png'
center_x: self.parent.center_x
center_y: self.parent.center_y
size: 50, 50
allow_stretch: True
Button: #slide to return
on_press: sm.current = 'main'
on_press: sm.transition.direction = 'right'
on_press: app.save()
opacity: 0
pos: -15, -5
size_hint: .05, 1.1
Button: #enable dev button - tap 5 times to enable - will see snackbar on success
on_press: app.devtap()
on_press: app.show_example_snackbar('enabledev')
on_press: Animation(x=0, duration=.2).start(killdevbutton) if app.devtaps >= 4 else Animation(x=1600, duration=0).start(killdevbutton)
size_hint: .2, .15
pos: 320, 400
opacity: 0
FloatLayout:
size_hint: 1, .88
MDTabbedPanel:
id: tab_panel
tab_display_mode:'text'
font_size: 30
MDTab:
name: 'system'
text: "System"
FloatLayout:
Button:
size_hint: 1, .19
pos: 0, 304
background_normal: 'data/buttons/settingslines/SL_SysDiag.png'
background_down: 'data/buttons/settingslines/SL_SysDiag_pressed.png'
on_press: sm.current = 'sysdiagnostics'
on_press: app.add_message()
on_press: sm.transition.direction = 'left'
Button:
size_hint: 1, .19
pos: 0, 232
background_normal: 'data/buttons/settingslines/SL_SysDebug.png'
background_down: 'data/buttons/settingslines/SL_SysDebug_pressed.png'
on_press: sm.current = 'sysdebug'
on_press: sm.transition.direction = 'left'
Button:
size_hint: 1, .19
pos: 0, 160
background_normal: 'data/buttons/settingslines/SL_SysReset.png'
background_down: 'data/buttons/settingslines/SL_SysReset_pressed.png'
on_release: app.show_indev_dialog()
Button:
id: killdevbutton
size_hint: 1, .19
pos: 1600, 88
background_normal: 'data/buttons/settingslines/SL_killdev.png'
background_down: 'data/buttons/settingslines/SL_killdev_pressed.png'
on_press: app.killdev()
on_press: Animation(x=1600, duration=.2).start(killdevbutton)
MDTab:
name: 'GPIO'
text: "GPIO"
FloatLayout:
Button:
size_hint: 1, .19
pos: 0, 304
background_normal: 'data/buttons/settingslines/SL_HK1.png'
background_down: 'data/buttons/settingslines/SL_HK1_pressed.png'
on_press: sm.current = 'hotkey1chooser'
on_press: sm.transition.direction = 'left'
text: " " + app.HKonenow
Button:
size_hint: 1, .19
pos: 0, 232
background_normal: 'data/buttons/settingslines/SL_HK2.png'
background_down: 'data/buttons/settingslines/SL_HK2_pressed.png'
on_press: sm.current = 'hotkey2chooser'
on_press: sm.transition.direction = 'left'
text: " " + app.HKtwonow
Button:
size_hint: 1, .19
pos: 0, 160
background_normal: 'data/buttons/settingslines/SL_HKdefault.png'
background_down: 'data/buttons/settingslines/SL_HKdefault_pressed.png'
on_press: app.sethotkeydefaults()
MDTab:
name: 'theme'
text: "Theme"
FloatLayout:
Button:
size_hint: 1, .19
pos: 0, 304
background_normal: 'data/buttons/settingslines/SL_theme.png'
background_down: 'data/buttons/settingslines/SL_theme_pressed.png'
on_release: MDThemePicker().open()
text: " " + app.theme_cls.primary_palette
Button:
size_hint: 1, .19
pos: 0, 232
background_normal: 'data/buttons/settingslines/SL_wallpaper.png'
background_down: 'data/buttons/settingslines/SL_wallpaper_pressed.png'
on_press: sm.current = 'wallpaperselect'
on_press: sm.transition.direction = 'left'
on_press: Animation(y=-100, duration=0).start(dock)
on_press: Animation(y=-100, duration=0).start(dock_normal_audio)
on_press: Animation(y=-100, duration=0).start(dock_normal_perf)
on_press: Animation(y=-100, duration=0).start(dock_normal_obd)
on_press: Animation(y=-100, duration=0).start(dock_normal_apps)
on_press: Animation(y=-100, duration=0).start(dock_normal_controls)