mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:44:42 -04:00
Changes to better follow GDScript style guide
Nothing new is being added in this commit, just code re-ordering & re-naming to better follow the recommended GDScript style guide. http://docs.godotengine.org/en/3.2/getting_started/scripting/gdscript/gdscript_styleguide.html And https://www.gdquest.com/docs/guidelines/best-practices/godot-gdscript/
This commit is contained in:
parent
5fe4b74a39
commit
8ff917111c
14 changed files with 173 additions and 169 deletions
|
@ -30,14 +30,14 @@ func find_brushes(brushes_dir : Directory, path : String) -> Array:
|
|||
found_random_brush = Global.file_brush_container.get_child_count()
|
||||
image.convert(Image.FORMAT_RGBA8)
|
||||
Global.custom_brushes.append(image)
|
||||
Global.create_brush_button(image, Global.BRUSH_TYPES.RANDOM_FILE, file.trim_suffix(".png"))
|
||||
Global.create_brush_button(image, Global.Brush_Types.RANDOM_FILE, file.trim_suffix(".png"))
|
||||
else:
|
||||
var brush_button = Global.file_brush_container.get_child(found_random_brush)
|
||||
brush_button.random_brushes.append(image)
|
||||
else:
|
||||
image.convert(Image.FORMAT_RGBA8)
|
||||
Global.custom_brushes.append(image)
|
||||
Global.create_brush_button(image, Global.BRUSH_TYPES.FILE, file.trim_suffix(".png"))
|
||||
Global.create_brush_button(image, Global.Brush_Types.FILE, file.trim_suffix(".png"))
|
||||
elif file.get_extension() == "": # Probably a directory
|
||||
var subdir := "./%s" % [file]
|
||||
if brushes_dir.dir_exists(subdir): # If it's an actual directory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue