Jump to content

[help] Edit


RenanPG

Recommended Posts

hi everybody, i am creating a login using dx functions, but i have no idea how to make an EditBox in dx. I know need a table to store the keys pressed using this event:

addEventHandler("onClientCharacter", getRootElement(), getCharacter) 

Link to comment

You could use something like this:

local str = "" 
addEventHandler ( "onClientKey", root, function ( b, s ) 
    if s then 
        if ( b == 'backspace' ) then 
            str = str:sub ( 0, str:len() - 1 ) 
        else 
            str = str .. b 
        end 
    end 
end ) 

Link to comment
You could use something like this:
local str = "" 
addEventHandler ( "onClientKey", root, function ( b, s ) 
    if s then 
        if ( b == 'backspace' ) then 
            str = str:sub ( 0, str:len() - 1 ) 
        else 
            str = str .. b 
        end 
    end 
end ) 

Thanks man, it's exactly i needed.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...