• Text Entry not displaying text in :Paint method
    2 replies, posted
Hello there, I have a problem when I'm drawing a DTextEntry. The text and the cursor don't appear, but when I refresh the Lua and re-open the menu everything works fine. Here's the code: frame.pop.te = frame.pop:Add("DTextEntry") frame.pop.te:MakePopup() frame.pop.te:SetPos(frame:LocalToScreen(frame.pop:GetPos())) frame.pop.te:SetSize(frame.pop:GetSize()) function frame.pop.te:Paint(w,h)     draw.RoundedBoxEx(4, 0, 0, w, h, color_white, true, false, true, false)     self:DrawTextEntryText(color_black, NUTCOL, color_black) end function frame.pop.te:OnEnter()     frame:SetKeyboardInputEnabled(false)     frame.pop.okay.DoClick(self.okay) end I've been trying to find a solution to this for a while, I've tried moving the self:DrawTextEntryText() to the :PaintOver() method, but no luck... Thanks for the support! Cheers
why are you calling MakePopup on the DTextEntry? what is NUTCOL ?
@Chewgum 1. I do that because I was actually trying to fix it. I was once able to fix the issue using :MakePopup() and setting the pos to a on screen position (as you can see in the :SetPos() method). But it didn't fix it in this case. 2. NUTCOL is just a simple color variable. I'm working in Nutscript and it's actually equal to nut.config.get("color") I actually changed the NUTCOL argument to a random color, rejoined and it worked on the first try :3 Sooo, that was simpler than I expected. Thanks @Chewgum
Sorry, you need to Log In to post a reply to this thread.