t3wz Posted October 2, 2015 Posted October 2, 2015 dxGridlists Code used in the video: local screen_size = { guiGetScreenSize( ) } local gridlist = dxGrid:Create ( ( screen_size[1] / 2 ) - 250, ( screen_size[2] / 2 ) - 150, 500, 300 ); gridlist:AddColumn ( "Nick", 400 ) gridlist:AddColumn ( "Ping", 100 ) for i = 1, 50 do gridlist:AddItem ( 1, "Player "..i.." Name" ) gridlist:AddItem ( 2, tostring ( math.random ( 10, 100 ) ) ) end This framework allows you to make gridlists with dxs, The gridlists works like the default CEGUI system so you won't have a lot of work to adapt your code for this framework. Note that the core is writed in the OOP format (using metatables, not the MTA default system) so you have to write your scripts in this format too, The self for all functions should be the gridlist which you want to perform an action and not something else. You're free to fork, edit and use this as you want, but sell it or remove the author's name isn't permitted, Also pull requests to improve the code are welcome Fell free to contact me if you have any questions or something else. How to use To use this you have to download and include the main file within your project folder and add it to the meta.xml file, After this you can use all the functions that are listed in the documentation page. Download GitHub Documentation The documentation can be found at the project wiki, There also examples there. __ Sorry if there's some grammar errors, my english isn't that good 1
wwz Posted October 3, 2015 Posted October 3, 2015 MAKE A CHANGE IN SCRIPT OF KEEPING ID OF COLUMN PLEASE ,ONLY A SUGGESTION (I USED IT AND IT WAS NICE BUT BECAUSE OF THIS ID MATTER I GOT DIFFICULTY IN SETTING ITEMS)
t3wz Posted October 5, 2015 Author Posted October 5, 2015 Nice ; Nice Man , Thanks Looks nice, good job. Nice looks awesome Look nice , keep the great job finally a good dx gridlist, thanks Thanks guys MAKE A CHANGE IN SCRIPT OF KEEPING ID OF COLUMN PLEASE ,ONLY A SUGGESTION (I USED IT AND IT WAS NICE BUT BECAUSE OF THIS ID MATTER I GOT DIFFICULTY IN SETTING ITEMS) What you mean? explain better.
' A F . Posted October 11, 2015 Posted October 11, 2015 hi t3wz this no is working addCommandHandler('GetData', function ( ) local i = gridlist:GetSelectedItem ( ) local data = gridlist:GetItemDetails ( 1 , i ) outputChatBox (i..'-'..data) end ) Please fix this ^
t3wz Posted October 11, 2015 Author Posted October 11, 2015 hi t3wz this no is working addCommandHandler('GetData', function ( ) local i = gridlist:GetSelectedItem ( ) local data = gridlist:GetItemDetails ( 1 , i ) outputChatBox (i..'-'..data) end ) Please fix this ^ Sorry about this it's fixed now, download the latest version.
t3wz Posted December 16, 2015 Author Posted December 16, 2015 Does it support color-coded text? No, it uses the clip/wordBreak arguments so color-coded texts aren't possible.
AMARANT Posted December 16, 2015 Posted December 16, 2015 Does it support color-coded text? No, it uses the clip/wordBreak arguments so color-coded texts aren't possible. Oh... It's very sad. Perhaps you should consider to implement this feature in the future as some parameter like default gui-gridlist. Thanks for the reply anyway.
t3wz Posted December 17, 2015 Author Posted December 17, 2015 Oh... It's very sad. Perhaps you should consider to implement this feature in the future as some parameter like default gui-gridlist. Thanks for the reply anyway. Ha, i thought that you were talking about HEX colors, btw i've added support to RGB colors, feel free to look at the repo if you want
AMARANT Posted December 17, 2015 Posted December 17, 2015 Nice work, mate Now I can finish a proper scoreboard thanks to your system)
Tails Posted December 17, 2015 Posted December 17, 2015 Thanks for releasing, this will surely come in handy.
Tomas Posted December 17, 2015 Posted December 17, 2015 Does it support color-coded text? No, it uses the clip/wordBreak arguments so color-coded texts aren't possible. You could add it by spliting the string into different draws.
Tails Posted December 18, 2015 Posted December 18, 2015 @ t3ws Is there any way you can fix this? The gridlist doesn't scroll sideways like the CEGUI one does. The text is also centered.
t3wz Posted December 18, 2015 Author Posted December 18, 2015 @Tails Horizontal scroll isn't implemented, What you can do to "fix" this: Increase the gridlist's width. Put a character limit to the video name. About the centered text, it is made to work like this, if you want to, here's the line responsible for processing the text of the row, you can edit this as you wish. @Tomas Good idea, i'll take a look into this later.
Tails Posted December 18, 2015 Posted December 18, 2015 The standard CEGUI gridlists are so bad that I just have to use yours. So it will have to be either or both of the options you mentioned then. Any plans for the future though to implement horizontal scrolling? Edit: Oh, another thing. Can you make the all the dx elements relative, so they scale with every resolution and the positions stay the same?
Tails Posted December 19, 2015 Posted December 19, 2015 I'd really like to use your gridlists but I'm afraid I need to go back to CEGUI as they don't scale well with different resolutions.
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