Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

DTextEntry doesnt accept input #17

Open
tartunian opened this issue Jan 24, 2017 · 3 comments
Open

DTextEntry doesnt accept input #17

tartunian opened this issue Jan 24, 2017 · 3 comments

Comments

@tartunian
Copy link

When I click on a DTextEntry it posts the OnMousePressed event via
pnl[event](pnl, ...)
in
local function postPanelEvent(pnl, event, ...)
but I can't verify if the text box is actually getting focused or not.

I spent a couple hours on this. Just wondering if you have any ideas/plans for this functionality.

Great job otherwise!

@handsomematt
Copy link
Owner

This sample https://github.com/HandsomeMatt/3d2d-vgui/blob/master/samples/text_input.lua shows how to accept text input. Can you verify that works or that the way you're trying to do it is similar?

@tartunian
Copy link
Author

It works except keybinds still get called when typing. For instance if I type the letter 'y' my chat menu opens.

@tartunian
Copy link
Author

Update: Even thought clicking the text entry should already do it, manually callingSetKeyboardInputEnabled(true) prevents keyboard input from being directed anywhere else but the text box.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants