Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting of GDScript class_name property through the Create Script menu #208

Closed
homchom opened this issue Nov 5, 2019 · 1 comment · Fixed by godotengine/godot#78573

Comments

@homchom
Copy link

homchom commented Nov 5, 2019

Describe the project you are working on:

I am working on a program that allows the user to configure a thermometer-style progress bar to display.

Describe the problem or limitation you are having in your project:

I noticed that when creating GDScript files, the "Class Name" option in the menu is locked. The docs say this is because "the file itself represents the class". However, recently the class_name property was added, and I think this menu was overlooked. My "problem" is not as much a problem as it is a notice of inconsistency and overlook within the editor.

Describe how this feature / enhancement will help you overcome this problem or limitation:

My proposal is to unlock this field and allow setting class_name from the menu, similarly to how extends can be set using the "Inherits" field. This would fix the inconsistency and overlook mentioned above.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

h

Describe implementation detail for your proposal (in code), if possible: N/A

If this enhancement will not be used often, can it be worked around with a few lines of script?:

It can be worked around with one line; however, it should in theory be used just as often as the class_name keyword itself if implemented. It is also an easy fix to an inconsistency.

Is there a reason why this should be core and not an add-on in the asset library?:

This is not a "new feature" like those found in the asset library; it is just an expansion of an existing feature that makes logical sense.

@aaronfranke
Copy link
Member

Related: #209

Calinou added a commit to Calinou/godot that referenced this issue Dec 5, 2019
… dialog [ci skip]

TODO:

- Don't allow setting `class_name` for built-in scripts.
- Fix `class_name` replacement for script templates other than the default one.

This closes godotengine/godot-proposals#208.
@Calinou Calinou changed the title allow setting of GDScript "class_name" property through "create script" menu Allow setting of GDScript class_name property through the Create Script menu Sep 6, 2020
@akien-mga akien-mga added this to the 4.2 milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants