mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
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:
parent
e940029979
commit
8132c8dcc5
|
@ -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:
|
||||
|
|
|
@ -4,7 +4,7 @@ const RULER_WIDTH := 16
|
|||
|
||||
var font := preload("res://Assets/Fonts/Roboto-Small.tres")
|
||||
var major_subdivision := 2
|
||||
var minor_subdivision := 5
|
||||
var minor_subdivision := 4
|
||||
|
||||
var first : Vector2
|
||||
var last : Vector2
|
||||
|
|
|
@ -132,7 +132,7 @@ func _ready() -> void:
|
|||
if err == OK:
|
||||
image.convert(Image.FORMAT_RGBA8)
|
||||
Global.custom_brushes.append(image)
|
||||
Global.create_brush_button(image, Global.BRUSH_TYPES.FILE)
|
||||
Global.create_brush_button(image, Global.BRUSH_TYPES.FILE, file)
|
||||
file = brushes_dir.get_next()
|
||||
brushes_dir.list_dir_end()
|
||||
Global.brushes_from_files = Global.custom_brushes.size()
|
||||
|
|
|
@ -4,7 +4,7 @@ const RULER_WIDTH := 16
|
|||
|
||||
var font := preload("res://Assets/Fonts/Roboto-Small.tres")
|
||||
var major_subdivision := 2
|
||||
var minor_subdivision := 5
|
||||
var minor_subdivision := 4
|
||||
|
||||
var first : Vector2
|
||||
var last : Vector2
|
||||
|
|
Loading…
Reference in a new issue