Answer the question
In order to leave comments, you need to log in
1. How to flip text in kivy? 2.How to launch the widget when the button is clicked?
Hello. I recently started learning kivy. There are 2 questions.
1. How to display some text flipped 180 degrees on the screen
2. I want to create an application menu. When the button is clicked, another widget should be launched:
Code in Main.py
class Menu(Widget):
def start1(self):
return Digits()
def start2(self):
return Digits2()
class Digits(Widget):
#текст класса
class Digits2(Widget):
#текст класса
class MainApp(App):
def build(self):
return Menu()
MainApp().run()
<Menu>:
Button:
size: 100, 50
center_x: root.width / 2
top: (root.top / 2) + (root.top / 10)
text: '1 player'
on_press:
root.start1()
Button:
size: 100, 50
center_x: root.width / 2
top: (root.top / 2) - (root.top / 10)
text: '1 vs 1'
on_press:
root.start2()
<Digits>: ...
<Digits2>....
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question