mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-07-06 19:24:42 -04:00
Merge branch 'master' into text-tool
This commit is contained in:
commit
6d3ba287dd
60 changed files with 13774 additions and 12168 deletions
|
@ -68,15 +68,16 @@ func external_export() -> void:
|
|||
|
||||
|
||||
func process_frame() -> void:
|
||||
processed_images.clear()
|
||||
var frame = Global.current_project.frames[frame_number - 1]
|
||||
var image := Image.new()
|
||||
image.create(Global.current_project.size.x, Global.current_project.size.y, false, Image.FORMAT_RGBA8)
|
||||
blend_layers(image, frame)
|
||||
processed_images.clear()
|
||||
processed_images.append(image)
|
||||
|
||||
|
||||
func process_spritesheet() -> void:
|
||||
processed_images.clear()
|
||||
# Range of frames determined by tags
|
||||
var frames := []
|
||||
if frame_current_tag > 0:
|
||||
|
@ -98,7 +99,6 @@ func process_spritesheet() -> void:
|
|||
|
||||
var whole_image := Image.new()
|
||||
whole_image.create(width, height, false, Image.FORMAT_RGBA8)
|
||||
whole_image.lock()
|
||||
var origin := Vector2.ZERO
|
||||
var hh := 0
|
||||
var vv := 0
|
||||
|
@ -124,7 +124,6 @@ func process_spritesheet() -> void:
|
|||
origin.x = Global.current_project.size.x * vv
|
||||
blend_layers(whole_image, frame, origin)
|
||||
|
||||
processed_images.clear()
|
||||
processed_images.append(whole_image)
|
||||
|
||||
|
||||
|
@ -185,14 +184,12 @@ func export_processed_images(ignore_overwrites: bool, export_dialog: AcceptDialo
|
|||
gif_export_thread.start(self, "export_gif", {"export_dialog": export_dialog, "export_paths": export_paths})
|
||||
else:
|
||||
for i in range(processed_images.size()):
|
||||
processed_images[i].unlock()
|
||||
if OS.get_name() == "HTML5":
|
||||
Html5FileExchange.save_image(processed_images[i], export_paths[i].get_file())
|
||||
else:
|
||||
var err = processed_images[i].save_png(export_paths[i])
|
||||
if err != OK:
|
||||
OS.alert("Can't save file. Error code: %s" % err)
|
||||
processed_images[i].lock()
|
||||
|
||||
# Store settings for quick export and when the dialog is opened again
|
||||
was_exported = true
|
||||
|
@ -321,6 +318,7 @@ func blend_layers(image : Image, frame : Frame, origin : Vector2 = Vector2(0, 0)
|
|||
var alpha : float = pixel_color.a * cel.opacity
|
||||
cel_image.set_pixel(xx, yy, Color(pixel_color.r, pixel_color.g, pixel_color.b, alpha))
|
||||
image.blend_rect(cel_image, Rect2(Global.canvas.location, Global.current_project.size), origin)
|
||||
cel_image.unlock()
|
||||
layer_i += 1
|
||||
image.unlock()
|
||||
|
||||
|
|
|
@ -139,6 +139,8 @@ var tag_container : Control
|
|||
var tag_dialog : AcceptDialog
|
||||
|
||||
var remove_frame_button : BaseButton
|
||||
var move_left_frame_button : BaseButton
|
||||
var move_right_frame_button : BaseButton
|
||||
|
||||
var remove_layer_button : BaseButton
|
||||
var move_up_layer_button : BaseButton
|
||||
|
@ -233,6 +235,8 @@ func _ready() -> void:
|
|||
tag_dialog = find_node_by_name(animation_timeline, "FrameTagDialog")
|
||||
|
||||
remove_frame_button = find_node_by_name(animation_timeline, "DeleteFrame")
|
||||
move_left_frame_button = find_node_by_name(animation_timeline, "MoveLeft")
|
||||
move_right_frame_button = find_node_by_name(animation_timeline, "MoveRight")
|
||||
|
||||
remove_layer_button = find_node_by_name(animation_timeline, "RemoveLayer")
|
||||
move_up_layer_button = find_node_by_name(animation_timeline, "MoveUpLayer")
|
||||
|
|
|
@ -53,7 +53,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void:
|
|||
err = file.open(path, File.READ) # If the file is not compressed open it raw (pre-v0.7)
|
||||
|
||||
if err != OK:
|
||||
Global.notification_label("File failed to open")
|
||||
Global.notification_label(tr("File failed to open. Error code %s") % err)
|
||||
file.close()
|
||||
return
|
||||
|
||||
|
@ -317,7 +317,7 @@ func save_pxo_file(path : String, autosave : bool, use_zstd_compression := true,
|
|||
Global.file_menu.get_popup().set_item_text(3, tr("Save") + " %s" % path.get_file())
|
||||
|
||||
else:
|
||||
Global.notification_label("File failed to save")
|
||||
Global.notification_label(tr("File failed to save. Error code %s") % err)
|
||||
file.close()
|
||||
|
||||
|
||||
|
|
|
@ -136,6 +136,8 @@ func change_project() -> void:
|
|||
Global.current_frame_mark_label.text = "%s/%s" % [str(current_frame + 1), frames.size()]
|
||||
|
||||
Global.disable_button(Global.remove_frame_button, frames.size() == 1)
|
||||
Global.disable_button(Global.move_left_frame_button, frames.size() == 1 or current_frame == 0)
|
||||
Global.disable_button(Global.move_right_frame_button, frames.size() == 1 or current_frame == frames.size() - 1)
|
||||
toggle_layer_buttons_layers()
|
||||
toggle_layer_buttons_current_layer()
|
||||
|
||||
|
@ -436,6 +438,8 @@ func frame_changed(value : int) -> void:
|
|||
layers[current_layer].frame_container.get_child(current_frame).pressed = true
|
||||
|
||||
Global.disable_button(Global.remove_frame_button, frames.size() == 1)
|
||||
Global.disable_button(Global.move_left_frame_button, frames.size() == 1 or current_frame == 0)
|
||||
Global.disable_button(Global.move_right_frame_button, frames.size() == 1 or current_frame == frames.size() - 1)
|
||||
|
||||
Global.canvas.update()
|
||||
Global.transparent_checker._ready() # To update the rect size
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
extends GridContainer
|
||||
|
||||
|
||||
enum {CEL, FRAME, ALL_FRAMES}
|
||||
|
||||
const palette_button = preload("res://src/Palette/PaletteButton.tscn")
|
||||
|
||||
var current_palette = "Default"
|
||||
var from_palette : Palette
|
||||
|
||||
onready var palette_from_sprite_dialog = $"../../../../PaletteFromSpriteDialog"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_load_palettes()
|
||||
|
@ -117,7 +122,8 @@ func add_palette_menu_id_pressed(id : int) -> void:
|
|||
1: # Import Palette
|
||||
on_import_palette()
|
||||
2: # Create Palette From Current Sprite
|
||||
create_palette_from_sprite()
|
||||
palette_from_sprite_dialog.popup_centered()
|
||||
Global.dialog_open(true)
|
||||
|
||||
|
||||
func create_new_palette(name : String, _from_palette : Palette) -> String: # Returns empty string, else error string
|
||||
|
@ -188,18 +194,51 @@ func create_palette_from_sprite() -> void:
|
|||
Global.error_dialog.set_text(result)
|
||||
Global.error_dialog.popup_centered()
|
||||
Global.dialog_open(true)
|
||||
else:
|
||||
var current_cel : Cel = current_project.frames[current_project.current_frame].cels[current_project.current_layer]
|
||||
var cel_image : Image = current_cel.image
|
||||
var palette : Palette = Global.palettes[current_palette]
|
||||
for x in cel_image.get_size().x:
|
||||
for y in cel_image.get_size().y:
|
||||
var color : Color = cel_image.get_pixel(x, y)
|
||||
if color.a > 0 and !palette.has_color(color):
|
||||
palette.add_color(color)
|
||||
return
|
||||
|
||||
save_palette(current_palette, current_palette + ".json")
|
||||
_display_palette(palette)
|
||||
var alpha_checkbox : CheckBox = palette_from_sprite_dialog.get_node("VBoxContainer/AlphaCheckBox")
|
||||
var selection_checkbox : CheckBox = palette_from_sprite_dialog.get_node("VBoxContainer/SelectionCheckBox")
|
||||
var colors_from_optionbutton : OptionButton = palette_from_sprite_dialog.get_node("VBoxContainer/HBoxContainer/ColorsFromOptionButton")
|
||||
|
||||
var palette : Palette = Global.palettes[current_palette]
|
||||
var pixels := []
|
||||
|
||||
if selection_checkbox.pressed:
|
||||
pixels = current_project.selected_pixels.duplicate()
|
||||
else:
|
||||
for x in current_project.size.x:
|
||||
for y in current_project.size.y:
|
||||
pixels.append(Vector2(x, y))
|
||||
|
||||
var cels := []
|
||||
match colors_from_optionbutton.selected:
|
||||
CEL:
|
||||
cels.append(current_project.frames[current_project.current_frame].cels[current_project.current_layer])
|
||||
FRAME:
|
||||
for cel in current_project.frames[current_project.current_frame].cels:
|
||||
cels.append(cel)
|
||||
ALL_FRAMES:
|
||||
for frame in current_project.frames:
|
||||
for cel in frame.cels:
|
||||
cels.append(cel)
|
||||
|
||||
for cel in cels:
|
||||
var cel_image := Image.new()
|
||||
cel_image.copy_from(cel.image)
|
||||
cel_image.lock()
|
||||
if cel_image.is_invisible():
|
||||
continue
|
||||
for i in pixels:
|
||||
var color : Color = cel_image.get_pixelv(i)
|
||||
if color.a > 0:
|
||||
if !alpha_checkbox.pressed:
|
||||
color.a = 1
|
||||
if !palette.has_color(color):
|
||||
palette.add_color(color)
|
||||
cel_image.unlock()
|
||||
|
||||
save_palette(current_palette, current_palette + ".json")
|
||||
_display_palette(palette)
|
||||
|
||||
|
||||
func _on_PaletteOptionButton_item_selected(ID : int) -> void:
|
||||
|
@ -373,3 +412,11 @@ func _on_NewPaletteDialog_popup_hide() -> void:
|
|||
|
||||
func _on_RemovePalette_pressed() -> void:
|
||||
remove_palette(current_palette)
|
||||
|
||||
|
||||
func _on_PaletteFromSpriteDialog_confirmed() -> void:
|
||||
create_palette_from_sprite()
|
||||
|
||||
|
||||
func _on_PaletteFromSpriteDialog_popup_hide() -> void:
|
||||
Global.dialog_open(false)
|
||||
|
|
|
@ -190,6 +190,60 @@ margin_left = 7.0
|
|||
margin_top = 7.0
|
||||
margin_right = 607.0
|
||||
margin_bottom = 577.0
|
||||
|
||||
[node name="PaletteFromSpriteDialog" type="ConfirmationDialog" parent="."]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 281.0
|
||||
margin_bottom = 127.0
|
||||
window_title = "Create Palette From Current Sprite"
|
||||
resizable = true
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PaletteFromSpriteDialog"]
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 266.0
|
||||
margin_bottom = 84.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AlphaCheckBox" type="CheckBox" parent="PaletteFromSpriteDialog/VBoxContainer"]
|
||||
margin_right = 258.0
|
||||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
pressed = true
|
||||
text = "Create colors with alpha component"
|
||||
|
||||
[node name="SelectionCheckBox" type="CheckBox" parent="PaletteFromSpriteDialog/VBoxContainer"]
|
||||
margin_top = 28.0
|
||||
margin_right = 258.0
|
||||
margin_bottom = 52.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Get colors only from selection"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="PaletteFromSpriteDialog/VBoxContainer"]
|
||||
margin_top = 56.0
|
||||
margin_right = 258.0
|
||||
margin_bottom = 76.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="PaletteFromSpriteDialog/VBoxContainer/HBoxContainer"]
|
||||
margin_top = 3.0
|
||||
margin_right = 104.0
|
||||
margin_bottom = 17.0
|
||||
text = "Get colors from:"
|
||||
|
||||
[node name="ColorsFromOptionButton" type="OptionButton" parent="PaletteFromSpriteDialog/VBoxContainer/HBoxContainer"]
|
||||
margin_left = 108.0
|
||||
margin_right = 207.0
|
||||
margin_bottom = 20.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Current cel"
|
||||
items = [ "Current cel", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null ]
|
||||
selected = 0
|
||||
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"]
|
||||
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"]
|
||||
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/RemovePalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_RemovePalette_pressed"]
|
||||
|
@ -198,3 +252,5 @@ margin_bottom = 577.0
|
|||
[connection signal="popup_hide" from="NewPaletteDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_NewPaletteDialog_popup_hide"]
|
||||
[connection signal="file_selected" from="PaletteImportFileDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_palette_import_file_selected"]
|
||||
[connection signal="popup_hide" from="PaletteImportFileDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_NewPaletteDialog_popup_hide"]
|
||||
[connection signal="confirmed" from="PaletteFromSpriteDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteFromSpriteDialog_confirmed"]
|
||||
[connection signal="popup_hide" from="PaletteFromSpriteDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteFromSpriteDialog_popup_hide"]
|
||||
|
|
|
@ -7,9 +7,10 @@ onready var themes := [
|
|||
[preload("res://assets/themes/blue/theme.tres"), "Blue"],
|
||||
[preload("res://assets/themes/caramel/theme.tres"), "Caramel"],
|
||||
[preload("res://assets/themes/light/theme.tres"), "Light"],
|
||||
[preload("res://assets/themes/purple/theme.tres"), "Purple"],
|
||||
]
|
||||
onready var buttons_container : BoxContainer = $ThemeButtons
|
||||
onready var colors_container : BoxContainer = $ThemeColors
|
||||
onready var colors_container : BoxContainer = $ThemeColorsSpacer/ThemeColors
|
||||
onready var theme_color_preview_scene = preload("res://src/Preferences/ThemeColorPreview.tscn")
|
||||
|
||||
|
||||
|
@ -59,12 +60,18 @@ func change_theme(ID : int) -> void:
|
|||
Global.theme_type = Global.Theme_Types.CARAMEL
|
||||
elif ID == 4: # Light Theme
|
||||
Global.theme_type = Global.Theme_Types.LIGHT
|
||||
elif ID == 5: # Purple Theme
|
||||
Global.theme_type = Global.Theme_Types.DARK
|
||||
|
||||
Global.control.theme = main_theme
|
||||
Global.control.theme.default_font = font
|
||||
Global.default_clear_color = main_theme.get_stylebox("panel", "PanelContainer").bg_color
|
||||
VisualServer.set_default_clear_color(Color(Global.default_clear_color))
|
||||
|
||||
(Global.animation_timeline.get_stylebox("panel", "Panel") as StyleBoxFlat).bg_color = main_theme.get_stylebox("panel", "Panel").bg_color
|
||||
var fake_vsplit_grabber : TextureRect = Global.find_node_by_name(Global.animation_timeline, "FakeVSplitContainerGrabber")
|
||||
fake_vsplit_grabber.texture = main_theme.get_icon("grabber", "VSplitContainer")
|
||||
|
||||
var layer_button_panel_container : PanelContainer = Global.find_node_by_name(Global.animation_timeline, "LayerButtonPanelContainer")
|
||||
(layer_button_panel_container.get_stylebox("panel", "PanelContainer") as StyleBoxFlat).bg_color = Global.default_clear_color
|
||||
|
||||
|
@ -80,13 +87,6 @@ func change_theme(ID : int) -> void:
|
|||
Global.vertical_ruler.add_stylebox_override("hover", ruler_style)
|
||||
Global.vertical_ruler.add_stylebox_override("focus", ruler_style)
|
||||
|
||||
var fake_vsplit_grabber : TextureRect = Global.find_node_by_name(Global.animation_timeline, "FakeVSplitContainerGrabber")
|
||||
|
||||
if Global.theme_type == Global.Theme_Types.DARK or Global.theme_type == Global.Theme_Types.BLUE:
|
||||
fake_vsplit_grabber.texture = preload("res://assets/themes/dark/icons/vsplit.png")
|
||||
else:
|
||||
fake_vsplit_grabber.texture = preload("res://assets/themes/light/icons/vsplit.png")
|
||||
|
||||
for button in get_tree().get_nodes_in_group("UIButtons"):
|
||||
if button is TextureButton:
|
||||
var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/")
|
||||
|
|
|
@ -113,20 +113,23 @@ text = "System Language"
|
|||
|
||||
[node name="Themes" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
visible = false
|
||||
margin_top = 28.0
|
||||
margin_right = 498.0
|
||||
margin_bottom = 164.0
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="ThemeButtons" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_right = 80.0
|
||||
margin_bottom = 136.0
|
||||
|
||||
[node name="ThemeColors" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_left = 84.0
|
||||
margin_right = 134.0
|
||||
margin_bottom = 136.0
|
||||
custom_constants/separation = 6
|
||||
[node name="ThemeColorsSpacer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="Control" type="Control" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes/ThemeColorsSpacer"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="ThemeColors" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes/ThemeColorsSpacer"]
|
||||
margin_left = 4.0
|
||||
margin_right = 4.0
|
||||
custom_constants/separation = 12
|
||||
|
||||
[node name="Canvas" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||
visible = false
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
]]
|
||||
margin_right = 16.0
|
||||
margin_bottom = 16.0
|
||||
size_flags_vertical = 4
|
||||
disabled = true
|
||||
texture_normal = ExtResource( 1 )
|
||||
texture_disabled = SubResource( 1 )
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
[node name="ThemeColorPreview" type="ColorRect"]
|
||||
margin_right = 50.0
|
||||
margin_bottom = 14.0
|
||||
rect_min_size = Vector2( 50, 14 )
|
||||
rect_min_size = Vector2( 50, 16 )
|
||||
color = Color( 0.380392, 0.384314, 0.380392, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
@ -116,6 +116,26 @@ func copy() -> void:
|
|||
project.brushes.append(brush)
|
||||
Brushes.add_project_brush(brush)
|
||||
|
||||
func cut() -> void: # This is basically the same as copy + delete
|
||||
if _selected_rect.has_no_area():
|
||||
return
|
||||
|
||||
var undo_data = _get_undo_data(true)
|
||||
var project := Global.current_project
|
||||
var image : Image = project.frames[project.current_frame].cels[project.current_layer].image
|
||||
var size := _selected_rect.size
|
||||
var rect = Rect2(Vector2.ZERO, size)
|
||||
_clipboard = image.get_rect(_selected_rect)
|
||||
if _clipboard.is_invisible():
|
||||
return
|
||||
|
||||
_clear_image.resize(size.x, size.y, Image.INTERPOLATE_NEAREST)
|
||||
var brush = _clipboard.get_rect(_clipboard.get_used_rect())
|
||||
project.brushes.append(brush)
|
||||
Brushes.add_project_brush(brush)
|
||||
move_end() # The selection_rectangle can be used while is moving, this prevents malfunctioning
|
||||
image.blit_rect(_clear_image, rect, _selected_rect.position)
|
||||
commit_undo("Draw", undo_data)
|
||||
|
||||
func paste() -> void:
|
||||
if _clipboard.get_size() <= Vector2.ZERO:
|
||||
|
@ -127,6 +147,7 @@ func paste() -> void:
|
|||
var size := _selected_rect.size
|
||||
var rect = Rect2(Vector2.ZERO, size)
|
||||
image.blend_rect(_clipboard, rect, _selected_rect.position)
|
||||
move_end() # The selection_rectangle can be used while is moving, this prevents malfunctioning
|
||||
commit_undo("Draw", undo_data)
|
||||
|
||||
|
||||
|
@ -138,6 +159,7 @@ func delete() -> void:
|
|||
var rect = Rect2(Vector2.ZERO, size)
|
||||
_clear_image.resize(size.x, size.y, Image.INTERPOLATE_NEAREST)
|
||||
image.blit_rect(_clear_image, rect, _selected_rect.position)
|
||||
move_end() # The selection_rectangle can be used while is moving, this prevents malfunctioning
|
||||
commit_undo("Draw", undo_data)
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[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=2]
|
||||
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
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
|
@ -72,9 +81,11 @@ rect_min_size = Vector2( 32, 32 )
|
|||
hint_tooltip = "Select a brush"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 4
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
custom_styles/hover = SubResource( 2 )
|
||||
custom_styles/pressed = SubResource( 2 )
|
||||
custom_styles/focus = SubResource( 1 )
|
||||
custom_styles/disabled = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 2 )
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="FillPattern/Type" index="0"]
|
||||
margin_right = 32.0
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[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=2]
|
||||
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
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
|
@ -29,9 +38,11 @@ rect_min_size = Vector2( 32, 32 )
|
|||
hint_tooltip = "Select a brush"
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
custom_styles/hover = SubResource( 2 )
|
||||
custom_styles/pressed = SubResource( 2 )
|
||||
custom_styles/focus = SubResource( 1 )
|
||||
custom_styles/disabled = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 2 )
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="Brush/Type" index="0"]
|
||||
margin_right = 32.0
|
||||
|
|
|
@ -17,6 +17,8 @@ margin_bottom = 32.0
|
|||
rect_min_size = Vector2( 32, 32 )
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/focus = SubResource( 1 )
|
||||
custom_styles/disabled = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
button_mask = 7
|
||||
script = ExtResource( 2 )
|
||||
|
|
|
@ -35,11 +35,13 @@ func _input(_event : InputEvent):
|
|||
if has_focus and visible:
|
||||
if Input.is_action_pressed("left_mouse"):
|
||||
if type == Types.HORIZONTAL:
|
||||
points[0].y = round(mouse_pos.y)
|
||||
points[1].y = round(mouse_pos.y)
|
||||
var yy = stepify(mouse_pos.y, 0.5)
|
||||
points[0].y = yy
|
||||
points[1].y = yy
|
||||
else:
|
||||
points[0].x = round(mouse_pos.x)
|
||||
points[1].x = round(mouse_pos.x)
|
||||
var xx = stepify(mouse_pos.x, 0.5)
|
||||
points[0].x = xx
|
||||
points[1].x = xx
|
||||
if Input.is_action_just_released("left_mouse"):
|
||||
Global.has_focus = true
|
||||
has_focus = false
|
||||
|
@ -53,10 +55,10 @@ func _draw() -> void:
|
|||
var zoom: Vector2 = Global.camera.zoom
|
||||
if type == Types.HORIZONTAL:
|
||||
draw_set_transform(Vector2(Global.camera.offset.x - (viewport_size.x / 2) * zoom.x, points[0].y + font.get_height() * zoom.x * 2), rotation, zoom * 2)
|
||||
draw_string(font, Vector2.ZERO, "%spx" % str(round(mouse_pos.y)))
|
||||
draw_string(font, Vector2.ZERO, "%spx" % str(stepify(mouse_pos.y, 0.5)))
|
||||
else:
|
||||
draw_set_transform(Vector2(points[0].x + font.get_height() * zoom.y, Global.camera.offset.y - (viewport_size.y / 2.25) * zoom.y), rotation, zoom * 2)
|
||||
draw_string(font, Vector2.ZERO, "%spx" % str(round(mouse_pos.x)))
|
||||
draw_string(font, Vector2.ZERO, "%spx" % str(stepify(mouse_pos.x, 0.5)))
|
||||
|
||||
|
||||
func outside_canvas() -> bool:
|
||||
|
|
|
@ -38,12 +38,14 @@ func _ready() -> void:
|
|||
contributors.create_item(contributor_root).set_text(0, " Aaron Franke (aaronfranke)")
|
||||
contributors.create_item(contributor_root).set_text(0, " rob-a-bolton")
|
||||
contributors.create_item(contributor_root).set_text(0, " Vriska Weaver (henlo-birb)")
|
||||
contributors.create_item(contributor_root).set_text(0, " PinyaColada")
|
||||
|
||||
var donors_root := donors.create_item()
|
||||
donors.create_item(donors_root).set_text(0, " pcmxms - https://www.nonamefornowsoft.com.br/")
|
||||
donors.create_item(donors_root).set_text(0, " Mike King")
|
||||
donors.create_item(donors_root).set_text(0, " Guillaume Gautier")
|
||||
donors.create_item(donors_root).set_text(0, " Isambard")
|
||||
donors.create_item(donors_root).set_text(0, " Hugo Locurcio")
|
||||
|
||||
|
||||
func _on_AboutDialog_about_to_show() -> void:
|
||||
|
|
|
@ -15,9 +15,6 @@ func _on_SplashDialog_about_to_show() -> void:
|
|||
var art_by_label : Button = Global.find_node_by_name(self, "ArtistName")
|
||||
var show_on_startup_button : CheckBox = Global.find_node_by_name(self, "ShowOnStartup")
|
||||
var copyright_label : Label = Global.find_node_by_name(self, "CopyrightLabel")
|
||||
var become_platinum : Button = Global.find_node_by_name(self, "BecomePlatinum")
|
||||
var become_gold : Button = Global.find_node_by_name(self, "BecomeGold")
|
||||
var become_patron : Button = Global.find_node_by_name(self, "BecomePatron")
|
||||
|
||||
if Global.config_cache.has_section_key("preferences", "startup"):
|
||||
show_on_startup_button.pressed = !Global.config_cache.get_value("preferences", "startup")
|
||||
|
@ -29,9 +26,6 @@ func _on_SplashDialog_about_to_show() -> void:
|
|||
art_by_label.text = tr("Art by: %s") % chosen_artwork
|
||||
art_by_label.hint_tooltip = artworks[chosen_artwork][1]
|
||||
|
||||
become_platinum.text = "- " + tr("Become a Platinum Sponsor")
|
||||
become_gold.text = "- " + tr("Become a Gold Sponsor")
|
||||
become_patron.text = "- " + tr("Become a Patron")
|
||||
if "zh" in TranslationServer.get_locale():
|
||||
show_on_startup_button.add_font_override("font", preload("res://assets/fonts/CJK/NotoSansCJKtc-Small.tres"))
|
||||
copyright_label.add_font_override("font", preload("res://assets/fonts/CJK/NotoSansCJKtc-Small.tres"))
|
||||
|
@ -62,10 +56,6 @@ func _on_PatreonButton_pressed() -> void:
|
|||
OS.shell_open("https://www.patreon.com/OramaInteractive")
|
||||
|
||||
|
||||
func _on_TakeThisSpot_pressed() -> void:
|
||||
OS.shell_open("https://www.patreon.com/OramaInteractive")
|
||||
|
||||
|
||||
func _on_GithubButton_pressed() -> void:
|
||||
OS.shell_open("https://github.com/Orama-Interactive/Pixelorama")
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ expand_margin_top = 20.0
|
|||
|
||||
[node name="SplashDialog" type="WindowDialog"]
|
||||
margin_right = 640.0
|
||||
margin_bottom = 570.0
|
||||
rect_min_size = Vector2( 640, 572 )
|
||||
margin_bottom = 583.0
|
||||
rect_min_size = Vector2( 640, 583 )
|
||||
custom_styles/panel = SubResource( 1 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
|
@ -112,72 +112,36 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Sponsors" type="HBoxContainer" parent="Contents/ButtonsPatronsLogos/Info"]
|
||||
margin_right = 294.0
|
||||
margin_bottom = 104.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 5
|
||||
|
||||
[node name="PatronContainer" type="VBoxContainer" parent="Contents/ButtonsPatronsLogos/Info/Sponsors"]
|
||||
margin_right = 294.0
|
||||
margin_bottom = 104.0
|
||||
size_flags_horizontal = 3
|
||||
custom_constants/separation = 10
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer"]
|
||||
margin_right = 294.0
|
||||
margin_bottom = 31.0
|
||||
custom_constants/separation = 0
|
||||
|
||||
[node name="SpacerControl" type="Control" parent="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/HBoxContainer"]
|
||||
[node name="SpacerControl" type="Control" parent="Contents/ButtonsPatronsLogos/Info"]
|
||||
margin_right = 6.0
|
||||
margin_bottom = 31.0
|
||||
margin_bottom = 104.0
|
||||
rect_min_size = Vector2( 6, 0 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PatronsLabel" type="Label" parent="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/HBoxContainer"]
|
||||
margin_left = 6.0
|
||||
margin_right = 236.0
|
||||
margin_bottom = 31.0
|
||||
[node name="PatronContainer" type="VBoxContainer" parent="Contents/ButtonsPatronsLogos/Info"]
|
||||
margin_left = 10.0
|
||||
margin_right = 294.0
|
||||
margin_bottom = 104.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="PatronsLabel" type="Label" parent="Contents/ButtonsPatronsLogos/Info/PatronContainer"]
|
||||
margin_right = 284.0
|
||||
margin_bottom = 14.0
|
||||
rect_min_size = Vector2( 230, 0 )
|
||||
size_flags_vertical = 8
|
||||
text = "Want your name or your company to be shown on the splash screen?"
|
||||
text = "Patrons:"
|
||||
autowrap = true
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer"]
|
||||
margin_top = 41.0
|
||||
margin_right = 294.0
|
||||
margin_bottom = 97.0
|
||||
custom_constants/separation = -2
|
||||
|
||||
[node name="BecomePlatinum" type="Button" parent="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/VBoxContainer"]
|
||||
margin_right = 294.0
|
||||
margin_bottom = 20.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "- Become a Platinum Sponsor"
|
||||
flat = true
|
||||
align = 0
|
||||
|
||||
[node name="BecomeGold" type="Button" parent="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/VBoxContainer"]
|
||||
[node name="PatronsLabel2" type="Label" parent="Contents/ButtonsPatronsLogos/Info/PatronContainer"]
|
||||
margin_top = 18.0
|
||||
margin_right = 294.0
|
||||
margin_bottom = 38.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "- Become a Gold Sponsor"
|
||||
flat = true
|
||||
align = 0
|
||||
|
||||
[node name="BecomePatron" type="Button" parent="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/VBoxContainer"]
|
||||
margin_top = 36.0
|
||||
margin_right = 294.0
|
||||
margin_bottom = 56.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "- Become a Patron"
|
||||
flat = true
|
||||
align = 0
|
||||
margin_right = 284.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 230, 0 )
|
||||
size_flags_vertical = 8
|
||||
text = "Hugo Locurcio"
|
||||
autowrap = true
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Contents/ButtonsPatronsLogos/Info"]
|
||||
margin_left = 298.0
|
||||
|
@ -261,9 +225,6 @@ __meta__ = {
|
|||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Buttons/NewBtn" to="." method="_on_NewBtn_pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Buttons/OpenBtn" to="." method="_on_OpenBtn__pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Buttons/OpenLastBtn" to="." method="_on_OpenLastBtn_pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/VBoxContainer/BecomePlatinum" to="." method="_on_TakeThisSpot_pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/VBoxContainer/BecomeGold" to="." method="_on_TakeThisSpot_pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Info/Sponsors/PatronContainer/VBoxContainer/BecomePatron" to="." method="_on_TakeThisSpot_pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Info/VBoxContainer/Branding/Links/GithubButton" to="." method="_on_GithubButton_pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Info/VBoxContainer/Branding/Links/DiscordButton" to="." method="_on_DiscordButton_pressed"]
|
||||
[connection signal="pressed" from="Contents/ButtonsPatronsLogos/Info/VBoxContainer/Branding/Links/PatreonButton" to="." method="_on_PatreonButton_pressed"]
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://src/UI/PatternButton.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=2]
|
||||
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
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
bg_color = Color( 1, 1, 1, 1 )
|
||||
border_color = Color( 1, 1, 1, 1 )
|
||||
|
@ -15,9 +24,11 @@ anti_aliasing = false
|
|||
margin_right = 32.0
|
||||
margin_bottom = 32.0
|
||||
rect_min_size = Vector2( 32, 32 )
|
||||
custom_styles/hover = SubResource( 1 )
|
||||
custom_styles/pressed = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
custom_styles/hover = SubResource( 2 )
|
||||
custom_styles/pressed = SubResource( 2 )
|
||||
custom_styles/focus = SubResource( 1 )
|
||||
custom_styles/disabled = SubResource( 1 )
|
||||
custom_styles/normal = SubResource( 2 )
|
||||
button_mask = 7
|
||||
script = ExtResource( 2 )
|
||||
|
||||
|
|
|
@ -166,6 +166,17 @@ func _on_CopyFrame_pressed(frame := -1) -> void:
|
|||
func _on_FrameTagButton_pressed() -> void:
|
||||
Global.tag_dialog.popup_centered()
|
||||
|
||||
func _on_MoveLeft_pressed() -> void:
|
||||
var frame : int = Global.current_project.current_frame
|
||||
if frame == 0:
|
||||
return
|
||||
Global.current_project.layers[Global.current_project.current_layer].frame_container.get_child(frame).change_frame_order(-1)
|
||||
|
||||
func _on_MoveRight_pressed() -> void:
|
||||
var frame : int = Global.current_project.current_frame
|
||||
if frame == last_frame:
|
||||
return
|
||||
Global.current_project.layers[Global.current_project.current_layer].frame_container.get_child(frame).change_frame_order(1)
|
||||
|
||||
func _on_OnionSkinning_pressed() -> void:
|
||||
Global.onion_skinning = !Global.onion_skinning
|
||||
|
@ -176,7 +187,6 @@ func _on_OnionSkinning_pressed() -> void:
|
|||
else:
|
||||
Global.change_button_texturerect(texture_button, "onion_skinning_off.png")
|
||||
|
||||
|
||||
func _on_OnionSkinningSettings_pressed() -> void:
|
||||
$OnionSkinningSettings.popup(Rect2(Global.onion_skinning_button.rect_global_position.x - $OnionSkinningSettings.rect_size.x - 16, Global.onion_skinning_button.rect_global_position.y - 106, 136, 126))
|
||||
|
||||
|
@ -474,3 +484,4 @@ func _on_OpacitySlider_value_changed(value) -> void:
|
|||
|
||||
func _on_OnionSkinningSettings_popup_hide() -> void:
|
||||
Global.can_draw = true
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
[ext_resource path="res://assets/graphics/dark_themes/layers/move_down_disabled.png" type="Texture" id=5]
|
||||
[ext_resource path="res://assets/graphics/dark_themes/layers/merge_down_disabled.png" type="Texture" id=6]
|
||||
[ext_resource path="res://assets/graphics/dark_themes/layers/clone_layer.png" type="Texture" id=7]
|
||||
[ext_resource path="res://assets/themes/dark/icons/vsplit.png" type="Texture" id=8]
|
||||
[ext_resource path="res://assets/graphics/dark_themes/timeline/move_arrow.png" type="Texture" id=8]
|
||||
[ext_resource path="res://src/UI/Timeline/LayerButton.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://assets/graphics/dark_themes/timeline/new_frame.png" type="Texture" id=19]
|
||||
[ext_resource path="res://assets/graphics/dark_themes/timeline/remove_frame.png" type="Texture" id=20]
|
||||
|
@ -320,19 +320,19 @@ __meta__ = {
|
|||
|
||||
[node name="Control" type="Control" parent="AnimationContainer/TimelineContainer/TimelineButtons"]
|
||||
margin_left = 225.0
|
||||
margin_right = 434.0
|
||||
margin_right = 386.0
|
||||
margin_bottom = 38.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="AnimationContainer/TimelineContainer/TimelineButtons"]
|
||||
margin_left = 438.0
|
||||
margin_left = 390.0
|
||||
margin_right = 902.0
|
||||
margin_bottom = 38.0
|
||||
|
||||
[node name="AnimationButtons" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer"]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 457.0
|
||||
margin_right = 505.0
|
||||
margin_bottom = 31.0
|
||||
rect_min_size = Vector2( 0, 24 )
|
||||
size_flags_horizontal = 3
|
||||
|
@ -340,7 +340,7 @@ custom_constants/separation = 40
|
|||
alignment = 2
|
||||
|
||||
[node name="FrameButtons" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons"]
|
||||
margin_right = 92.0
|
||||
margin_right = 140.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="AddFrame" type="Button" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
|
||||
|
@ -456,9 +456,66 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MoveLeft" type="Button" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_left = 96.0
|
||||
margin_top = 2.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 22.0
|
||||
rect_min_size = Vector2( 20, 0 )
|
||||
hint_tooltip = "Move the selected frame to the left."
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveLeft"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -7.5
|
||||
margin_top = -5.5
|
||||
margin_right = 7.5
|
||||
margin_bottom = 5.5
|
||||
texture = ExtResource( 8 )
|
||||
flip_h = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MoveRight" type="Button" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons" groups=[
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_left = 120.0
|
||||
margin_top = 2.0
|
||||
margin_right = 140.0
|
||||
margin_bottom = 22.0
|
||||
rect_min_size = Vector2( 20, 0 )
|
||||
hint_tooltip = "Move the selected frame to the right."
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveRight"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -7.5
|
||||
margin_top = -5.5
|
||||
margin_right = 7.5
|
||||
margin_bottom = 5.5
|
||||
texture = ExtResource( 8 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PlaybackButtons" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons"]
|
||||
margin_left = 132.0
|
||||
margin_right = 272.0
|
||||
margin_left = 180.0
|
||||
margin_right = 320.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="FirstFrame" type="Button" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons" groups=[
|
||||
|
@ -638,8 +695,8 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="LoopButtons" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons"]
|
||||
margin_left = 312.0
|
||||
margin_right = 450.0
|
||||
margin_left = 360.0
|
||||
margin_right = 498.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="OnionSkinningSettings" type="Button" parent="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/LoopButtons" groups=[
|
||||
|
@ -759,9 +816,9 @@ rect_min_size = Vector2( 214, 0 )
|
|||
|
||||
[node name="OpacityLabel" type="Label" parent="AnimationContainer/TimelineContainer/OpacityAndTagContainer/OpacityContainer"]
|
||||
margin_right = 53.0
|
||||
margin_bottom = 32.0
|
||||
margin_bottom = 14.0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 1
|
||||
size_flags_vertical = 0
|
||||
text = "Opacity:"
|
||||
valign = 1
|
||||
|
||||
|
@ -930,7 +987,6 @@ margin_top = -6.0
|
|||
margin_right = 24.0
|
||||
margin_bottom = -4.76837e-07
|
||||
mouse_filter = 2
|
||||
texture = ExtResource( 8 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
@ -944,6 +1000,8 @@ __meta__ = {
|
|||
[connection signal="pressed" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/DeleteFrame" to="." method="_on_DeleteFrame_pressed"]
|
||||
[connection signal="pressed" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/CopyFrame" to="." method="_on_CopyFrame_pressed"]
|
||||
[connection signal="pressed" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/FrameTagButton" to="." method="_on_FrameTagButton_pressed"]
|
||||
[connection signal="pressed" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveLeft" to="." method="_on_MoveLeft_pressed"]
|
||||
[connection signal="pressed" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/FrameButtons/MoveRight" to="." method="_on_MoveRight_pressed"]
|
||||
[connection signal="pressed" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/FirstFrame" to="." method="_on_FirstFrame_pressed"]
|
||||
[connection signal="pressed" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PreviousFrame" to="." method="_on_PreviousFrame_pressed"]
|
||||
[connection signal="toggled" from="AnimationContainer/TimelineContainer/TimelineButtons/PanelContainer/AnimationButtons/PlaybackButtons/PlayBackwards" to="." method="_on_PlayBackwards_toggled"]
|
||||
|
|
|
@ -26,8 +26,12 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="EmptySpacer" type="Control" parent="HBoxContainer"]
|
||||
margin_bottom = 36.0
|
||||
|
||||
[node name="LayerButtons" type="HBoxContainer" parent="HBoxContainer"]
|
||||
margin_right = 104.0
|
||||
margin_left = 4.0
|
||||
margin_right = 108.0
|
||||
margin_bottom = 36.0
|
||||
|
||||
[node name="VisibilityButton" type="Button" parent="HBoxContainer/LayerButtons" groups=[
|
||||
|
@ -122,8 +126,8 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="LayerName" type="HBoxContainer" parent="HBoxContainer"]
|
||||
margin_left = 108.0
|
||||
margin_right = 212.0
|
||||
margin_left = 112.0
|
||||
margin_right = 216.0
|
||||
margin_bottom = 36.0
|
||||
rect_min_size = Vector2( 104, 0 )
|
||||
mouse_default_cursor_shape = 2
|
||||
|
|
|
@ -43,6 +43,7 @@ func setup_edit_menu() -> void:
|
|||
"Undo" : InputMap.get_action_list("undo")[0].get_scancode_with_modifiers(),
|
||||
"Redo" : InputMap.get_action_list("redo")[0].get_scancode_with_modifiers(),
|
||||
"Copy" : InputMap.get_action_list("copy")[0].get_scancode_with_modifiers(),
|
||||
"Cut" : InputMap.get_action_list("cut")[0].get_scancode_with_modifiers(),
|
||||
"Paste" : InputMap.get_action_list("paste")[0].get_scancode_with_modifiers(),
|
||||
"Delete" : InputMap.get_action_list("delete")[0].get_scancode_with_modifiers(),
|
||||
"Clear Selection" : 0,
|
||||
|
@ -211,14 +212,16 @@ func edit_menu_id_pressed(id : int) -> void:
|
|||
Global.control.redone = false
|
||||
2: # Copy
|
||||
Global.selection_rectangle.copy()
|
||||
3: # paste
|
||||
3: # cut
|
||||
Global.selection_rectangle.cut()
|
||||
4: # paste
|
||||
Global.selection_rectangle.paste()
|
||||
4: # Delete
|
||||
5: # Delete
|
||||
Global.selection_rectangle.delete()
|
||||
5: # Clear selection
|
||||
6: # Clear selection
|
||||
Global.selection_rectangle.set_rect(Rect2(0, 0, 0, 0))
|
||||
Global.selection_rectangle.select_rect()
|
||||
6: # Preferences
|
||||
7: # Preferences
|
||||
Global.preferences_dialog.popup_centered(Vector2(400, 280))
|
||||
Global.dialog_open(true)
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ __meta__ = {
|
|||
|
||||
[node name="FileMenu" type="MenuButton" parent="MenuItems"]
|
||||
margin_right = 35.0
|
||||
margin_bottom = 20.0
|
||||
margin_bottom = 23.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "File"
|
||||
switch_on_hover = true
|
||||
|
@ -29,7 +29,7 @@ switch_on_hover = true
|
|||
[node name="EditMenu" type="MenuButton" parent="MenuItems"]
|
||||
margin_left = 39.0
|
||||
margin_right = 75.0
|
||||
margin_bottom = 20.0
|
||||
margin_bottom = 23.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Edit"
|
||||
switch_on_hover = true
|
||||
|
@ -37,7 +37,7 @@ switch_on_hover = true
|
|||
[node name="ViewMenu" type="MenuButton" parent="MenuItems"]
|
||||
margin_left = 79.0
|
||||
margin_right = 121.0
|
||||
margin_bottom = 20.0
|
||||
margin_bottom = 23.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "View"
|
||||
switch_on_hover = true
|
||||
|
@ -45,7 +45,7 @@ switch_on_hover = true
|
|||
[node name="ImageMenu" type="MenuButton" parent="MenuItems"]
|
||||
margin_left = 125.0
|
||||
margin_right = 177.0
|
||||
margin_bottom = 20.0
|
||||
margin_bottom = 23.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Image"
|
||||
switch_on_hover = true
|
||||
|
@ -53,7 +53,7 @@ switch_on_hover = true
|
|||
[node name="HelpMenu" type="MenuButton" parent="MenuItems"]
|
||||
margin_left = 181.0
|
||||
margin_right = 223.0
|
||||
margin_bottom = 20.0
|
||||
margin_bottom = 23.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Help"
|
||||
switch_on_hover = true
|
||||
|
@ -91,10 +91,10 @@ anchor_top = 0.5
|
|||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -330.0
|
||||
margin_top = -14.0
|
||||
margin_bottom = 14.0
|
||||
margin_top = -10.0
|
||||
margin_right = 0.00012207
|
||||
margin_bottom = 13.0
|
||||
grow_horizontal = 2
|
||||
size_flags_vertical = 0
|
||||
alignment = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
@ -103,10 +103,9 @@ __meta__ = {
|
|||
[node name="CurrentFrame" type="Label" parent="HBoxContainer"]
|
||||
margin_left = 106.0
|
||||
margin_right = 198.0
|
||||
margin_bottom = 28.0
|
||||
margin_bottom = 23.0
|
||||
size_flags_vertical = 1
|
||||
text = "Current frame:"
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
@ -114,7 +113,6 @@ __meta__ = {
|
|||
[node name="CurrentFrameMark" type="Label" parent="HBoxContainer"]
|
||||
margin_left = 202.0
|
||||
margin_right = 223.0
|
||||
margin_bottom = 28.0
|
||||
margin_bottom = 23.0
|
||||
size_flags_vertical = 1
|
||||
text = "1/2"
|
||||
valign = 1
|
||||
|
|
|
@ -49,8 +49,10 @@ size_flags_vertical = 3
|
|||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -20.5
|
||||
margin_right = 20.5
|
||||
margin_bottom = 254.0
|
||||
margin_right = -6.5
|
||||
margin_bottom = 14.0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
@ -59,7 +61,9 @@ __meta__ = {
|
|||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 291.0
|
||||
margin_bottom = 255.0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue