• OnKeyCodeType
    3 replies, posted
Hey, as some of you may know - im new to Gmod lua... anyhow - as a 3rd script (Made admin commands and a mini hud before :D) i tried to edit an old chat someone created, and everything worked fine until i added the following code: aChat.Entry.OnKeyCodeTyped = function(self, Key) if Key == KEY_UP or Key == KEY_DOWN then --Code n' stuff in original script :3 end end After I added that i could no longer select the entry box... any ideas?
Not sure what you mean by select, but your overwritting the function of OnKeyCodeTyped so the old code will no longer execute.
I mean when i click it theres no "|" flashing in it, and i cant add text to it... So to fix that i need to add else aChat.Entry:SetText(aChat.Entry.Text(? or :GetText()?)..Key)
From your OP you said once you overwrote that function you could no longer get the focus of the text entry. So look at the OnKeyCodeEntry function and see what it is doing to gain the focus of text entry. I can't really help you based on the information you've given. It probably just needs to have the focus set to it or something of that sort.
Sorry, you need to Log In to post a reply to this thread.