1 type Button @mut = 2 inherit Wrapper 3 4 var obs text = "" 5 var obs foreground = Vector3.color "333333" 6 var obs background = Vector3.color "AAAAAA" 7 8 let rectangle = Rectangle 9 color@obs = background@obs 10 TextBlock 11 text@obs = text@obs 12 color@obs = foreground@obs 13 align_h = AlignH/Center 14 15 content = rectangle 16 is_clickable = true 17 18 val on_press = Stream<()>.new 19 20 subscribe { _, event -> if event.is_mouse_press then 21 on_press.push () } 22