Results 1 to 3 of 3

Thread: Using gtk stock icons in a pygame application

  1. #1
    Join Date
    May 2008
    Location
    UK
    Beans
    1,450
    Distro
    Ubuntu 8.04 Hardy Heron

    Using gtk stock icons in a pygame application

    Rather than hard coding the path to the gtk stock icons in my pygame application - I would like to be able to use the GTK stock ids within my application.

    Is there anyway I can get gtk to give up the actual path of the stock icon image file at run time, so i can then load icons and blit them ?

    Or is there a simple way of getting a nice gtk wrap around my pygame code.
    Tony - Happy to try to help.
    Unless otherwise stated - all code posted by me is untested. Remember to Mark the Thread as Solved.
    Ubuntu user number # 24044 Projects : TimeWarp - on the fly Backups

  2. #2
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,292
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Using gtk stock icons in a pygame application

    I don't know about Pygame but if your application doesn't otherwise depend on PyGTK, introducing a dependency just for a bunch of icons seems not a good idea to me. You would probably be better off just copying the GTK icons and making them part of your application--that's what free licenses are for.
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    May 2008
    Location
    UK
    Beans
    1,450
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Using gtk stock icons in a pygame application

    It turned out to be easier doing it the other way round - and then i realised i did not need pygame at all (I wasn't doing any complicated sprite stuff or collisions, so i just built a GTK interface in glade, with a drawing area - and drew into the drawing area (well into a pixmap, which then gets drawn).
    Tony - Happy to try to help.
    Unless otherwise stated - all code posted by me is untested. Remember to Mark the Thread as Solved.
    Ubuntu user number # 24044 Projects : TimeWarp - on the fly Backups

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •