Jekorgi Posted August 9, 2015 Posted August 9, 2015 Hi guys, i want make custom editfield, but i dont know how to do this . I make graphic for it: but i dont know how i could write something in this
Malak Posted August 9, 2015 Posted August 9, 2015 You have another way to use a resource like. Only use this : function onDeleteCharacter() if editBoxState == true then textEdited = string.sub(textEdited,1,string.len(textEdited)-1) end end bindKey("backspace", "down", onDeleteCharacter) function onEditCharacter(character) if editBoxState == true then local count = string.len(textEdited) if count < 23 then textEdited = textEdited..character end end end addEventHandler("onClientCharacter", getRootElement(), onEditCharacter) Its just an exemple then in ur render function just put your dxDrawText(textEdited,x,y,w,h,tocolor(255,255,255,255)...) Its will take less memory and less download for players
GTX Posted August 9, 2015 Posted August 9, 2015 You could also use CEF and create an editbox in HTML/CSS and then import it into MTA.
iAxel Posted August 10, 2015 Posted August 10, 2015 You have another way to use a resource like.Only use this : function onDeleteCharacter() if editBoxState == true then textEdited = string.sub(textEdited,1,string.len(textEdited)-1) end end bindKey("backspace", "down", onDeleteCharacter) function onEditCharacter(character) if editBoxState == true then local count = string.len(textEdited) if count < 23 then textEdited = textEdited..character end end end addEventHandler("onClientCharacter", getRootElement(), onEditCharacter) Its just an exemple then in ur render function just put your dxDrawText(textEdited,x,y,w,h,tocolor(255,255,255,255)...) Its will take less memory and less download for players You can complete example? please
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now