Add hint tooltips for Project Brush buttons when importing them from image files

This commit is contained in:
OverloadedOrama 2020-07-13 21:59:25 +03:00
parent c42a8a7219
commit 8c02e696a9
2 changed files with 8 additions and 5 deletions

View file

@ -71,10 +71,11 @@ static func add_file_brush(images : Array, hint := "") -> void:
button.brush.index = button.get_index()
static func add_project_brush(image : Image) -> void:
static func add_project_brush(image : Image, hint := "") -> void:
var button = create_button(image)
button.brush.type = CUSTOM
button.brush.image = image
button.hint_tooltip = hint
var container = Global.brushes_popup.get_node("TabContainer/Project/ProjectBrushContainer")
container.add_child(button)
button.brush.index = button.get_index()