Re: Help! Drawing in Wingz/Hyperscript in a dialog box
Posted in 1994
Topics: Cloud, Docker & Containers
In addition to Paul's suggestion (deleted because our news server wont let me send more than a line of included text), you need to realize that the draw commands dont follow the same pattern as the rest of HyperScript. In the draw commands you set brushes and other attributes and then create the object. So to draw your arrowed line you'd do: FILL FG BLUE() FILL BG RED() FILL PATTERN 4 DRAW ARROWHEAD (10,10)(20,20) Notice how the formatting commands appear first, then you draw the image. The arrowhead is not an object and cannot be referenced after it's drawn. btw, I dont have Wingz books around anymore but I assume that DRAW ARROWHEAD exists there too. You might try putting these commands inside a function which is called in the ON REPAINT event. I think it will work but havent tried it. For example: ADD CUSTOM BUTTON AT (x,y)+(w,h) SCRIPT "ON REPAINT CALL MyScript:DrawSubmarine() END REPAINT" Have fun, jvr