Sunday, May 18, 2008

XMLRPC Cardgame Client

Before I can pick up Sylva again, I'm trying to get this client for my XMLRPC Cardgame Server done.

The idea behind it is that it is a Cairo surface that, when something changes on the table, an svg string is changed to change the display of the window. For example, a card gets added to the table, so an svg representation of the card is added to the main svg, then the cairo surface is refreshed, showing the card on the table. The only problem with this, is that it has no inherent ability to detect if a particular element of the surface is clicked, as it's just one big image. However, I plan on adding bounding boxes and such as detected from the svg's canvas size. This should work, even with the rescaling feature I have set up now.

However, before I add the click detection to the svg elements, I'd like to replace that menubar at the top of the window with a right-click pie menu. I'm going to be using Don Hopkins' piemenu.py module he wrote for the OLPC Sugar project, since it's the only real pygtk implementation of piemenus available. For now, it's just a matter of adding it...Oh wait, there it goes. Okay, then now it's just a matter of making it do the right things when clicked, and then hiding that menu bar, and then showing it if the user hits "alt".

Once that's done, next thing up is working on the gui. Specifically getting card info from the server, and showing that data in a meaningful manner.

No comments: