Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Pinpointing exact location

Author
Message
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 5th May 2003 02:55
How do you go about pinpointing the exact location of X, Y without using trial and improvement, for example say I want text positioning exactly


HERE

how would I find the co-ords of X, Y?
I hear and I forget. I see and I remember. I do and I understand.
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 5th May 2003 11:12
you could use the cli i suppose just keep setting the cursor then printing some text

ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL mynameisnoneofyourbuisness@hotmail.com to work on the new Star Strike project!!!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 5th May 2003 13:21
do you mean something like this?




Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 5th May 2003 14:18
I want it to just be a black screen, you move the mouse around and the X, Y values change, for example

I move the mouse from HERE (e.g. it is 111,210)



to HERE (for example is 90,170)

so then in my program if I wanted text to be on the second here I could do
center text 90,170, string$ `or whatever it is, without having to guess the co-ords of the second HERE

I hear and I forget. I see and I remember. I do and I understand.
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 5th May 2003 15:38
Sounds like you just answered your own question, print the mouse coords to screen and write 'em down or save them to a file on a keypress then hardcode that

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 5th May 2003 15:53
Hehe, yeah you're right, I'm an idiot, I think of the problem, and practically solve it but don't put it into practise.

x-d

I hear and I forget. I see and I remember. I do and I understand.
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 5th May 2003 15:58 Edited at: 5th May 2003 16:01
take alook at this and see what you think

it lets you click where you want text to be placed and lets you input a string at the coords it also allows you to save this info in an array which can then be used with code like this

this will allow you to extract the data from the array and put it onto the screen.
hope it helps
*edit sorry didn't refresh my browser before posting you can try it anyway?

ARE YOU A 3D MODELER??? IF SO WE NEED YOU!!!
EMAIL mynameisnoneofyourbuisness@hotmail.com to work on the new Star Strike project!!!

Login to post a reply

Server time is: 2024-09-20 07:29:31
Your offset time is: 2024-09-20 07:29:31