changed while to loop in example .mers files

This commit is contained in:
mark 2023-05-09 22:18:39 +02:00
parent a7bb3e67fa
commit 924715cce1
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ second_button = column.gui_add(Button: "This is a second button.")
text_state = -2 text_state = -2
second_text = column.gui_add(Text: "press the button above to remove this text!") second_text = column.gui_add(Text: "press the button above to remove this text!")
while { loop {
for event gui_updates() { for event gui_updates() {
switch! event { switch! event {
ButtonPressed([int ...]) { ButtonPressed([int ...]) {

View File

@ -165,7 +165,7 @@ thread(() {
queue_list_inner.gui_remove() queue_list_inner.gui_remove()
}) })
while { loop {
for event gui_updates() { for event gui_updates() {
switch! event { switch! event {
ButtonPressed([int ...]) { ButtonPressed([int ...]) {

View File

@ -23,7 +23,7 @@ calculator = (max int) {
slow_calculation_thread = calculator.thread(if fake_delay 10 else 20000000) slow_calculation_thread = calculator.thread(if fake_delay 10 else 20000000)
// every second, print the progress. once it reaches 100%, stop // every second, print the progress. once it reaches 100%, stop
while { loop {
sleep(1) sleep(1)
println("{0}%".format(progress.to_string())) println("{0}%".format(progress.to_string()))
progress.eq(100) // break from the loop progress.eq(100) // break from the loop