frygui

BlitzMax Forums/BlitzMax Programming/frygui

Czar Flavius(Posted 2011) [#1]
Is the frygui guy still around? I have a few questions for him about his module.


Fry Crayola(Posted 2011) [#2]
I am indeed still around, so ask away!


Czar Flavius(Posted 2011) [#3]
Hi :)

Could you explain how Skins work or link me to a tutorial explaining them?

Is it possible to create an image button or other image from a TImage that has already been loaded? The functions accept only strings. I've modified them to accept an Object, and then determine whether it is a String or TImage and use accordingly (I can show you my modifications if you like), but was wondering if there is another way to do it?

Also, your positioning code can become confused if auto midhandle image is on or off (I can't remember which)


Fry Crayola(Posted 2011) [#4]
Skins in FryGUI are admittedly pretty basic. Each of the gadgets that has a skin (buttons, panels, scroll bars, sliders, progress bars, check boxes, combo boxes, date panels and text fields, I believe) has their own individual look that must be loaded before use, and is used for every single instance of each of those gadgets.

Those images used are generally 15x15, and are broken up by the RefreshSkin() function when loaded into 9 component images (four corners, four sides, and the middle, all 5x5) so the gadget can be rendered at any size. Some are more fixed - scrollbars are fixed width, and a checkbox will always be the same size.

If you require a different look, you can create new images and set them, but you're very much limited by the 15x15 size. In truth, they just do the job rather than provide any real skinning functionality.


Image buttons, as you've noticed, only accept strings when created. Your modification is exactly the way I would do them if I was doing them now. The alternative is to pass a blank url and then use the SetImage() method. Images are the same.


And finally, you're right - the images expect handles to be at 0,0. That's an oversight on my part, so AutoMidHandles would definitely be a problem. You could either take into account the handles in the Render() method of the image button or image, or you could have them set the image handle when the gadget is created.