mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-05 16:44:50 -04:00
Merge branch 'master' into text-tool
This commit is contained in:
commit
60700ada36
12 changed files with 78 additions and 114 deletions
|
@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). All the dates are in YYYY-MM-DD format.
|
||||
<br><br>
|
||||
|
||||
## [v0.8.1] - Unreleased
|
||||
### Fixed
|
||||
- Fixed crash where Pixelorama could not load a cached sub-resource - [Issue #339](https://github.com/Orama-Interactive/Pixelorama/issues/339)
|
||||
- When moving tabs, the projects now move along with their respective tabs.
|
||||
- Fixed crash where the animation was playing in the mini canvas preview and then the user switched to a project with less frames.
|
||||
<br><br>
|
||||
|
||||
## [v0.8] - 2020-09-23
|
||||
This update has been brought to you by the contributions of:
|
||||
Darshan Phaldesai (luiq54), Igor Santarek (jegor377), rob-a-bolton, Kinwailo, Michael Alexsander (YeldhamDev), Hugo Locurcio (Calinou), Martin Novák (novhack), Xenofon Konitsas (huskeee), Matthew Paul (matthewpaul-us)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 278 B |
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/brush_button.png-0b48fdf92244c3ba0a09c555ed4b642d.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/brush_button.png"
|
||||
dest_files=[ "res://.import/brush_button.png-0b48fdf92244c3ba0a09c555ed4b642d.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
|
@ -113,7 +113,7 @@ boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 )
|
|||
config/icon="res://assets/graphics/icons/icon.png"
|
||||
config/macos_native_icon="res://assets/graphics/icons/icon.icns"
|
||||
config/windows_native_icon="res://assets/graphics/icons/icon.ico"
|
||||
config/Version="v0.8-stable"
|
||||
config/Version="v0.8.1-dev"
|
||||
|
||||
[audio]
|
||||
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/graphics/brush_button.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/Tools/Base.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://src/Tools/Bucket.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
anti_aliasing = false
|
||||
|
||||
[node name="ToolOptions" instance=ExtResource( 2 )]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
|
@ -56,14 +64,17 @@ margin_right = 108.0
|
|||
margin_bottom = 208.0
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="Type" type="TextureButton" parent="FillPattern" index="0"]
|
||||
[node name="Type" type="Button" parent="FillPattern" index="0"]
|
||||
margin_left = 27.0
|
||||
margin_right = 59.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
hint_tooltip = "Select a brush"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = ExtResource( 1 )
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="FillPattern/Type" index="0"]
|
||||
margin_right = 32.0
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/graphics/brush_button.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/Tools/Base.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://src/Tools/Draw.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
anti_aliasing = false
|
||||
|
||||
[node name="ToolOptions" instance=ExtResource( 2 )]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
|
@ -13,15 +21,17 @@ margin_right = 116.0
|
|||
margin_bottom = 50.0
|
||||
alignment = 1
|
||||
|
||||
[node name="Type" type="TextureButton" parent="Brush" index="0"]
|
||||
margin_left = 1.0
|
||||
margin_right = 37.0
|
||||
[node name="Type" type="Button" parent="Brush" index="0"]
|
||||
margin_left = 3.0
|
||||
margin_right = 35.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 36, 32 )
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
hint_tooltip = "Select a brush"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
texture_normal = ExtResource( 1 )
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="Brush/Type" index="0"]
|
||||
margin_right = 32.0
|
||||
|
@ -33,8 +43,8 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="Size" type="SpinBox" parent="Brush" index="1"]
|
||||
margin_left = 41.0
|
||||
margin_right = 115.0
|
||||
margin_left = 39.0
|
||||
margin_right = 113.0
|
||||
margin_bottom = 32.0
|
||||
mouse_default_cursor_shape = 2
|
||||
min_value = 1.0
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,9 @@ onready var animation_timer : Timer = $AnimationTimer
|
|||
|
||||
func _draw() -> void:
|
||||
var current_project : Project = Global.current_project
|
||||
if frame >= current_project.frames.size():
|
||||
frame = current_project.current_frame
|
||||
|
||||
$AnimationTimer.wait_time = Global.animation_timer.wait_time
|
||||
|
||||
if animation_timer.is_stopped():
|
||||
|
|
|
@ -1,39 +1,9 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="GDScript" id=1]
|
||||
script/source = "extends Node2D
|
||||
|
||||
|
||||
var frame : int = 0
|
||||
onready var animation_timer : Timer = $AnimationTimer
|
||||
|
||||
func _draw() -> void:
|
||||
var current_project : Project = Global.current_project
|
||||
$AnimationTimer.wait_time = Global.animation_timer.wait_time
|
||||
|
||||
if animation_timer.is_stopped():
|
||||
frame = current_project.current_frame
|
||||
var current_cels : Array = current_project.frames[frame].cels
|
||||
|
||||
# Draw current frame layers
|
||||
for i in range(current_cels.size()):
|
||||
var modulate_color := Color(1, 1, 1, current_cels[i].opacity)
|
||||
if i < current_project.layers.size() and current_project.layers[i].visible:
|
||||
draw_texture(current_cels[i].image_texture, Vector2.ZERO, modulate_color)
|
||||
|
||||
|
||||
func _on_AnimationTimer_timeout() -> void:
|
||||
var current_project : Project = Global.current_project
|
||||
|
||||
if frame < current_project.frames.size() - 1:
|
||||
frame += 1
|
||||
else:
|
||||
frame = 0
|
||||
update()
|
||||
"
|
||||
[ext_resource path="res://src/UI/Canvas/CanvasPreview.gd" type="Script" id=1]
|
||||
|
||||
[node name="CanvasPreview" type="Node2D"]
|
||||
script = SubResource( 1 )
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="AnimationTimer" type="Timer" parent="."]
|
||||
[connection signal="timeout" from="AnimationTimer" to="." method="_on_AnimationTimer_timeout"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extends TextureButton
|
||||
extends BaseButton
|
||||
|
||||
|
||||
var pattern := Patterns.Pattern.new()
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://assets/graphics/brush_button.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/UI/PatternButton.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
anti_aliasing = false
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[node name="PatternButton" type="TextureButton"]
|
||||
[node name="PatternButton" type="Button"]
|
||||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
button_mask = 7
|
||||
texture_normal = ExtResource( 1 )
|
||||
stretch_mode = 5
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PatternTexture" type="TextureRect" parent="."]
|
||||
margin_right = 32.0
|
||||
|
|
|
@ -20,8 +20,8 @@ func _on_Tabs_tab_close(tab : int) -> void:
|
|||
|
||||
func _on_Tabs_reposition_active_tab_request(idx_to : int) -> void:
|
||||
var temp = Global.projects[Global.current_project_index]
|
||||
Global.projects[Global.current_project_index] = Global.projects[idx_to]
|
||||
Global.projects[idx_to] = temp
|
||||
Global.projects.erase(temp)
|
||||
Global.projects.insert(idx_to, temp)
|
||||
|
||||
# Change save paths
|
||||
var temp_save_path = OpenSave.current_save_paths[Global.current_project_index]
|
||||
|
|
Loading…
Add table
Reference in a new issue