Compare commits

...

2 Commits

@ -6,6 +6,7 @@ kivy.require('2.2.1')
from kivy.app import App from kivy.app import App
from kivy.uix.boxlayout import BoxLayout from kivy.uix.boxlayout import BoxLayout
from kivy.uix.stacklayout import StackLayout
from kivy.uix.button import Button from kivy.uix.button import Button
from kivy.uix.label import Label from kivy.uix.label import Label
from kivy.uix.popup import Popup from kivy.uix.popup import Popup
@ -31,7 +32,7 @@ class SingleBridgeScreen(Screen):
self.sm = sm self.sm = sm
self.tinge = tinge self.tinge = tinge
self.bridge = bridge self.bridge = bridge
self.layout = BoxLayout() self.layout = StackLayout()
self.add_widget(self.layout) self.add_widget(self.layout)
self.set_group_buttons() self.set_group_buttons()
@ -42,6 +43,14 @@ class SingleBridgeScreen(Screen):
size_hint=(1, 0.1), size_hint=(1, 0.1),
on_press=lambda button: self.press_button(button, group)) on_press=lambda button: self.press_button(button, group))
self.layout.add_widget(button) self.layout.add_widget(button)
backbutton = Button(
text="Back",
size_hint=(1, 0.1),
on_press=lambda button: self.press_back_button(button, "back"))
self.layout.add_widget(backbutton)
def press_back_button(self, button, group):
self.sm.current = "bridge_screen"
def press_button(self, light, button): def press_button(self, light, button):
print(light) print(light)

Loading…
Cancel
Save