mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-26 08:34:43 -04:00
Add hint tooltips for Project Brush buttons when importing them from image files
This commit is contained in:
parent
c42a8a7219
commit
8c02e696a9
2 changed files with 8 additions and 5 deletions
|
@ -156,11 +156,12 @@ func spritesheet_frame_value_changed(value : int, vertical : bool) -> void:
|
|||
|
||||
|
||||
func add_brush(type : int) -> void:
|
||||
var file_name_ext : String = path.get_file()
|
||||
file_name_ext = brush_name_replace(file_name_ext)
|
||||
var file_name : String = file_name_ext.get_basename()
|
||||
image.convert(Image.FORMAT_RGBA8)
|
||||
if type == BrushTypes.FILE:
|
||||
var file_name_ext : String = path.get_file()
|
||||
file_name_ext = brush_name_replace(file_name_ext)
|
||||
var file_name : String = file_name_ext.get_basename()
|
||||
|
||||
file_name = brush_name_replace(file_name)
|
||||
Brushes.add_file_brush([image], file_name)
|
||||
|
||||
|
@ -170,8 +171,9 @@ func add_brush(type : int) -> void:
|
|||
dir.copy(path, Global.directory_module.xdg_data_home.plus_file(location))
|
||||
|
||||
elif type == BrushTypes.PROJECT:
|
||||
var file_name : String = path.get_file().get_basename()
|
||||
Global.current_project.brushes.append(image)
|
||||
Brushes.add_project_brush(image)
|
||||
Brushes.add_project_brush(image, file_name)
|
||||
|
||||
|
||||
# Checks if the brush name already exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue