mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:54:44 -04:00
Refactoring Main.gd. Mostly cutting big methods into smaller ones. (#244)
* Refactoring Main.gd. Mostly cutting big methods into smaller one. - Reduced size of _ready method in Main.gd - Moved code from certain parts of old _ready method into seperate methods - Fixed the translation bug related to CurrentFrame node in TopMenuContainer scene. The CurrentFrame node wasn't updating the language when I was changing language. I've also changed the translation file for this. - Fixed Global.palette_option_button.selected related warning. Because of some unknown reasons, git didn't push completed line there. - Moved code from file_menu_id_pressed and view_menu_id_pressed method in Main.gd to separate methods to make it more readable. * Removed window_title changes from Main.tscn Co-authored-by: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com>
This commit is contained in:
parent
852e249143
commit
aae3ae0cf4
5 changed files with 282 additions and 183 deletions
|
@ -195,7 +195,7 @@ func _load_palettes() -> void:
|
|||
# You need these two lines because when you remove a palette
|
||||
# Then this just won't work and _on_PaletteOptionButton_item_selected
|
||||
# method won't fire.
|
||||
Global.palette_option_button.selected
|
||||
Global.palette_option_button.selected = index
|
||||
on_palette_select("Default")
|
||||
Global.palette_option_button.select(index)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue