GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2018-09-16 12:41:52

idealcastle
Member
Registered: 2018-09-12
Posts: 9

Draw Table Function

It would be great for a function that could draw a table, based on how many columns and your data for each row. I dont have a solution for this yet, but will need one soon. Thoughts?

Offline

#2 2018-09-16 13:53:25

xot
Administrator
Registered: 2007-08-18
Posts: 1,189

Re: Draw Table Function

I've written code for this a number of times but it's not fit for sharing. For something basic and ad hoc, especially when you can prescribe the dimensions of the cells, it's not difficult to slap together a couple of nested loops to draw the grid lines and draw the data. You can look at this post for an example, though I don't necessarily recommend it.

I never made a general purpose script because there are so many different presentation possibilities. You could get really deep with it.


Abusing forum power since 1986.

Offline

#3 2018-09-16 15:14:57

idealcastle
Member
Registered: 2018-09-12
Posts: 9

Re: Draw Table Function

I see. and thanks for the resources. It does make sense due to the visuals. I was just hoping we could have a more "responsive" system. Not sure I'm a big fan of having to statically assign the y/x etc. I get it on UI placement, but there really is no option for 100% of a set space? Like html/css. Lot more math involved to get these damn pixels all aligned properly. haha.

Offline

#4 2018-09-16 15:17:33

idealcastle
Member
Registered: 2018-09-12
Posts: 9

Re: Draw Table Function

Question for you, do you know of any good GUI, I want to work on a statistics simulation, but I need to be able to see all the variables, problem is, hate having to set each one up, wish there was a cleaner way to do this, or at least some interface that could show me them in almost table format, otherwise Its just text randomly on the screen. Worst case, I'll just draw a rectangle and align the numbers.

Offline

#5 2018-09-17 01:56:24

xot
Administrator
Registered: 2007-08-18
Posts: 1,189

Re: Draw Table Function

You might want to look into Dear ImGui. If its (rather large) feature set looks like a good fit, babyjeans made a GML wrapper for it available for free on the Marketplace. I don't have any experience with it myself, though I'm a big fan of the Immediate Mode GUI paradigm.

https://marketplace.yoyogames.com/assets/6221/imguigml


Abusing forum power since 1986.

Offline

#6 2018-09-19 20:03:54

idealcastle
Member
Registered: 2018-09-12
Posts: 9

Re: Draw Table Function

Oh, nice. Thanks for these. I'll take a look.

Question. When do you update scripts that have been submitted? I've seen multiple times from forum links on the GM forums of useful scripts, but don't really see them ever in the script section of this site? Isn't it suppose to be pushed over as a useful script for otherwise to find, otherwise you just have to hope that you eventually come across it inside a forum.

Offline

#7 2018-09-20 10:02:40

xot
Administrator
Registered: 2007-08-18
Posts: 1,189

Re: Draw Table Function

Well, you know, it's simply very time consuming testing and formatting scripts to a certain standard. While I've been working on the site in ways that aren't as visible, I also have other projects that are vastly more interesting to me. It's not a great answer but it's an honest one.

That's why the script submission forum exists and is now the only way scripts can be submitted. It's so scripts can be seen and used by others before they are added to the main site. If you want to look, you'll find great scripts that should have been added to the main site ages ago. It's not ideal but it's better than the old system where too often scripts were submitted into a void.


Abusing forum power since 1986.

Offline

Board footer

Powered by FluxBB