1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Use '~' prefix instead of '%' for random brushes (#362)

Fixes #337.
This commit is contained in:
Rémi Verschelde 2020-10-21 18:07:49 +02:00 committed by GitHub
parent e94bcf50e0
commit d41751d39c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 3 additions and 3 deletions

View file

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 567 B

View file

Before

Width:  |  Height:  |  Size: 573 B

After

Width:  |  Height:  |  Size: 573 B

View file

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 567 B

View file

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 567 B

View file

Before

Width:  |  Height:  |  Size: 566 B

After

Width:  |  Height:  |  Size: 566 B

View file

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 245 B

View file

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

View file

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 245 B

View file

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

View file

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 250 B

View file

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

View file

@ -68,7 +68,7 @@ func get_brush_files_from_directory(directory: String): # -> Array
# and png one at that nya # and png one at that nya
if !the_directory.current_is_dir() and curr_file.get_extension().to_lower() == "png": if !the_directory.current_is_dir() and curr_file.get_extension().to_lower() == "png":
# if we are a random element, add # if we are a random element, add
if "%" in curr_file: if "~" in curr_file:
randomised_files.append(curr_file) randomised_files.append(curr_file)
else: else:
non_randomised_files.append(curr_file) non_randomised_files.append(curr_file)

View file

@ -196,14 +196,14 @@ func add_brush() -> void:
dir.list_dir_begin() dir.list_dir_begin()
var curr_file := dir.get_next() var curr_file := dir.get_next()
while curr_file != "": while curr_file != "":
if curr_file.begins_with("%") and brush_name in curr_file: if curr_file.begins_with("~") and brush_name in curr_file:
random_brushes.append(curr_file) random_brushes.append(curr_file)
curr_file = dir.get_next() curr_file = dir.get_next()
dir.list_dir_end() dir.list_dir_end()
var file_ext : String = path.get_file().get_extension() var file_ext : String = path.get_file().get_extension()
var index : int = random_brushes.size() + 1 var index : int = random_brushes.size() + 1
var file_name = "%" + brush_name + str(index) + "." + file_ext var file_name = "~" + brush_name + str(index) + "." + file_ext
var location := "Brushes".plus_file(brush_name).plus_file(file_name) var location := "Brushes".plus_file(brush_name).plus_file(file_name)
dir.copy(path, Global.directory_module.xdg_data_home.plus_file(location)) dir.copy(path, Global.directory_module.xdg_data_home.plus_file(location))