mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 10:34:43 -04:00
Added "Test" GitHub Actions Workflow (#269)
* Remove export_presets.cfg from gitignore * Create export_presets.cfg * Create godot-ci-export.yml * Test DLL copying to artifact * Test repo cloning and copying files * Attempt to fix directory paths * Fix directory paths again * Remove export paths from export_presets.cfg * Fix inferring script error * Attempt to fix script error in Global.gd This and the previous error in Input.gd only happened in the builds generated by GH Actions. * Attempting to fix another error in Global.gd * Checkout with submodules * Added pixelorama folder to Linux build And renamed "windows" to "windows-64bit" and "linux" to "linux-64bit" directories. * Renamed artifacts * Added emojis to step names * Emojis for job names * Removed --recurse-submodules from git clone * Attempt to copy pixelorama folder to Mac's zip * Revert previous commit * Update and rename godot-ci-export.yml to godot-ci-test.yml
This commit is contained in:
parent
8bb1e61d8f
commit
4f0c0d77c5
5 changed files with 338 additions and 13 deletions
|
@ -249,10 +249,22 @@ func _ready() -> void:
|
|||
left_cursor = find_node_by_name(root, "LeftCursor")
|
||||
right_cursor = find_node_by_name(root, "RightCursor")
|
||||
canvas = find_node_by_name(root, "Canvas")
|
||||
|
||||
var pencil_cursor_image = preload("res://assets/graphics/cursor_icons/pencil_cursor.png")
|
||||
var eraser_cursor_image = preload("res://assets/graphics/cursor_icons/eraser_cursor.png")
|
||||
|
||||
left_cursor_tool_texture = ImageTexture.new()
|
||||
left_cursor_tool_texture.create_from_image(preload("res://assets/graphics/cursor_icons/pencil_cursor.png"))
|
||||
if pencil_cursor_image is Image:
|
||||
left_cursor_tool_texture.create_from_image(pencil_cursor_image)
|
||||
elif pencil_cursor_image is ImageTexture:
|
||||
left_cursor_tool_texture.create_from_image(pencil_cursor_image.get_data())
|
||||
|
||||
right_cursor_tool_texture = ImageTexture.new()
|
||||
right_cursor_tool_texture.create_from_image(preload("res://assets/graphics/cursor_icons/eraser_cursor.png"))
|
||||
if eraser_cursor_image is Image:
|
||||
right_cursor_tool_texture.create_from_image(eraser_cursor_image)
|
||||
elif eraser_cursor_image is ImageTexture:
|
||||
right_cursor_tool_texture.create_from_image(eraser_cursor_image.get_data())
|
||||
|
||||
tabs = find_node_by_name(root, "Tabs")
|
||||
main_viewport = find_node_by_name(root, "ViewportContainer")
|
||||
second_viewport = find_node_by_name(root, "ViewportContainer2")
|
||||
|
@ -648,19 +660,27 @@ func redo_custom_brush(_brush_button : BaseButton = null) -> void:
|
|||
func update_custom_brush(mouse_button : int) -> void:
|
||||
var brush_type : int = current_brush_types[mouse_button]
|
||||
if brush_type == Brush_Types.PIXEL:
|
||||
var pixel := Image.new()
|
||||
pixel = preload("res://assets/graphics/pixel_image.png")
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
|
||||
var pixel = preload("res://assets/graphics/pixel_image.png")
|
||||
if pixel is Image:
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
|
||||
elif pixel is ImageTexture:
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel.get_data(), 0)
|
||||
elif brush_type == Brush_Types.CIRCLE:
|
||||
var pixel := Image.new()
|
||||
pixel = preload("res://assets/graphics/circle_9x9.png")
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
|
||||
var pixel = preload("res://assets/graphics/circle_9x9.png")
|
||||
if pixel is Image:
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
|
||||
elif pixel is ImageTexture:
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel.get_data(), 0)
|
||||
|
||||
left_circle_points = plot_circle(brush_sizes[0])
|
||||
right_circle_points = plot_circle(brush_sizes[1])
|
||||
elif brush_type == Brush_Types.FILLED_CIRCLE:
|
||||
var pixel := Image.new()
|
||||
pixel = preload("res://assets/graphics/circle_filled_9x9.png")
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
|
||||
var pixel = preload("res://assets/graphics/circle_filled_9x9.png")
|
||||
if pixel is Image:
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel, 0)
|
||||
elif pixel is ImageTexture:
|
||||
brush_type_buttons[mouse_button].get_child(0).texture.create_from_image(pixel.get_data(), 0)
|
||||
|
||||
left_circle_points = plot_circle(brush_sizes[0])
|
||||
right_circle_points = plot_circle(brush_sizes[1])
|
||||
else:
|
||||
|
|
|
@ -109,7 +109,7 @@ func add_randomised_brush(fpaths : Array, tooltip_name : String) -> void:
|
|||
var first_image : Image = loaded_images.pop_front()
|
||||
|
||||
# The index which this random brush will be at
|
||||
var next_random_brush_index := Global.file_brush_container.get_child_count()
|
||||
var next_random_brush_index : int = Global.file_brush_container.get_child_count()
|
||||
|
||||
Global.file_brushes.append(first_image)
|
||||
Global.create_brush_button(first_image, Global.Brush_Types.RANDOM_FILE, tooltip_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue