Jump to content

Problem with dxDrawText & dgsCreateBlurBox


syn0nym

Recommended Posts

Hello thanks for clicking this topic. so i have a problem when i code, i want to make a dxDrawTest and a blurred background using setCameraMatrix and dgsCreateBlurBox, when i run my code the text is not showing, but when i clear the dgsCreateBlurBox, the text is showing, so my question is how to make the text visible with the dgsCreateBlurBox 

Here my code

local sW, sH = guiGetScreenSize( ) 
local blurbox = dgsCreateBlurBox(sW, sH) 
local blurArea = dgsCreateImage(0,0,1,1,blurbox,true)  

function Text ( )          
    setCameraMatrix(1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316)
    dxDrawText ( "Test", 44, sH - 43, sW, sH, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" )
end

function Render ( )
    addEventHandler ( "onClientRender", root, Text ) 
end
dgsSetLayer(blurArea, "bottom")
showCursor(true)
addEventHandler ( "onClientResourceStart", resourceRoot, Render )

 

Link to comment
On 08/03/2022 at 22:37, thisdp said:

why not use dgsCreateLabel?

I've been try using a dgsCreateLabel, but when i use a wordBreak property it doesn't work.  here my code

local window = dgsCreateWindow  ( 440 , 160 , 400 , 300 , "" , false)
local label = dgsCreateLabel ( 20 , 10 , 300 , 100 , "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", false , window)
    dgsSetProperty (label , "wordBreak" , true)

 

Link to comment
  • Scripting Moderators

It's working fine for me:
ibDNg2h.png

Please make sure you're using the latest version of DGS 3.515. You can find out which version you're using with /dgsver. you can then update it using /updatedgs or download it manually from here.

Edited by xLive
  • Thanks 2
Link to comment
14 minutes ago, xLive said:

It's working fine for me:
ibDNg2h.png

Please make sure you're using the latest version of DGS 3.515. You can find out which version you're using with /dgsver. you can then update it using /updatedgs or download it manually from here.

Thanks you for helping

  • Like 1
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...