when I make this new color TitleGreen = Color.new(21,165,69,50)
And then do screen:fillRect(0,0,177,272,TitleGreen)
The underlying image wich I blitted earlier to screen is not visible, while the alpha value is 50. How come? transparancy blitting is available in 0.15, isn't it?
Transparancy not working?
Moderators: Shine, Insert_witty_name
-
- Posts: 123
- Joined: Mon Oct 03, 2005 4:25 am
- Location: Netherlands
Transparancy not working?
Behold! The Underminer got hold of a PSP
-
- Posts: 123
- Joined: Mon Oct 03, 2005 4:25 am
- Location: Netherlands
-
- Posts: 4
- Joined: Wed Sep 27, 2006 11:41 am
Hmmm, works for me. If you use this code to fade in and out, it will fade in and out by using transparency and Im on 0.16 (I think).
The code I posted is unaltered and is made by Soulkiller BTW. I tested it in some altered form but it works.
The code I posted is unaltered and is made by Soulkiller BTW. I tested it in some altered form but it works.
Code: Select all
credits = Image.load("backgrounds/credits.png")
fader = Image.createEmpty(480,272)
alphaValue = 255
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
while true do
screen:clear()
screen:blit(0,0,credits)
screen:blit(0,0,fader)
if alphaValue > 0 then
alphaValue = alphaValue - 5
else
break
end
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
screen.waitVblankStart()
screen.flip()
end
screen.waitVblankStart(300) -- pause so it dosn't fade in and then imdeiatly fade out
while true do
screen:clear()
screen:blit(0,0,credits)
screen:blit(0,0,fader)
if alphaValue < 255 then
alphaValue = alphaValue + 5
else
break
end
faderColor = Color.new(0,0,0,alphaValue)
fader:clear(faderColor)
screen.waitVblankStart()
screen.flip()
end
Its exactly what Im saying, PNG files are quite usefull to display transparancy. Full but not partial. Douchebag.SnowyDisposition wrote:So you're telling me if I go into Photoshop and create a half-transparent green screen 480x272 and blit it to Lua Player with transparency on, it'll work?
I find this highly unlikely.
-
- Posts: 123
- Joined: Mon Oct 03, 2005 4:25 am
- Location: Netherlands