Jump to content

get GUI children


Recommended Posts

Any way to list a GUI elements children? I'm trying to make a script that automatically converts GUI into DX gui using presets I have made, but I cannot find how I would go about listing a GUI elements children as to automatically convert them all.

Or even better, any way to list all the GUI from a certain resource?

Link to comment

Maybe like that?

addCommandHandler( 'gui', function ( _, gui, res ) 
    for k,v in ipairs ( getElementsByType ( 'gui-'..gui,  getResourceRootElement(getResourceFromName ( res ) )) ) do 
        outputChatBox ( guiGetText ( v ) ) 
        end 
    end 
) 

> gui .

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