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

Limit the maximum value of unbinds in the connection dialog to signal_argument_size #60187

Conversation

Rindbee
Copy link
Contributor

@Rindbee Rindbee commented Apr 13, 2022

Previously, the range of unbinds was the default range of SpinBox ([0, 100]), now the maximum value is limited to the size of the parameter list of the Signal.

captrue

And the value of unbinds is taken into account when generating the parameter list of the Receiver Method.

I found Script::has_script_signal and Script::get_script_signal_list, but there is no Script::get_script_signal.

@akien-mga akien-mga added this to the 4.0 milestone Apr 13, 2022
@akien-mga akien-mga requested a review from a team April 13, 2022 06:36
@Rindbee Rindbee force-pushed the clamp-the-unbind-range-in-connection-dialog branch from 0830126 to efeb4aa Compare April 13, 2022 10:02
@Rindbee Rindbee force-pushed the clamp-the-unbind-range-in-connection-dialog branch from efeb4aa to 5028653 Compare April 27, 2022 14:51
@KoBeWi
Copy link
Member

KoBeWi commented Apr 27, 2022

The unbinds spinbox could get disabled if max is 0, so users wouldn't wonder why it's non-functional.

@Rindbee Rindbee force-pushed the clamp-the-unbind-range-in-connection-dialog branch from 5028653 to 506a045 Compare April 27, 2022 17:23
@Rindbee
Copy link
Contributor Author

Rindbee commented Apr 27, 2022

For parameters in the final Receiver Method parameter list, if divided by where they come from, currently, they can be divided into 3 categories, as I explained with different colors in the picture of #60143 (comment) (there, I added another one, the signal source, to increase flexibility of the connection dialog).

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok.

As for the disabling the SpinBox I mentioned earlier, when the method has 0 arguments, the max value of unbind is 0. The SpinBox can still be interacted with, but clicking or typing anything has no effect. It might be confusing to some people, so maybe it would be better to disable it explicitly. But maybe I'm wrong. It's not that important.

Update editor/connections_dialog.cpp

Co-authored-by: Tomek <[email protected]>
@Rindbee Rindbee force-pushed the clamp-the-unbind-range-in-connection-dialog branch from 3f02ad3 to fbba40f Compare April 28, 2022 00:06
@akien-mga akien-mga merged commit 69a9f1a into godotengine:master Apr 28, 2022
@akien-mga
Copy link
Member

Thanks!

@Rindbee Rindbee deleted the clamp-the-unbind-range-in-connection-dialog branch April 28, 2022 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants