gpx, gpy and gpk

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

gpx, gpy and gpk

Postby pasbel » Mon Jul 02, 2012 2:29 pm

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: 2781
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: gpx, gpy and gpk

Postby NightRadio » Mon Jul 02, 2012 2:44 pm

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

Postby pasbel » Mon Jul 02, 2012 3:27 pm

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: 2781
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: gpx, gpy and gpk

Postby NightRadio » Mon Jul 02, 2012 3:39 pm

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

Postby pasbel » Mon Jul 02, 2012 4:46 pm

Many thanks :good:


Return to “Pixilang”

Who is online

Users browsing this forum: No registered users and 1 guest