Jump to content

gui MEMO problem |


JeViCo

Recommended Posts

Posted

Hello everyone! i'm making a login panel and met a little(maybe not) problem. All following letters appear on a new line.

Code:

addEventHandler("onClientCharacter", root, function(key)
	if guiGetVisible(backimg) then
		if string.match(key, '%a') or string.match(key, '%d') then
			if edit_l then
				local text = guiGetText(edit_login)
				--outputChatBox(text)
				--outputChatBox(key)
				guiSetText(edit_login,text..key)
			elseif edit_p then
				local text = guiGetText(edit_pass)
				guiSetText(edit_pass,text..key)
			elseif edit_conf_p then
				local text = guiGetText(edit_conf_pass)
				guiSetText(edit_conf_pass,text..key)
			end
		end
	end
end)

 

  • 3 weeks later...
Posted
10 hours ago, Juuve said:

 vertical blinking line still visible\\ even with alpha = 0

try to use this function to delete last character on the text

function deleteLastCharacter(str)
return(str:gsub("[%z\1-\127\194-\244][\128-\191]*$", ""))
end
addEventHandler("onClientCharacter", root, function(key)
	if guiGetVisible(backimg) then
		if string.match(key, '%a') or string.match(key, '%d') then
			if edit_l then
				local text = guiGetText(edit_login)
text=deleteLastCharacter(text)
text=deleteLastCharacter(text)
				guiSetText(edit_login,text..key)
			elseif edit_p then
				local text = guiGetText(edit_pass)
text=deleteLastCharacter(text)
text=deleteLastCharacter(text)
				guiSetText(edit_pass,text..key)
			elseif edit_conf_p then
				local text = guiGetText(edit_conf_pass)
text=deleteLastCharacter(text)
text=deleteLastCharacter(text)
				guiSetText(edit_conf_pass,text..key)
			end
		end
	end
end)

check if is it work or no

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

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