Remove unused argument in Theme method and expose missing methods #37759
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed #36880. Breaks compatibility.
Changed signature:
Theme.get_type_list(String type)
->Theme.get_type_list()
Renamed:
Theme.get_stylebox_types()
->Theme.get_stylebox_type_list()
Added:
Theme.get_color_type_list()
Theme.get_constant_type_list()
Theme.get_font_type_list()
Theme.get_icon_type_list()
As the
type
argument is never used inget_type_list
, I've removed it, and fixed the documentation as well. I've also noticed, that there is a separate method to get types of styleboxes, but there are no methods for other entities. I've introduced them and named all of them to matchget_type_list
, for consistency. New methods are new to the engine as well and can be used internally, if one requires them.Due to the removed argument and the renamed function this is a breaking change.
Test script
Test output (formatted for readability)