|
Post by vovchik on Jul 16, 2012 18:41:21 GMT 1
Dear all, I have made use of some of our recent advances in HUG enhancement to produce this little game. It is useful as a demo for several reasons: 1. It shows how you can use alexfish's roll-your-own technique for new widgets. 2. It shows how to use inline strings to display images (no loading from external files). 3. It shows how to give your application a unique and self-contained icon. Apart from that, the logic programming for this particular version is pretty unusual. I don't actually move any widgets but only HIDE or SHOW, depending on the circumstance. The game is actually fun and it is possible to win! Have fun. With kind regards, vovchik PS. The code and a 32-bit executable (UPX'd) are in the archive in the next post. Attachments:
|
|
|
Post by vovchik on Jul 16, 2012 18:43:58 GMT 1
Dear all, This is the archive with the source and executable (note, there are no external graphics files)!. With kind regards, vovchik Attachments:
|
|
|
Post by Pjot on Jul 17, 2012 13:09:39 GMT 1
Well done vovchik!
For my Linux Mint 64bit I had to change the following to get it working (line 33):
CONST rsvg$ = "librsvg-2.so.2"
Then all worked fine.
Thanks! Peter
|
|
|
Post by vovchik on Jul 17, 2012 14:10:03 GMT 1
Dear Peter, Thanks! I modded the source to reflect your lib name, since I also have it by that name, too. The source is attached. With kind regards, vovchik Attachments:
|
|
|
Post by vovchik on Jul 21, 2012 23:02:33 GMT 1
Dear all, Here is a slightly different version in terms of appearance. I have included more elaborate svgs, so the graphics might look better to some. With kind regards, vovchik Attachments:
|
|
|
Post by konaexpress on Jul 21, 2012 23:44:17 GMT 1
OOPS!
you said SVG, I promise nothing but do you want help? I am trying to get the hang of Inkscape so I will do my best if you want.
-John
|
|
|
Post by vovchik on Jul 22, 2012 13:36:17 GMT 1
Dear John,
Thanks for the offer. PegSolitaire may not need such elaborate graphics, but some of my upcoming stuff will. I tried to use an SVG with embedded pixmaps in another test version - and it works - but the program loads very slowly (a few seconds), because the EVENT_IMAGE routine creates 33 x 3 svg->pixbufs and the more complicated the svg, the longer it takes. I am now coming up with some new code that will only create 3 such pixbufs and reuse them. That should speed things up immensely, I hope. I'll let you know.
With kind regards, vovchik
|
|
|
Post by alexfish on Jul 22, 2012 17:16:08 GMT 1
Hi vovchik
have you look at my svg demo in the rad tool
there is a constant write back routine , in the editor ,
worth looking at
regards
alexfish
|
|
|
Post by vovchik on Jul 22, 2012 17:35:10 GMT 1
Dear Alexfish, Thanks. I will do that tomorrow, since I am getting on to a train in an hour, and the journey takes 18 hours:) If I survive it , I will be looking at your code this time tomorrow. With kind regards, vovchik
|
|