On GUIs with no background color, buttons won't display

Started by Dave Gilbert, Thu 08/12/2011 17:06:40

Previous topic - Next topic

Dave Gilbert

Pretty much what the subject says.  I have a GUI with no background color.  All the custom buttons I place in the GUI are completely invisible, although you can click on them just fine.  All other GUI items like text labels, boxes, etc, are displayed just fine.  The only way to get the buttons to appear is to add a background color to the GUI, which is not something I want to do.

The only exception is the default AGS button that is created when you generate a button.  That displays perfectly.  But as soon as I replace it with a custom image, it turns invisible again.  

This is an issue that seems to have magically appeared, and I'm not sure what is causing it.  Any help is appreciated!

-Dave

edit: Dunno if this helps narrow it down, but this issue is happening with games that I have upgraded from previous versions of AGS.

monkey0506

Definitely can't replicate this. Some thoughts:

- Check ALL the button properties (Width, Height, ClipImage, Visible, X, Y, etc.)
- Make sure nothing is changing any of these properties in the script.
- Double check to make sure that you're assigning NormalGraphic, MouseOverGraphic, and PushedGraphic appropriately.
- Does the sprite in question have an alpha channel?

Beyond that...well, there's always the chance that you've just gone insane. :=

I can take a look if none of that helps.


Dave Gilbert

Yeah, I checked all of that.  I even created a brand new gui and tried implementing that one, only to encounter the same problem.  It only seems to happen with games that I've upgraded from previous versions of AGS, so it must have something to do with that.  Time is definitely of the essence (long story) so I did a cludgey workaround by importing a background image that matches what is on the screen.  That makes the buttons display properly, even though I don't know why! :)

Shane 'ProgZmax' Stevens

I remember having a similar problem with guis from an updated game being created with null properties.  Have you tried loading in a background image, verifying it works, then REMOVING the image from that same gui, recompiling, and seeing if it works?  You might even try loading in a blank transparent gif into a sprite slot and using that for the background image.

cat

I once had alpha-channel related GUI problems and they were indeed solved by setting a completely transparent sprite as GUI background instead of omitting it.

SMF spam blocked by CleanTalk