Compare commits
2 commits
26bbaf3aa4
...
85c997430b
Author | SHA1 | Date | |
---|---|---|---|
|
85c997430b | ||
|
cf593320bb |
1 changed files with 10 additions and 1 deletions
11
main.py
11
main.py
|
@ -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…
Add table
Reference in a new issue