Button from Image
BlitzMax Forums/MaxGUI Module/Button from Image
| ||
Hi, does MaxGUI allow images to be used for buttons. I tried the below code and can't get it to work. |
| ||
It works for me if I import maxgui.xpmanifest. |
| ||
Really? Hmmm. I had no idea you could do "Import maxgui.xpmanifest". Doing that does work. :) Thanks. I may just use panels (as buttons) instead of buttons, as I will be porting my project to Linux and Mac and I am thinking it may be less of a problem using panels (as buttons) instead of buttons. - Rich - Last edited 2012 |
| ||
I had no idea you could do "Import maxgui.xpmanifest". Or you could import your own manifest to define application icon and meta data. At least that was the reason the default manifest was taken out. Using panels is probably a good idea, buttons with images are limited and not really cross platform. Unfortunately there is a bug on Mac (memory leak) when setting continuously a new image but that should be no problem for static picture, otherwise use a canvas. |
| ||
Unfortunately there is a bug on Mac (memory leak) when setting continuously a new image but that should be no problem for static picture, otherwise use a canvas. I had planed to update the panel with up/down images. On Mac this would be a fail? Perhaps freeing the panel gadget and recreating it would be a fix as I'm not sure canvas will let me display a button image the same as a panel would. |
| ||
I wouldn't bother if you change the image only sometimes. The image is probably quite small so only a few bytes lost... I compiled Grisu's Pocket Radio Player and he used a panel as equalizer, so images changed fast and the memory went up as hell. Using a canvas for the same thing was no problem and it can look the same, but a panel is easier to handle. |
| ||
Right on. BTW, nice GUI. Based on MaxGUI? |
| ||
Yes, Grisu used only MaxGui to be cross platform (and some canvasses for special stuff). |