DooMAGE Posted December 6, 2016 Share Posted December 6, 2016 Hello friends, I have a crosshair script that works well, I just followed the example in the FPSPlayer.lua function Script:Start() self.crosshairImg = Texture:Load("Materials/HUD/dot_1.tex") end function Script:PostRender(context) if self.crosshairImg then local crossHairX = math.floor((context:GetWidth() - self.crosshairImg:GetWidth()))/2 local crossHairY = math.floor((context:GetHeight() - self.crosshairImg:GetHeight()))/2 context:SetBlendMode(Blend.Alpha) context:DrawImage(self.crosshairImg, crossHairX, crossHairY) end end But when I try to fade in/out a text on another script with: context:SetColor(0,0,0,Math:Lerp(0, 1, self.alpha/self.fadeTime)) The texture in the crosshair gets the same color of my text and also fades What I'm doing wrong? Quote My Leadwerks games! https://ragingmages.itch.io/ Link to comment Share on other sites More sharing options...
Josh Posted December 6, 2016 Share Posted December 6, 2016 Call this after the draw call in the other script: context:SetColor(1,1,1,1) 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
DooMAGE Posted December 6, 2016 Author Share Posted December 6, 2016 This fixed, thanks Quote My Leadwerks games! https://ragingmages.itch.io/ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.