Computer Science Canada dragging words |
Author: | air_force91 [ Wed Jan 14, 2004 6:44 pm ] | ||
Post subject: | dragging words | ||
i have a code for dragging boxes on the screen but how can i drag words and place them on the correct place on the screen?
someone on this website posted this code...im refering to it for my project...ofcourse i can't copy it... |
Author: | CjGaughan [ Thu Jan 15, 2004 9:08 am ] |
Post subject: | |
how about putting the words on the boxes (or any graphic for that matter). Just use seperate pictures/graphics (make them in paint or anything), and move them around like you are doing the boxes. There is probably a way to make the word move (as it is actually a graphic, like the boxes are). Probably somewhere in the code has a flaw, and is only meant for a box? No time to look over your code in depth right now...maybe someone else can give a better solution? |
Author: | AsianSensation [ Thu Jan 15, 2004 7:24 pm ] |
Post subject: | |
easiest way is probably mathematics manipulation with Pic.Width and Pic.Height. save whatever you drew as a picture (not a physical file, just in the memory), and then use Pic.Height and Pic.Width to return to height and width of the picture. Since you already know the starting position of the picture (because you need it to draw it), then it's basicly moving a box with left bottom corner some coordinate, with width Pic.Width, and height Pic.Height of that picture. So you can then just drag that box. No need with whatdotcolor or any color checking stuff. |
Author: | DanShadow [ Thu Jan 15, 2004 10:13 pm ] | ||
Post subject: | |||
Hello again air_force91...I see your still finding use for my "box moving" code...well, im here to help again. It's actually extremely similar to the box moving code.
When you click around the text area, the text will follow your cursor while your button is down. (Man...for all the help I give in Turing, I should also be a Turing Mod. ) |
Author: | AsianSensation [ Thu Jan 15, 2004 10:26 pm ] |
Post subject: | |
getting a bit ambitious now aren't we? |
Author: | Homer_simpson [ Sat Jan 17, 2004 2:03 pm ] |
Post subject: | |
one thing u should do for better performance... setscreen outside the loop! |
Author: | the_short1 [ Tue Jan 20, 2004 8:30 pm ] |
Post subject: | |
if you have MS WORD... make some wordart and select it.. press copy... and paste it into a image program... that would work too... instead of complicated code... you could use box code... granted... need bbunch of pics with program.... i going to use that drag box code for my Text Twist game.... hopefullly to have a first internet Beta before end of Feb... |