<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
I've often seen mention of these incongruencies between pygame and
python-gtk.<br>
What are the most annoying issues? I know the two stacks are
completely different,<br>
so integration might be an issue, but other than that, are there
more serious issues?<br>
<br>
Regards,<br>
Sebastian<br>
<br>
<div class="moz-cite-prefix">El 19/02/14 16:13, Alan Jhonn Aguiar
Schwyn escribió:<br>
</div>
<blockquote cite="mid:BLU182-W466A2483C2E6B06E0B91EBB59B0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">James:
<div><br>
</div>
<div>I'm interesting in make that changes. I have a lot of
activities written in PyGame that could need</div>
<div>that improve. Generally, I only use mouse events and
arrows.</div>
<div>After, we can update the GIT sugargame with this changes.</div>
<div>I have a few commits to GTK-2 branch to send.</div>
<div><br>
</div>
<div>Regards!</div>
<div><br>
</div>
<div>Alan</div>
<div><br>
<div>
<hr id="stopSpelling">Date: Wed, 19 Feb 2014 10:19:55 -0600<br>
From: <a class="moz-txt-link-abbreviated" href="mailto:nicestep@gmail.com">nicestep@gmail.com</a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:manuq@laptop.org">manuq@laptop.org</a><br>
CC: <a class="moz-txt-link-abbreviated" href="mailto:alanjas@hotmail.com">alanjas@hotmail.com</a>; <a class="moz-txt-link-abbreviated" href="mailto:sugar-devel@lists.sugarlabs.org">sugar-devel@lists.sugarlabs.org</a><br>
Subject: Re: [Sugar-devel] PyGame/ Sugargame issues with GTK
3<br>
<br>
<div dir="ltr">Manuel,
<div><br>
</div>
<div>I am aware of the test Activity. I wrote this chapter
on using PyGame to develop Activities:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://en.flossmanuals.net/make-your-own-sugar-activities/making-activities-using-pygame/"
target="_blank">http://en.flossmanuals.net/make-your-own-sugar-activities/making-activities-using-pygame/</a><br>
</div>
<div><br>
</div>
<div>The code changes to sugargame to make it recognize
the plus and minus keys aren't hard to figure out, and I
could correct my personal copy of sugargame. I was a bit
surprised to find that while so much has changed in
Sugar since I wrote the book but sugargame still isn't
an official part of the Sugar API. It's been a couple of
years now.</div>
<div><br>
</div>
<div>James Simmons</div>
<div><br>
</div>
</div>
<div class="ecxgmail_extra"><br>
<br>
<div class="ecxgmail_quote">On Wed, Feb 19, 2014 at 5:56
AM, Manuel Quiñones <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:manuq@laptop.org" target="_blank">manuq@laptop.org</a>></span>
wrote:<br>
<blockquote class="ecxgmail_quote"
style="border-left:1px #ccc solid;padding-left:1ex;">2014-02-19
6:26 GMT-03:00 James Simmons <<a
moz-do-not-send="true"
href="mailto:nicestep@gmail.com">nicestep@gmail.com</a>>:<br>
<div>> It occurs to me to ask if sugargame is still
something you need to copy the<br>
> code into your activity to use or if it is part
of sugar proper. I'm still<br>
> taking the latest code and copying it in.<br>
<br>
</div>
Yes, you need to copy sugargame inside your activity.<br>
<br>
Inside sugargame repository there is a test Activity<br>
<a moz-do-not-send="true"
href="https://git.sugarlabs.org/sugargame/mainline/trees/master/test"
target="_blank">https://git.sugarlabs.org/sugargame/mainline/trees/master/test</a><br>
<br>
It displays a bouncing ball. You should be able to
change the ball<br>
direction with left and right arrows. Can you test
the activity?<br>
<br>
Note that you should use PyGame events, not GTK+. The
demo listens to<br>
pygame.KEYDOWN event in pygame.K_LEFT and
pygame.K_RIGHT.<br>
<div class="ecxHOEnZb">
<div class="h5"><br>
><br>
> James Simmons<br>
><br>
><br>
><br>
> On Wed, Feb 19, 2014 at 2:52 AM, James
Simmons <<a moz-do-not-send="true"
href="mailto:nicestep@gmail.com">nicestep@gmail.com</a>>
wrote:<br>
>><br>
>> Alan,<br>
>><br>
>> Grabbing focus definitely helped. I get
the arrow keys now. However, I<br>
>> also use the plus and minus keys and I
still don't get them. In the logs I<br>
>> see these messages:<br>
>><br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key Num_Lock unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key Scroll_Lock unrecognized<br>
>> Key Scroll_Lock unrecognized<br>
>> Key Scroll_Lock unrecognized<br>
>> Key Scroll_Lock unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_8 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_2 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_4 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_6 unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Subtract unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>> Key KP_Add unrecognized<br>
>><br>
>> This is not coming from my code. I see a
Translator class in<br>
>> sugargame/events.py that may be the
culprit.<br>
>><br>
>> James Simmons<br>
>><br>
>><br>
>><br>
>> On Tue, Feb 18, 2014 at 6:37 PM, Alan
Jhonn Aguiar Schwyn<br>
>> <<a moz-do-not-send="true"
href="mailto:alanjas@hotmail.com">alanjas@hotmail.com</a>>
wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> The problem of no keyboards events
appears in GTK-2 too.<br>
>>> Maybe you need "grab_focus" to get
them. See the function:<br>
>>><br>
>>> _pygamecanvas.grab_focus()<br>
>>><br>
>>> This is my code for Conozco America
activity:<br>
>>><br>
>>> self.actividad =
conozco.Conozco(self)<br>
>>> self._pygamecanvas =
sugargame.canvas.PygameCanvas(self)<br>
>>> self.set_canvas(self._pygamecanvas)<br>
>>> self._pygamecanvas.grab_focus()<br>
>>>
self._pygamecanvas.run_pygame(self.actividad.principal)<br>
>>><br>
>>><br>
>>> > Date: Wed, 19 Feb 2014 09:03:58
+1100<br>
>>> > From: <a moz-do-not-send="true"
href="mailto:quozl@laptop.org">quozl@laptop.org</a><br>
>>> > To: <a moz-do-not-send="true"
href="mailto:sugar-devel@lists.sugarlabs.org">sugar-devel@lists.sugarlabs.org</a><br>
>>> > Subject: Re: [Sugar-devel]
PyGame/ Sugargame issues with GTK 3<br>
>>><br>
>>> ><br>
>>> > G'day James,<br>
>>> ><br>
>>> > I've not seen this problem
myself, nor have I tried, but I shall<br>
>>> > speculate:<br>
>>> ><br>
>>> > - make sure the window has
focus; without focus the events may not be<br>
>>> > delivered, and I have a vague
memory of focus manipulation in one of<br>
>>> > the pygame/gtk toolkits,<br>
>>> ><br>
>>> > - add code to sugargame
temporarily to print received events, in an<br>
>>> > attempt to diagnose which half
of the stack is misbehaving.<br>
>>> ><br>
>>> > --<br>
>>> > James Cameron<br>
>>> > <a moz-do-not-send="true"
href="http://quozl.linux.org.au/"
target="_blank">http://quozl.linux.org.au/</a><br>
>>> >
_______________________________________________<br>
>>> > Sugar-devel mailing list<br>
>>> > <a moz-do-not-send="true"
href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>>> > <a moz-do-not-send="true"
href="http://lists.sugarlabs.org/listinfo/sugar-devel"
target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
>>><br>
>>>
_______________________________________________<br>
>>> Sugar-devel mailing list<br>
>>> <a moz-do-not-send="true"
href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
>>> <a moz-do-not-send="true"
href="http://lists.sugarlabs.org/listinfo/sugar-devel"
target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
>>><br>
>><br>
><br>
><br>
>
_______________________________________________<br>
> Sugar-devel mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.sugarlabs.org/listinfo/sugar-devel"
target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
<br>
<br>
<br>
</div>
</div>
<span class="ecxHOEnZb"><font color="#888888">--<br>
.. manuq ..<br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
_______________________________________________
Sugar-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Sugar-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sugarlabs.org/listinfo/sugar-devel">http://lists.sugarlabs.org/listinfo/sugar-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>