Have a comment box in the variables panel


Although I don’t know how to program, I’ve seen some scripts and I know it’s possible to insert comments. In Gdevelop we also insert comments in the events, but the variables are organized in separate panels and so inserting information about them is not as simple as in the scripts.

We could insert comments on the events when the variables are used, but the explanations would be separated into several different events being harder to find when we want the information. We can make just one comment and write all variables, but we need do this to every variable and don’t forget when add a newone (a lot of work).

We can have a separate file to annotate, but is not as practical and powerful as having everything inserted into the project itself.

So I thought the most practical way to get information about the variables would obviously be within the variables panel itself. I thought of something like having a button to show/hide comments. Something like this:



My idea was to have a comment for each variable. Therefore, when the variable was chosen, your comment would appear if the box is visible.

I believe some will say that there is no need for comments for the variables. I disagree. I know that we must choose the names of the variables that represent their functions, but as the project grows or even when we need to stop the project for a while, comments with guidance are great help! And having this help in an easy and practical way would be even better!



Not a bad idea!
Though I would prefer the same way you can already comment events, which means all comments would be visible in a different colored line.

1 Like

I think your idea allows us to more easily see the comments. But I think it would still be nice to have the button to hide them, because with too many comments between the variables, maybe it could visually pollute the panel.

It probably could pollute the panel, but also that’s what I used to think of putting comments in events too! I used to program without putting any comments anywhere hahaha, even if it was huge pages. I thought “why make it worse with useless info I already know?” But then I’ve come to appreciate how organized programming can look with comments! Besides, programming in itself requires a lot more lines than a list of variables. So, a list of variables would PROBABLY not even look so bad if it just had a few comments for lines.

But then again, maybe since there typically aren’t that many variables, it would just be fine with a comment that’s hidden until you select the variable :slight_smile: kinda fine with either, honestly.