Jump to content

[REL]DX Edit Box


McDeKi

Recommended Posts

Hello, I've made a simple resource, which allows create dx edit box.

Video:

Functions:

  
createEditBox( string/int id, float( 0 - 1 ) x, float( 0 - 1 ) y, float( 0 - 1 ) width, float( 0 - 1 ) height, bool visible, string text, bool mask, int maxLength, string font text, bool space, int type, function color( r, g, b, a ),  bool rectangle,  function rectangleColor ( r, g, b, a ), float scaleText, bool clip,  int ms ( how many miliseconds have to pass to delete text with backspace), bool helpText , string helpText, function helpTextColor( r, g, b, a ), bool helpTextOff, float helpTextScale, string helpTextFont, bool postGUI, bool carret, function carretColor( r, g, b ), bool specialCharacters, bool clickable ) --//Creates new dxEditBox 
  
changeText( id, text ) --//Changes text  
  
changeVisibility( id, bool ) --//Changes visibility of edit box 
  
clickable( id, bool ) --//Is edit box clickable 
  
getText( id ) --//Gets text  
  
setPosition( id, x, y ) --//Sets position of edit box 
  
setSize( id, width, height ) --//... 
  
deleteEditBox( id ) --//Deletes edit box 
  
isActive( id ) --//Is edit box clicked 
  
  

Examples:

  
    exports.dxEditBox:createEditBox( "1", 0.2, 0.2, 0.20, 0.07, true, "", false, 25, "arial", false, 0, { 0, 0, 0, 180 }, true, { 255, 255, 255, 180 }, 2, true, 60, true, "Simple box 1", { 0, 0, 0, 40 }, true, 3, "arial", true, true, {0, 114, 210}, false  ) 
    exports.dxEditBox:createEditBox( "2", 0.3, 0.31, 0.25, 0.07, true, "", true, 25, "arial", false, 0, { 0, 0, 0, 180 }, true, { 0, 205, 0, 180 }, 3, true, 60, true, "Passworded box", { 0, 0, 0, 150 }, true, 3, "arial", true, true, {0, 0, 0}, false  ) 
    exports.dxEditBox:createEditBox( "3", 0.4, 0.41, 0.30, 0.07, true, "", false, 25, "arial", false, 1, { 255, 255, 255, 180 }, true, { 0, 0, 0, 180 }, 2, true, 60, true, "Numbers only", { 255, 255, 255, 40 }, true, 3, "arial", true, true, {255, 255, 255}, false  ) 
    exports.dxEditBox:createEditBox( "4", 0.55, 0.51, 0.23, 0.07, true, "", false, 25, "arial", true, 0, { 0, 0, 0, 180 }, true, { 0, 114, 210, 180 }, 2, true, 60, true, "Special char.", { 255, 255, 255, 130 }, true, 3, "arial", true, true, {255, 255, 255}, true ) 
    exports.dxEditBox:createEditBox( "5", 0.7, 0.61, 0.25, 0.1, true, "", false, 25, "pricedown", false, 0, { 0, 0, 0, 180 }, true, { 255, 255, 255, 80 }, 2, true, 60, true, "Custom param.", { 0, 0, 0, 40 }, true, 2.5, "default", true, true, {0, 0, 0}, false  ) 
  

Download:

https://community.multitheftauto.com/ind ... s&id=10804

Link to comment
  • 6 months later...

not working

function testing () 
exports.dxedit:createEditBox( "1", 0.2, 0.2, 0.20, 0.07, true, "", false, 25, "arial", false, 0, { 0, 0, 0, 180 }, true, { 255, 255, 255, 180 }, 2, true, 60, true, "Simple box 1", { 0, 0, 0, 40 }, true, 3, "arial", true, true, {0, 114, 210}, false  ) 
end 
addEventHandler("onClientRender",root,testing) 

and

exports.dxedit:createEditBox( "1", 0.2, 0.2, 0.20, 0.07, true, "", false, 25, "arial", false, 0, { 0, 0, 0, 180 }, true, { 255, 255, 255, 180 }, 2, true, 60, true, "Simple box 1", { 0, 0, 0, 40 }, true, 3, "arial", true, true, {0, 114, 210}, false  ) 

Link to comment
  • 2 months later...
  • 1 month later...
  • 10 months later...
  • 4 months later...
  • 4 years later...

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