gpx, gpy and gpk

Pixilang programming language
Post Reply
pasbel
Posts: 18
Joined: Mon Jul 02, 2012 2:19 pm

gpx, gpy and gpk

Post by pasbel »

Hi !
I'm a new french user of pixilang.

I don't understand how to use gpx, gpy and gpk, I'm trying a lot of things but... :sorry:

For example, I want to know when the mouse key is pressed (and later, mouse coordinates), but it doesn't work :

Code: Select all

loop_main = 0
while( loop_main == 0 )
{
	mouse_k = gpk
	if mouse_k != 0 { fputs ( "click\n" ) }      // print click in console if pressed
//	if mouse_k == 0 { fputs ( "off\n" ) }
}
User avatar
NightRadio
Site Admin
Posts: 3944
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: gpx, gpy and gpk

Post by NightRadio »

Hello!
What version of Pixilang do you use?
These functions (gpx, gpy, gpk) are only available in old versions 1.x and 2.x
pasbel
Posts: 18
Joined: Mon Jul 02, 2012 2:19 pm

Re: gpx, gpy and gpk

Post by pasbel »

8) I use Pixilang 3.3...

How can I do that with last version 3, I don't see nothing for that in manual ?
User avatar
NightRadio
Site Admin
Posts: 3944
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: gpx, gpy and gpk

Post by NightRadio »

Please check this example - examples/graphics/paint.pixi (in the archive with Pixilang)
It is what you need :) The base of this example - get_event() function.

And here is the manual chapters about this function:
http://code.google.com/p/pixilang/wiki/ ... #get_event
http://code.google.com/p/pixilang/wiki/ ... ual#Events
pasbel
Posts: 18
Joined: Mon Jul 02, 2012 2:19 pm

Re: gpx, gpy and gpk

Post by pasbel »

Many thanks :good:
Post Reply