mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Make the right tool indicator enabled by default and orange, closes #691
This commit is contained in:
parent
7bcae8e743
commit
cb4c54617a
|
@ -80,6 +80,8 @@ var modulate_icon_color := Color.gray
|
|||
var icon_color_from: int = IconColorFrom.THEME
|
||||
var custom_icon_color := Color.gray
|
||||
var tool_button_size: int = ButtonSize.SMALL
|
||||
var left_tool_color := Color("0086cf")
|
||||
var right_tool_color := Color("fd6d14")
|
||||
|
||||
var default_width := 64
|
||||
var default_height := 64
|
||||
|
@ -117,7 +119,7 @@ var enable_autosave := true
|
|||
var show_left_tool_icon := true
|
||||
var show_right_tool_icon := true
|
||||
var left_square_indicator_visible := true
|
||||
var right_square_indicator_visible := false
|
||||
var right_square_indicator_visible := true
|
||||
var native_cursors := false
|
||||
var cross_cursor := true
|
||||
|
||||
|
|
|
@ -361,10 +361,10 @@ func update_tool_cursors() -> void:
|
|||
|
||||
|
||||
func draw_indicator() -> void:
|
||||
if Global.left_square_indicator_visible:
|
||||
_slots[BUTTON_LEFT].tool_node.draw_indicator()
|
||||
if Global.right_square_indicator_visible:
|
||||
_slots[BUTTON_RIGHT].tool_node.draw_indicator()
|
||||
_slots[BUTTON_RIGHT].tool_node.draw_indicator(false)
|
||||
if Global.left_square_indicator_visible:
|
||||
_slots[BUTTON_LEFT].tool_node.draw_indicator(true)
|
||||
|
||||
|
||||
func draw_preview() -> void:
|
||||
|
|
|
@ -63,9 +63,10 @@ func cursor_move(position: Vector2) -> void:
|
|||
_cursor = position
|
||||
|
||||
|
||||
func draw_indicator() -> void:
|
||||
func draw_indicator(left: bool) -> void:
|
||||
var rect := Rect2(_cursor, Vector2.ONE)
|
||||
Global.canvas.indicators.draw_rect(rect, Color.blue, false)
|
||||
var color := Global.left_tool_color if left else Global.right_tool_color
|
||||
Global.canvas.indicators.draw_rect(rect, color, false)
|
||||
|
||||
|
||||
func draw_preview() -> void:
|
||||
|
|
|
@ -403,8 +403,9 @@ func remove_unselected_parts_of_brush(brush: Image, dst: Vector2) -> Image:
|
|||
return new_brush
|
||||
|
||||
|
||||
func draw_indicator() -> void:
|
||||
draw_indicator_at(_cursor, Vector2.ZERO, Color.blue)
|
||||
func draw_indicator(left: bool) -> void:
|
||||
var color := Global.left_tool_color if left else Global.right_tool_color
|
||||
draw_indicator_at(_cursor, Vector2.ZERO, color)
|
||||
if Global.current_project.tiles.mode and Global.current_project.tiles.has_point(_cursor):
|
||||
var position := _line_start if _draw_line else _cursor
|
||||
var nearest_tile := Global.current_project.tiles.get_nearest_tile(position)
|
||||
|
|
Loading…
Reference in a new issue