Herobot Posted October 4, 2017 Share Posted October 4, 2017 I'm using the improved DrawText to show dialogue onscreen with wordwrap, but the text disappears when I interact with the buttons on the GUI menu. Simply mousing over a button makes the text disappear, and it stays gone until I click on an open section of the screen. function Script:PostRender(context) context:DrawText(self.text, 10, 10, 300, 100, Text.WordWrap) end Using the regular DrawText command doesnt cause the text to vanish, but it doesnt have automatic wordwrap. Is there something I can change to keep the wordwrapped text from disappearing? Quote Link to comment Share on other sites More sharing options...
Josh Posted October 4, 2017 Share Posted October 4, 2017 5 hours ago, Herobot said: I'm using the improved DrawText to show dialogue onscreen with wordwrap, but the text disappears when I interact with the buttons on the GUI menu. Simply mousing over a button makes the text disappear, and it stays gone until I click on an open section of the screen. function Script:PostRender(context) context:DrawText(self.text, 10, 10, 300, 100, Text.WordWrap) end Using the regular DrawText command doesnt cause the text to vanish, but it doesnt have automatic wordwrap. Is there something I can change to keep the wordwrapped text from disappearing? I cannot tell what you are doing without a working example. 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...
Herobot Posted October 4, 2017 Author Share Posted October 4, 2017 2 hours ago, Josh said: I cannot tell what you are doing without a working example. Made an example, open a blank project and attach this code to a pivot in an empty map. function Script:PostRender(context) context:SetColor(1,1,1) context:SetBlendMode(Blend.Alpha) context:DrawText("This text starts invisible. Press escape and left click anywhere except a menu button to show it.", 10, 10, 300, 100, Text.WordWrap) --mousing over a menu button causes the above text to disappear again. context:SetColor(1,0,1) context:DrawText("Normal DrawText, always visible.", 10,150) context:SetBlendMode(Blend.Solid) end Quote Link to comment Share on other sites More sharing options...
Josh Posted October 4, 2017 Share Posted October 4, 2017 Okay, I have not tried the GUI text drawing features outside of a GUI widget so I do not know if that will work. It was really just added for the GUI. 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...
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.