Recommended Posts

@thisdp I was testing your resource and noticed that it uses a massive amount of CPU, the performancebrowser said it was using around 80%, and it was only drawing a single edit box.

  • Like 1

Share this post


Link to post

but have you compared with rendering 1 rectangle and render text with rendertarget?

If dgs takes more cpu resource,  I will take measurea to reduce it.

Edited by thisdp

Share this post


Link to post

If u make something like guieditor but dgseditor will be the best script, more than main mta gui! Good luck

Share this post


Link to post
19 hours ago, Gat said:

If u make something like guieditor but dgseditor will be the best script, more than main mta gui! Good luck

Good idea, but i need extra spare time first. :D

Edited by thisdp

Share this post


Link to post

DGS download support is suspended on my server, please go to github instead.

Update system working well with github, so don't be worry.

Share this post


Link to post
DGS = exports.dgs
function clientsideResourceStart ()
    gridlist = DGS:dgsCreateGridList ( 0.80, 0.10, 0.15, 0.60, true )
    DGS:dgsSetVisible(gridlist, false)
    local column = DGS:dgsGridListAddColumn( gridlist, "Player", 0.85 )
end
addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )

function testing()
    DGS:dgsSetVisible(gridlist, true)
    for id, playeritem in ipairs(getElementsByType("player")) do 
        local row = DGS:dgsGridListAddRow ( gridlist )
        DGS:dgsGridListSetItemText ( gridlist, row, column, getPlayerName ( playeritem ) )
    end
end
addCommandHandler("testing", testing)

https://imgur.com/a/JHkf5CO

What's wrong in it?

Edited by Hamatora

Share this post


Link to post
On 2018/7/11 at 02:31, Hamatora said:

DGS = exports.dgs
function clientsideResourceStart ()
    gridlist = DGS:dgsCreateGridList ( 0.80, 0.10, 0.15, 0.60, true )
    DGS:dgsSetVisible(gridlist, false)
    local column = DGS:dgsGridListAddColumn( gridlist, "Player", 0.85 )
end
addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )

function testing()
    DGS:dgsSetVisible(gridlist, true)
    for id, playeritem in ipairs(getElementsByType("player")) do 
        local row = DGS:dgsGridListAddRow ( gridlist )
        DGS:dgsGridListSetItemText ( gridlist, row, column, getPlayerName ( playeritem ) )
    end
end
addCommandHandler("testing", testing)

https://imgur.com/a/JHkf5CO

What's wrong in it?

"column" is not defined in the function "testing". Because of "local" which makes variable "column" only defined in

clientsideResourceStart

Share this post


Link to post
DGS = exports.dgs
DGS:dgsCreateButton(0.88,0.93,0.1,0.05,"Leave", true, 0xFF000000)

@thisdp, Help! Text color doesn't change :с

Also... Could you add text colors for rows please ? 9_9

Edited by Juuve

Share this post


Link to post

By the way. Adding column after gridlist creation does nothing. It works perfect when i create gridlist and wait a little amount of time

Edited by Juuve

Share this post


Link to post
On 2018/7/26 at 02:36, Juuve said:

DGS = exports.dgs
DGS:dgsCreateButton(0.88,0.93,0.1,0.05,"Leave", true, 0xFF000000)

@thisdp, Help! Text color doesn't change :с

Also... Could you add text colors for rows please ? 9_9

ah.. the 7th argument of dgsCreateButton is parent..

 

row color: dgsGridListSetItemColor

 

17 hours ago, Juuve said:

By the way. Adding column after gridlist creation does nothing. It works perfect when i create gridlist and wait a little amount of time

show your code, grid list works fine in my code

  • Thanks 1

Share this post


Link to post

Thanks!

13 hours ago, thisdp said:

ah.. the 7th argument of dgsCreateButton is parent..

 

row color: dgsGridListSetItemColor

 

show your code, grid list works fine in my code

I fixed gridlist - i replaced: local gridlist = with gridlist = and it help me. So it was my fault :$

  • Like 1

Share this post


Link to post
22 hours ago, Juuve said:

Thanks!

I fixed gridlist - i replaced: local gridlist = with gridlist = and it help me. So it was my fault :$

:D Glad to hear you fixed the bug

  • Haha 1

Share this post


Link to post

Could you add some more functions for close button? I mean position of it, background images in 3 different states, like a simple button

Edited by Juuve

Share this post


Link to post
13 hours ago, Juuve said:

Could you add some more functions for close button? I mean position of it, background images in 3 different states, like a simple button

it is a button xD

updatedgs

and then you can use dgsWindowGetCloseButton

Edited by thisdp
  • Thanks 1

Share this post


Link to post
11 hours ago, thisdp said:

it is a button xD

updatedgs

and then you can use dgsWindowGetCloseButton

OMG - Thanks you so much! I wish you +999999 Thanks buttons 9_9

  • Haha 1

Share this post


Link to post
On 7/30/2018 at 03:43, thisdp said:

and then you can use dgsWindowGetCloseButton

it was a while dude i haven't finished the dgs editor because i was have exams in engineering college  but now am free so am back to work  

keep nice work i hope you used oop to create the dgs elements better than drawing functions 

Share this post


Link to post
On 2018/8/1 at 14:20, Master_MTA said:

it was a while dude i haven't finished the dgs editor because i was have exams in engineering college  but now am free so am back to work  

keep nice work i hope you used oop to create the dgs elements better than drawing functions 

:D Thanks

  • Like 1

Share this post


Link to post
On 2018/8/1 at 14:20, Master_MTA said:

it was a while dude i haven't finished the dgs editor because i was have exams in engineering college  but now am free so am back to work  

keep nice work i hope you used oop to create the dgs elements better than drawing functions 

Update DGS to 3.37

Now DGS Supports OOP !

  • Thanks 1

Share this post


Link to post

Hello, @thisdp, could you help me? I used object_preview resource + DGS and got this

feB1t-BIRf63e0QG5pPCgw.png

It doesn't affect on my script at all but gives warnings anyway.

Using setTimer does nothing(

  • Like 1

Share this post


Link to post

wtf why this always happens to me? Sorry million times! I solved this problem. (Still a big fan of yours)

  • Like 1

Share this post


Link to post

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.