Button rendering

Started by Eric, Sun 11/03/2012 04:14:18

Previous topic - Next topic

Eric

EDIT: Nevermind. Once I figured out that it was an alpha channel issue, I was able to turn up several forum topics about it, most helpful being
this one
, I guess, which I think says this won't work?

Back to the ol' drawin' board!

***



Above is a combination of two screenshots from the same compile of a game. The same sprites are being called in each shot. On the left, the sprites are applied to buttons. On the right, to objects in a room (in this case, a sample title screen). Is there a reason why the quality differs so wildly between the two? Is there anyway to make these sprites look better as buttons?

Below is a sample of the sprite. Probably not very visible, because it's white text on a png with an alpha channel, but I thought I'd share in case the answer somehow lay there.


Khris

1. Make sure the game's color depth is 32bit.
1a. Re-import any sprites with alpha-channel. (transparency: leave as-is)
2. Set the GUI background color to 0.
3. Assign a 32bit-alpha channeled image as GUI background.

Here's a screenshot of my test game with the image assigned to the background and button:


(Don't ask ;D)

Eric

Hmm...strange. I've got all of those settings, and mine still ditch the alpha channel. I've read somewhere that the problem may be where buttons completely overlap the GUI, which mine do. I'm really using the alpha'd sprites for two reasons: I'm putting them against a background that has both a gradient and a non-uniform texture (I didn't want to go through the hassle [read: was too lazy] of making sure they were all lined up pixel perfect), and because I'd planned to use the buttons in different places (title screen and pause game GUIs).

Now I've changed the design for the latter GUI, and am only using each set of sprites in one place, so it's no longer an issue. But it would probably still be useful to figure out where I went wrong.

SMF spam blocked by CleanTalk