Jump to content

destruir guiCreateStaticImage


Recommended Posts

Posted (edited)

Bom Dia,

 

Preciso de uma ajuda. Fiz um botão não meu login .png e usei o guiCreateStaticImage, para fazer que ele não seja destruído quando eu clico nele 

 

function createImageButtonLogin(x,y,widht,height,text,bool,parent,image,info)
  button = guiCreateStaticImage(x,y,widht,height,"Images/"..image..".png",true)
  guiBringToFront(button)
  label = guiCreateLabel(0,0,1,1,text,bool,button)
  guiBringToFront(label)
  setElementData(label,"parent",button)
  setElementData(label,"nome",text)
  setElementData(button,"info",info)
  setElementData(button,"image",image)
  guiLabelSetVerticalAlign(label,"center")
  guiLabelSetHorizontalAlign(label,"center")
  return label
end

login_window = guiCreateStaticImage(0, 0, 1, 1, "Images/BG2.png", true)
	login_play = createImageButtonLogin(0.05,0.4,0.12,0.04,"",true,login_window,"play")
    login_char = createImageButtonLogin(0.05,0.45,0.12,0.04,"",true,login_window,"caract")
    -- login_about = createImageButtonLogin(0.05,0.5,0.12,0.04,"",true,login_window,"info")
    login_Sair = createImageButtonLogin(0.05,0.5,0.12,0.04,"",true,login_window,"quit")
	

 

Ja usei isso e nao vai

 

function detroisss(login_window,login_play,login_char,login_Sair)
    if isElement(login_window) then
	    destroyElement(login_window)
		guiSetVisible(login_window,false)
	end
	if isElement(login_play) then
	    destroyElement(login_play)
		guiSetVisible(login_play,false)
	end
	if isElement(login_char) then
	    destroyElement(login_char)
		guiSetVisible(login_char,false)
	end
	if isElement(login_Sair) then
	    destroyElement(login_Sair)
		guiSetVisible(login_Sair,false)
	end
end

Imagem 

https://ibb.co/2dgC9N9

https://ibb.co/2dgC9N9

Edited by felipebaidoloko
  • Moderators
Posted

Não entendi direito o que vc quer fazer.

É pra destruir o guiCreateStaticImage?

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanksspacer.png

Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile
Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment
Discord Oficial do MTA: https://mtasa.com/discord
Blacklist e Whitelist de Scripters: Planilha

Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.

Posted

Movido para Programação em Lua. @felipebaidoloko Para manter os tópicos nos locais corretos, por favor postar na seção correta.

Please do not PM me with scripting related question nor support, use the forums instead.

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