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.

Dark GDK / Print Mouse coordinates on screen.

Author
Message
TeNgu
16
Years of Service
User Offline
Joined: 4th Jul 2008
Location:
Posted: 22nd Jul 2008 15:19
I am trying to print the mouses coordinates on the gamescreen with the help of dbMouseX(), dbMouseY() and dbText(x,y,char*).

This sounds like it should be a simple task, but as I have been away from C++ for quite some time messing about with VB instead and now thanks to Dark GDK found a reason to go back to C++. In short, I am a bit confused.

As you already have figured out the problem is that I want to print an integer where a char* is required (I want to print x and y on seperate lines).

This is what I have done so far:


And hey! Stop laughing, :p I know this is a rookie thing but some ppl actually need to ride a bike again sometimes.

Any tips on how to make this happen is highly appreciated.

Thanks
-Patrik
TeNgu
16
Years of Service
User Offline
Joined: 4th Jul 2008
Location:
Posted: 22nd Jul 2008 15:34
Solved:



Seems like the manual isn't updated properly, there is no command like dbStr$. Instead it should be as in the code above.


Thanks anyway and hope this helps someone else in my position. =)



-Patrik
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 22nd Jul 2008 17:09
The $ is a left over from the Dark Basic documentation.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-11-20 17:36:15
Your offset time is: 2024-11-20 17:36:15