Max_M Posted June 20, 2016 Share Posted June 20, 2016 Whenever I try to display text on the screen, it shows black boxes instead of text. For example, when you win, this code executes: local font = Font:Load("Fonts/arial.ttf", 48) context:SetFont(font) context:DrawText("YOU WIN!", context:GetWidth()/2, context:GetHeight()/2) But the text "YOU WIN!" shows up black boxes on the screen instead of letters. Quote Link to comment Share on other sites More sharing options...
Jazz Posted June 20, 2016 Share Posted June 20, 2016 Set it to alpha first then back to solid after: context:SetBlendMode(Blend.Alpha) local font = Font:Load("Fonts/arial.ttf", 48) context:SetFont(font) context:DrawText("YOU WIN!", context:GetWidth()/2, context:GetHeight()/2) context:SetBlendMode(Blend.Solid) Quote --- Scott Using Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Nvidia GTX 1060 Link to comment Share on other sites More sharing options...
Max_M Posted June 20, 2016 Author Share Posted June 20, 2016 Set it to alpha first then back to solid after: context:SetBlendMode(Blend.Alpha) local font = Font:Load("Fonts/arial.ttf", 48) context:SetFont(font) context:DrawText("YOU WIN!", context:GetWidth()/2, context:GetHeight()/2) context:SetBlendMode(Blend.Solid) When I try that, the text doesn't show up at all. Quote Link to comment Share on other sites More sharing options...
Jazz Posted June 20, 2016 Share Posted June 20, 2016 When I try that, the text doesn't show up at all. Shows fine for me in white text. Maybe you need to set the color first. context:SetColor(1,0,0,1) Quote --- Scott Using Windows 7 Ultimate 64 bit/Core I7-2700K @ 4312mhz/24G RAM/Nvidia GTX 1060 Link to comment Share on other sites More sharing options...
Max_M Posted June 20, 2016 Author Share Posted June 20, 2016 Shows fine for me in white text. Maybe you need to set the color first. context:SetColor(1,0,0,1) That worked. Thank you very much! 1 Quote 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.