about summary refs log tree commit diff stats
path: root/console.mu
blob: 8f7ee83c307439017075e5ad17bc41ce6316d457 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# example program: reading events from keyboard or mouse
#
# Keeps printing 'a' until you press a key or click on the mouse.

def main [
  local-scope
  open-console
  {
    e:event, found?:boolean <- check-for-interaction
    break-if found?
    print-character-to-display 97, 7/white
    loop
  }
  close-console
  $print e, 10/newline
]
>
49
50


             

                       










                        




                        

                    
               








                         




            

                  


            
              
               

           
                   

                      
[colours]
bkgnd=default
titlebar=red
titlebar.text=yellow
titlebar.brackets=green
titlebar.unencrypted=red
titlebar.encrypted=green
titlebar.untrusted=red
titlebar.trusted=green
titlebar.online=green
titlebar.offline=red
titlebar.away=green
titlebar.chat=green
titlebar.dnd=red
titlebar.xa=green
statusbar=red
statusbar.text=yellow
statusbar.brackets=green
statusbar.active=white
statusbar.new=green
main.text=white
main.text.me=white
main.text.them=white
main.splash=red
main.time=red
input.text=green
subscribed=green
unsubscribed=red
otr.started.trusted=green
otr.started.untrusted=red
otr.ended=yellow
otr.trusted=green
otr.untrusted=red
online=green
away=yellow
chat=green
dnd=green
xa=yellow
offline=bold_black
incoming=yellow
typing=green
gone=red
error=red
roominfo=green
roommention=red
me=green
them=yellow
roster.header=white
occupants.header=white
receipt.sent=red