mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:54:44 -04:00
Updated custom tool cursors & changed rectangle selection tool
- Also fixed a small translation bug with the menu items, for real this time - Fixed a bug with the brush color not being updated when using the custom color picker tool - The pixel indicators only appear for Pencil, Eraser and LightenDarken tools - Small UI margin changes.
This commit is contained in:
parent
1bd8ec4ae0
commit
719d29526f
10 changed files with 84 additions and 65 deletions
|
@ -241,8 +241,10 @@ func _process(delta : float) -> void:
|
|||
var pixel_color : Color = layers[current_layer_index][0].get_pixelv(mouse_pos)
|
||||
if current_mouse_button == "left_mouse":
|
||||
Global.left_color_picker.color = pixel_color
|
||||
Global.update_left_custom_brush()
|
||||
elif current_mouse_button == "right_mouse":
|
||||
Global.right_color_picker.color = pixel_color
|
||||
Global.update_right_custom_brush()
|
||||
|
||||
if !is_making_line:
|
||||
previous_mouse_pos = mouse_pos
|
||||
|
@ -408,9 +410,10 @@ func _draw() -> void:
|
|||
mouse_pos = mouse_pos.floor()
|
||||
if Global.left_square_indicator_visible and Global.can_draw:
|
||||
if Global.current_left_brush_type == Global.BRUSH_TYPES.PIXEL:
|
||||
var start_pos_x = mouse_pos.x - (Global.left_brush_size >> 1)
|
||||
var start_pos_y = mouse_pos.y - (Global.left_brush_size >> 1)
|
||||
draw_rect(Rect2(start_pos_x, start_pos_y, Global.left_brush_size, Global.left_brush_size), Color.blue, false)
|
||||
if Global.current_left_tool == "Pencil" || Global.current_left_tool == "Eraser" || Global.current_left_tool == "LightenDarken":
|
||||
var start_pos_x = mouse_pos.x - (Global.left_brush_size >> 1)
|
||||
var start_pos_y = mouse_pos.y - (Global.left_brush_size >> 1)
|
||||
draw_rect(Rect2(start_pos_x, start_pos_y, Global.left_brush_size, Global.left_brush_size), Color.blue, false)
|
||||
else:
|
||||
if Global.current_left_tool == "Pencil" || Global.current_left_tool == "Eraser":
|
||||
var custom_brush_size = Global.custom_left_brush_image.get_size() - Vector2.ONE
|
||||
|
@ -419,9 +422,10 @@ func _draw() -> void:
|
|||
|
||||
if Global.right_square_indicator_visible and Global.can_draw:
|
||||
if Global.current_right_brush_type == Global.BRUSH_TYPES.PIXEL:
|
||||
var start_pos_x = mouse_pos.x - (Global.right_brush_size >> 1)
|
||||
var start_pos_y = mouse_pos.y - (Global.right_brush_size >> 1)
|
||||
draw_rect(Rect2(start_pos_x, start_pos_y, Global.right_brush_size, Global.right_brush_size), Color.red, false)
|
||||
if Global.current_right_tool == "Pencil" || Global.current_right_tool == "Eraser" || Global.current_left_tool == "LightenDarken":
|
||||
var start_pos_x = mouse_pos.x - (Global.right_brush_size >> 1)
|
||||
var start_pos_y = mouse_pos.y - (Global.right_brush_size >> 1)
|
||||
draw_rect(Rect2(start_pos_x, start_pos_y, Global.right_brush_size, Global.right_brush_size), Color.red, false)
|
||||
else:
|
||||
if Global.current_right_tool == "Pencil" || Global.current_right_tool == "Eraser":
|
||||
var custom_brush_size = Global.custom_right_brush_image.get_size() - Vector2.ONE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue