Piorun Posted August 31, 2015 Share Posted August 31, 2015 It happend to me today. I decided to make some cool GUI but i dont know why when i'm writing something its fine but if i want to delete text - it's folding ... Don't really know why. Here is video. and code local sw,sh = guiGetScreenSize() local index = 1 login = { [1] = "", [2] = "" } login.background = dxCreateRenderTarget(250,300,true) addEventHandler("onClientRender",root, function() dxDrawRectangle(0,0,sw,sh,tocolor(0,0,0,128)) dxDrawImage(sw / 2 - 250, sh / 2 - 200, 500, 100, "images/crime-industry-logo-server.png") dxSetRenderTarget(login.background) dxDrawImage(0, 0, 250, 40, "images/edit.png", 0,0,0, tocolor(255,255,255,20)) dxDrawText(login[1], 10, 0, 250, 40, tocolor(255,255,255,255), 1, "default", "left", "center") dxDrawImage(0, 42, 250, 40, "images/edit.png", 180,0,0, tocolor(255,255,255,20)) dxDrawText(login[2]:gsub("[%w%p]","*"), 10, 42, 250, 40, tocolor(255,255,255,255), 1, "default", "left", "center") dxSetRenderTarget() dxDrawImage(sw / 2 - 125, sh / 2 - 150 + 80, 250, 300, login.background) end ) addEventHandler("onClientResourceStart",root, function() showCursor(true) fadeCamera(true) showChat(false) setTime(0,0) setMinuteDuration(60000) setPlayerHudComponentVisible("all",false) setCameraMatrix(-2079.9763,315.0147,106.1571,-2080.4331,305.3169,105.7115) end ) addEventHandler("onClientCharacter",root, function(key) login[index] = login[index] .. key end ) addEventHandler("onClientKey",root, function(key,state) if key == "tab" and state == true then index = index % 2 + 1 outputChatBox(index) elseif key == "backspace" and state == true then login[index] = login[index]:sub(0, login[index]:len() - 1) end end ) Pls help. Link to comment
JR10 Posted August 31, 2015 Share Posted August 31, 2015 I don't really understand the problem and the video is private. Link to comment
Piorun Posted August 31, 2015 Author Share Posted August 31, 2015 Fuck, ok i made it watchable now Link to comment
arezu Posted August 31, 2015 Share Posted August 31, 2015 Change this on line 16: dxSetRenderTarget(login.background) to: dxSetRenderTarget(login.background, true) Link to comment
Piorun Posted August 31, 2015 Author Share Posted August 31, 2015 Works better but dxDrawImages disappeared. Link to comment
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