Advertisement
Christophe3D

Tao3D: on_click with draw_selection

Dec 3rd, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. color "red"
  2. rectangle -200, 0, 200, 100
  3.  
  4. rectangle_hue -> 0
  5.  
  6. active_widget
  7.     color_hsv 20 * rectangle_hue, 1, 1
  8.     rectangle 200, 0, 200, 100
  9.     on_click
  10.         rectangle_hue := rectangle_hue + 20
  11.         refresh 0
  12.  
  13. draw_selection X, Y, W, H ->
  14.     locally
  15.         color "black", 0.3
  16.         circle X + W/2, Y, 20
  17.         circle X - W/2, Y, 20
  18.         text_box X, Y, W/2, H/2,
  19.             align_center
  20.             vertical_align_center
  21.             text "Hue=" & rectangle_hue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement