godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.15k stars 97 forks source link

Add a `get_buttons()` method to AcceptDialog #2040

Open MaaaxiKing opened 3 years ago

MaaaxiKing commented 3 years ago

Describe the project you are working on

Reaction game

Describe the problem or limitation you are having in your project

I cannot access a Button of a ConfirmationDialog without creating a variable.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I could access a Button and so change the text or generally do something with it.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

AcceptDialog get_buttons() Returns an Array of the existing Buttons.

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

No

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

Yes, it is useful for every sort of project.

MaaaxiKing commented 3 years ago

Formatting is not possible in the title, @Calinou! Without the formatting, these signs `` are accents.

Calinou commented 3 years ago

Formatting is not possible in the title, @Calinou! Without the formatting, these signs `` are accents.

It works for those using Refined GitHub like me :slightly_smiling_face:

Please don't mind the title changes; I often edit proposal titles for consistency.

me2beats commented 3 years ago

What buttons do you mean? Ok, Close and Cancel ? There are get_ok(), get_close_button(), get_cancel()

Are there cases when using them is inconvenient?