Jump to content

[HELP] DxEditbox


Ranous

Recommended Posts

  • 4 months later...

Hi Bro. Example;

    local theInput 
    local textColor = tocolor(0, 0, 0, 255) 
    local editBoxColor = tocolor(255, 255, 255, 255) 
      
    addEventHandler("onClientRender", root, 
        function() 
            if theInput then 
                dxDrawRectangle(395, 395, 100, 55, editBoxColor) 
                dxDrawText(theInput, 400, 400, 90, 45, textColor) 
            end 
        end ) 
      
    addEventHandler("onClientCharacter", root, 
        function(theChar) 
            theInput = theInput .. theChar 
        end ) 
      
    -- handling the backspace key: 
    addEventHandler("onClientKey", root, 
        function(theButton, state) 
            if theButton == "backspace" and state == "down" then 
                theInput = theInput:sub(1, theInput:len()-1) 
            end 
        end ) 

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...