Help! Drawing in Wingz/Hyperscript in a dialog box
Posted in 1994
Topics: General Discussion
I need help with Wingz 1.1, specifically writing something in Hyperscript. I have a dialog box with several buttons in it. Now I need to add an new customized button what looks like a submarine. Nothing fancy, basically a simple circle, with a small rectangle on the top and two little triangles coming off the rectangle to the sides . . . I've been programming in Hyperscript now for two years, but I have never had to do drawing in a dialog box, and I need help. Before trying to draw a submarine, I had tried adding arrow heads to some lines in a dialog box. I created a button, got rid of its border and fill, and attached the following script to it: script "on repaint square window (1, 1) (10, 10) line width 50 fill bg Black() fill fg Black() fill pattern 19 move ( 1, 10) draw (10, 5) draw ( 1, 1) draw ( 1, 10) move ( 3, 7) draw ( 6, 5) draw ( 3, 3) end repaint" Not pretty, but it made a simple filled arrow head for me. I had thought there was a way to tell Hyperscript to add the arrow head automatically, but I couldn't figure it out. I realize there are some things that work in a sheet but not in a dialog box. Figured this was one of them . . . So anyways, am I doing this right? Do I have to fit ALL of the commands to draw in the thing in a single 255 character script attached to the button!?!?!? Or is there an easier way?!?!?! Help! Please! The commands provided to draw stuff in a dialog box are not fun! If anyone knows just what I need to do to make the circle, I will take it from there! This 255 character limit may cause problems. If all else fails, I could just make the sub out of several small graphics and put an invisiable button over the whole thing when I am done. I don't really care how kludgy the whole thing is, looks are more important at this point - my sanity as well as the code's readability and elegance are not a priority. Thanks! raymond.bowers@wdn.com