Re: Scrabble GUI



Meghal Harish Varia wrote:
> 
> Hello,
> 
> I am fairly new to GTK.  I was wondering whether there were any resources
> out there (on the net) that provided good, comprehensive, tutorials on GTK
> (besides the ones that are listed on gtk.org).
> 
> I am trying to program a SCRABBLE game.  Therefore, I need to find out
> 1) How I can display the board within a window (ie: what graphics formats
> are supported by GTK - can I display a JPG, or BMP of a scrabble board
> using GTK)
> 2) How can I drag and drop Scrabble Tiles onto this board
> 
> If you know any references that can help me with these two problems, it
> would be greatly appreciated.

This doesn't really answer your question about tutorials but ...

You might want to look at Gnome's GnomeCanvas widget for the board and
counters etc. It should do everything you want including helping with
the drag and drop. Each item displayed on a GnomeCanvas is an object
which makes it very easier to catch mouse clicks etc.

For loading graphics files there are really two options: imlib or
gdk-pixbuf. Both libraries can load all the file formats you mentioned
and are fairly easy to use with gtk et al.

Personally, I prefer gdk-pixbuf BUT I don't think it can be used with
the GnomeCanvas at the moment.

Have you had a look at http://developer.gnome.org yet? There's a fair
amount of documentation there (not just about Gnome). A reasonable guide
to using the GnomeCanvas can be found at
http://developer.gnome.org/doc/GGAD.

Hope this helps.

/Matt

-- 
Matt Goodall, Software Engineer  |  Isotek Electronics Ltd
mailto:mgg isotek co uk          |  Claro House, Servia Road
http://www.isotek.co.uk          |  Leeds, LS7 1NL
Tel: +44 113 234320              |  England




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]