Jump to content

[HELP] Dx Edit Box


K4stic

Recommended Posts

Posted

Hello MTAsa Community.

Can anyone help me to make editbox with Dx?

i know how to make the EditBox but i need how to add the charter and with backward remove the charter

Posted
Make an edit box and use guiSetAlpha and render your dx rectangle there or you've already tried it?

cheater solution

I have a class for creating a dxEditBox, if you want it you can send me a PM.

Posted
Don't use onClientKey, use onClientCharacter

That is also an option. Pretty much depends on the usage and needs - but he will need onClientKey eventually since if he wants to be able to delete characters.

Posted

i need know how xD the functions and events i know

i need know how i can't just locate the algorithm in my head of how they must work D;

Posted

they have all function and etc just to make the Dx custom Edit Box without the Text part

to Correct understund

you know the Gui EditBox? if yes theni want make that but with Dx the Problem is how to make the Text part

Posted
Don't use onClientKey, use onClientCharacter

That is also an option. Pretty much depends on the usage and needs - but he will need onClientKey eventually since if he wants to be able to delete characters.

You can also use getKeyState in a onClientRender

Posted
  
text = {} 
function getCharacter(character) 
for i,ebox in ipairs(youreditbox) do 
      table.insert(text[i], character) 
    end 
end 
addEventHandler("onClientCharacter", getRootElement(), getCharacter) 
addEventHandler("onClientRender",root,function() 
dxDrawText(table.concat(text[i],""),.......) 
end) 
--and to remove it just use 
bindKey("backspace", "down", function () 
  table.remove(....) 
end) 
  

Like that?

It's just an example.

  • Like 1

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