##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: October 2016 # Modified: 2016-10-30/12:40-0400 ##+ # # WSection.icn, demonstrate 3D pick object ID during windowing event # link enqueue, evmux procedure main() window := open("WSection", "gl", "size=90,60") WAttrib(window, "pick=on") # mark a named 3D object write(image(WSection(window, "sphere"))) DrawSphere(window, 0.0, 0.19, -2.2, 0.3) Refresh(window) WSection(window) # insert an event into the queue, left press, 2ms interval, on sphere #Enqueue(window, &lpress, 45,20, "", 2) e := Event(window) write(image(e)) # a side effect of the Event function is keywords settings write("&x:", &x) write("&y:", &y) write("&row:", &row) write("&col:", &col) every write("&pick:", &pick) WriteImage(window, "../images/WSection.png") close(window) end