godotengine / godotengine/godot-visual-script
Add MouseMode enums to Visual Script's constant
- Dominant language
- C++
- Stars
- 131
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the project you are working on
I'm working on a 3D endless runner game.
### Describe the problem or limitation you are having in your project
Currently, setting MouseMode in Visual Script can only be done using an integer value, as shown below:

This doesn't tell the user what exactly mode it is being set to, making the code unclear when debugging. This is contrary to GDScript which MouseMode is set by the enumerations (MOUSE_MODE_VISIBLE, MOUSE_MODE_HIDDEN, MOUSE_MODE_CAPTURED), as shown [here](https://docs.godotengine.org/en/stable/classes/class_input.html?highlight=MOUSE_MODE_CAPTURED#enum-input-mousemode).
Considering that the function itself tells the user to look for constants for more information, yet there is no related constant to be found anywhere in the engine is pretty much misleading 😅, as shown below:

According to [this](https://docs.godotengine.org/en/stable/classes/class_input.html?highlight=MOUSE_MODE_CAPTURED#description), the constant relating to this should be found in the InputMap class (I could be wrong though).
However,

### Describe the feature / enhancement and how it helps to overcome the problem or limitation
By adding the MouseMode enums to Visual Script's constant, this problem would be fixed.
### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
For example, the implementation would be the same as Vector3.UP which already presents as a constant in the engine.
In the most popular function like the _move_and_slide_, if the user doesn't know which's the right value to set for the Vector3 directions...

Here is the constant for them which also makes the code much clearer to read:

### If this enhancement will not be used often, can it be worked around with a few lines of script?
This will be used very often and can't be worked around since it's the core feature of the engine.
### Is there a reason why this should be core and not an add-on in the asset library?
This is the core functionality.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.