Added hint_tooltip to file brushes

- File brushes now have their file name as their hint_tooltip.
- Changed horizontal & vertical ruler minor_subdivision to 4.
This commit is contained in:
OverloadedOrama 2019-11-25 18:56:53 +02:00
parent e940029979
commit 8132c8dcc5
4 changed files with 5 additions and 4 deletions

View file

@ -267,7 +267,7 @@ func frame_changed(value : int) -> void:
canvas.frame_button.get_node("FrameButton").pressed = true
func create_brush_button(brush_img : Image, brush_type := BRUSH_TYPES.CUSTOM) -> void:
func create_brush_button(brush_img : Image, brush_type := BRUSH_TYPES.CUSTOM, hint_tooltip := "") -> void:
var brush_container
var brush_button = load("res://Prefabs/BrushButton.tscn").instance()
brush_button.brush_type = brush_type
@ -279,6 +279,7 @@ func create_brush_button(brush_img : Image, brush_type := BRUSH_TYPES.CUSTOM) ->
var brush_tex := ImageTexture.new()
brush_tex.create_from_image(brush_img, 0)
brush_button.get_child(0).texture = brush_tex
brush_button.hint_tooltip = hint_tooltip
brush_container.add_child(brush_button)
func remove_brush_buttons() -> void: