settings screen
This commit is contained in:
parent
c7c4760c8c
commit
5c0f0d22c9
@ -17,6 +17,16 @@
|
||||
background_color: rgba("#c0464b")
|
||||
|
||||
|
||||
<BgSlider@Slider+BackgroundColor>:
|
||||
background_color: 0, 0, 0, 0
|
||||
background_color: rgba("#c0464b")
|
||||
|
||||
|
||||
<BgSwitch@Switch+BackgroundColor>:
|
||||
background_color: 0, 0, 0, 0
|
||||
background_color: rgba("#c0464b")
|
||||
|
||||
|
||||
<RootScreen>:
|
||||
MapScreen:
|
||||
CompassScreen:
|
||||
@ -25,7 +35,6 @@
|
||||
<MapScreen>:
|
||||
FloatLayout:
|
||||
MapView:
|
||||
|
||||
id: mapview
|
||||
zoom: 16
|
||||
|
||||
@ -128,3 +137,75 @@
|
||||
size_hint: 1, 0.2
|
||||
pos_hint: {"x": 0, "top": 0.2}
|
||||
font_size: '40sp'
|
||||
|
||||
|
||||
|
||||
<SettingsScreen>:
|
||||
GridLayout:
|
||||
cols: 2
|
||||
BackgroundLabel:
|
||||
text: "Dark theme"
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
font_size: '14sp'
|
||||
BgSwitch:
|
||||
id: dark_theme
|
||||
active: True
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
BackgroundLabel:
|
||||
text: "Compas smoothing"
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
font_size: '14sp'
|
||||
BgSlider:
|
||||
id: slider_smoothing
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.1
|
||||
orientation: 'horizontal'
|
||||
value: 0.88
|
||||
BackgroundLabel:
|
||||
text: "Update frequency"
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
font_size: '14sp'
|
||||
BgSlider:
|
||||
id: slider_update_freq
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.1
|
||||
orientation: 'horizontal'
|
||||
value: 0.5
|
||||
BackgroundLabel:
|
||||
text: "Local altruism"
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
font_size: '14sp'
|
||||
BgSlider:
|
||||
id: slider_local_altruism
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.1
|
||||
orientation: 'horizontal'
|
||||
value: 0.1
|
||||
BackgroundLabel:
|
||||
text: "Destination altruism"
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
font_size: '14sp'
|
||||
BgSlider:
|
||||
id: slider_dest_altruism
|
||||
background_color: rgba("#f3e8d2")
|
||||
color: rgba("#346645")
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.2
|
||||
orientation: 'horizontal'
|
||||
value: 0.2
|
||||
|
||||
9
main.py
9
main.py
@ -27,6 +27,10 @@ class CompassScreen(Screen):
|
||||
pass
|
||||
|
||||
|
||||
class SettingsScreen(Screen):
|
||||
pass
|
||||
|
||||
|
||||
class FlockompassApp(App):
|
||||
|
||||
gps_data = DictProperty()
|
||||
@ -195,6 +199,11 @@ class FlockompassApp(App):
|
||||
|
||||
screen_manager.add_widget(self.cs)
|
||||
|
||||
|
||||
self.ss = SettingsScreen(name='settings')
|
||||
screen_manager.add_widget(self.ss)
|
||||
|
||||
|
||||
# smoothing vars for compass
|
||||
self.last_angle = 0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user