Jump to content

dxSetRenderTarget


#Dv^

Recommended Posts

Hola, quisiera saber como lograr que el texto que llega hasta el final (lado derecho) del cuadro negro no siga de largo y directamente pase debajo a continuar, como si usara \n, por que según la resolución de cada persona la ubicación del texto varía supongo

 

local render = dxCreateRenderTarget(607, 350, true)
local text = "TEST TESTING TESTING TESTING TESTING TESTING TESTING TESTING TESTING TESTING \nTESTING TESTING "

function screen_Dx()
	dxDrawRectangle(x*300, y*150, x*760, y*400, tocolor(0, 0, 0, 117))
	dxDrawRectangle(x*300, y*150, x*760, y*40, tocolor(0, 0, 0, 117))
	dxDrawRectangle(x*450, y*195, x*607, y*350, tocolor(0, 0, 0, 117))
	--
	dxDrawBorderedText("TEST", x*770, y*335, x*600, y, tocolor(255, 255, 255, 255), x*2, "default-bold", "center", "center", false, false, false)
	--
	dxSetRenderTarget(render, true)
	
	dxDrawText(text, x, y+offset, x, y, tocolor(255, 255, 255, 255), x*1.3, "default-bold", "left", "top")
	
	dxSetRenderTarget()
	--
	dxDrawImage(x*450, y*195, x*607, y*350, render)
end
addEventHandler("onClientRender", root, screen_Dx)

thump_9726047sin-ttulo.jpg

Edited by #Dv^
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...