vendredi 30 novembre 2018

Multi-line Conditional Statements in Kivy

How do you do multi-line if statements in the kv file?

Button:
    on_press:
        if x == 1:
            do_something
            do_something_else
            do_another_thing

It would be a burden to write

if x == 1: do_something
if x == 1: do_something_else
if x == 1: do_another_thing

Aucun commentaire:

Enregistrer un commentaire