PDA

View Full Version : Disable/Hide the Iconbar



eibwen
2007-07-29, 06:31
I am trying to keep the normal background image and overlay another image on top of it with alpha so the background shows through a bit.

But so does the Iconbar.

Is there a way to temporary hide the Iconbar?


Here is the current code to set the background:


-- Draw Background
local bgImage = Framework:getBackground()
bgImage:blit(self.bg, 0, 0)

-- Draw half transparent layer
self.bg:filledRectangle(0, 0, screen_width, screen_height, self.bgcolor)


Is this the correct way to retrieve the background image?

rtitmuss
2007-07-30, 02:04
Normally you should not need to get the background image, that's always painted below the window and widgets.

At the moment you can't completely remove the icon bar, the icon bar is added to the background image when the image is loaded. This is a bad optimization, as it means you'll always see the icon bar. I need to fix this in the next week or two, so for now just image you can't see it :).

I was thinking the best way for the applet to specify that you don't want the icon bar would be by using the windows style parameter. The different styles would be:
'window' - window with title and icon bar
'titleWindow' - window with title and without icon bar
'fullWindow' - window without title and icon bar

Would this work for you?

Richard

eibwen
2007-07-30, 03:28
I had to do it like this because I didn't find a method to completely clear a Surface (in my case to full transparency).
At the moment I clear my background with a filledRectangle the background gets darker with every repaint



I was thinking the best way for the applet to specify that you don't want the icon bar would be by using the windows style parameter. The different styles would be:
'window' - window with title and icon bar
'titleWindow' - window with title and without icon bar
'fullWindow' - window without title and icon bar


Yes, I think this would work.

rtitmuss
2007-07-30, 05:45
I had to do it like this because I didn't find a method to completely clear a Surface (in my case to full transparency).

Do you have an RGB or RGBA surface? If it is an RGB surface then you need to fill using the color key value 0xFF00FF to clear the surface.

I should add a Surface:clear() method to make this easy.

eibwen
2007-07-31, 00:59
I am using a RGBA surface for the background.
A clear method would be very useful.