mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Prevent users from editing tileset name and size if they choose to not create a new tileset
This commit is contained in:
parent
afe51262c9
commit
177428cc1b
|
@ -37,3 +37,9 @@ func _on_about_to_popup() -> void:
|
||||||
if not tileset.name.is_empty():
|
if not tileset.name.is_empty():
|
||||||
item_string += ": " + tileset.name
|
item_string += ": " + tileset.name
|
||||||
tileset_option_button.add_item(tr("Tileset" + item_string))
|
tileset_option_button.add_item(tr("Tileset" + item_string))
|
||||||
|
_on_tileset_option_button_item_selected(tileset_option_button.selected)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_tileset_option_button_item_selected(index: int) -> void:
|
||||||
|
tileset_name_line_edit.editable = index == 0
|
||||||
|
tile_size_slider.editable = tileset_name_line_edit.editable
|
||||||
|
|
|
@ -67,3 +67,4 @@ suffix_y = "px"
|
||||||
[connection signal="about_to_popup" from="." to="." method="_on_about_to_popup"]
|
[connection signal="about_to_popup" from="." to="." method="_on_about_to_popup"]
|
||||||
[connection signal="confirmed" from="." to="." method="_on_confirmed"]
|
[connection signal="confirmed" from="." to="." method="_on_confirmed"]
|
||||||
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
|
[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"]
|
||||||
|
[connection signal="item_selected" from="GridContainer/TilesetOptionButton" to="." method="_on_tileset_option_button_item_selected"]
|
||||||
|
|
Loading…
Reference in a new issue