Jump to content

How do i hide the pointer of guiCreateEdit()?


tommymaster

Recommended Posts

Hi. I made a script, in which i created an edit box, then set it's alpha to 0, and i would like to output the text of the invisible edit box, by dxDrawText. This is what i have came up so far:

Edit boxes:

function createLoginEditBoxes()
	usernameField = guiCreateEdit(px/2 - field["width"]/2, py/2 - field["height"]/2 - 150/y*py, field["width"], field["height"], "asd", false)
	guiSetAlpha (usernameField, 0)
	passwordField = guiCreateEdit(px/2 - field["width"]/2, py/2 - field["height"]/2 - 50/y*py, field["width"], field["height"], "asd", false)
	guiSetAlpha (passwordField, 0)
	guiEditSetMasked (passwordField, true)
end
		dxDrawImage (px/2 - field["width"]/2, py/2 - field["height"]/2 - 50/y*py, field["width"], field["height"], "files/inactive.png")
		if isElement (passwordField) then
			dxDrawText(guiGetText(passwordField), px/2 - field["width"]/2 + 10, py/2 - field["height"]/2 - 30/y*py, _, _, _, 1/x*px, "default", "left", "center")
		end

The problem is, that the edit boxe's text pointer will not set it's alpha to 0. So the pointer of the edit box remains visible, and protrudes into the text.
Screenshot of it:
rEydJLW.png
-Also, the edit box (passwordField) is set to masked, but the text in it is not, and the drawText will not mask the text in the editbox.

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