Jump to content

dx functions


MAB

Recommended Posts

hey.. does anyone know how to make a dx edit box? i don't want link of resources that i should export functions from .. i want to see codes.. an example of a dx edit box .. i tried but failed and if none could help i will post the codes i tried with .. i can't now because i am in my phone.. thanks

Link to comment

that is what i tried to do.. idea:

make a edit box that the player can't see then make a rectangle on that edit box so the player think that it is a edit box so when he press it and start to type in the edit box the dxDrawText draws the text that is in the edit box

addEventHandler("onClientRender", root, 
function() 
showCursor(true) 
edit = guiCreateEdit(264, 350, 178, 20, "", false) 
guiSetAlpha(edit, 0.00) 
guiSetProperty(edit, "Alpha", "0.000000") 
guiSetProperty(edit, "NormalTextColour", "00000000") 
guiEditSetMaxLength(edit, 10) 
text = guiGetText (edit) 
dxDrawRectangle(244, 345, 225, 25, tocolor(0, 0, 0, 100), true) 
dxDrawText( tostring(text), 278, 347, 442, 364, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)  
end 
) 

Link to comment

Of course... creating editbox is great idea... every frame? Not.

edit = guiCreateEdit(...) 
guiSetAlpha(edit, 0) 
-- No need for properties. 
addEventHandler("onClientRender", root, 
    function() 
        -- DX functions. 
    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...