1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Merge pull request #7 from Orama-Interactive/master

Title
This commit is contained in:
Erevos 2019-12-21 03:58:05 +02:00 committed by GitHub
commit 8e2f05d7ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 98 additions and 58 deletions

View file

@ -2,15 +2,15 @@
importer="texture" importer="texture"
type="StreamTexture" type="StreamTexture"
path="res://.import/Next_Frame_hover.png-29e3bdc3bfb09dbf24f0d4ef57cdadd0.stex" path="res://.import/Next_Frame_Hover.png-ba92cf8a5dbcda245610c78c96d6bf93.stex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Assets/Graphics/Dark Themes/Timeline/Next_Frame_hover.png" source_file="res://Assets/Graphics/Dark Themes/Timeline/Next_Frame_Hover.png"
dest_files=[ "res://.import/Next_Frame_hover.png-29e3bdc3bfb09dbf24f0d4ef57cdadd0.stex" ] dest_files=[ "res://.import/Next_Frame_Hover.png-ba92cf8a5dbcda245610c78c96d6bf93.stex" ]
[params] [params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

View file

@ -2,15 +2,15 @@
importer="texture" importer="texture"
type="StreamTexture" type="StreamTexture"
path="res://.import/onion_skinning.png-d0842f2eb16b7f7b21f3177f2d045336.stex" path="res://.import/Play Backwards_Hover.png-a09d4ebe9901867db26b4f435a7e4260.stex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Assets/Graphics/Dark Themes/Timeline/onion_skinning.png" source_file="res://Assets/Graphics/Light Themes/Timeline/Play Backwards_Hover.png"
dest_files=[ "res://.import/onion_skinning.png-d0842f2eb16b7f7b21f3177f2d045336.stex" ] dest_files=[ "res://.import/Play Backwards_Hover.png-a09d4ebe9901867db26b4f435a7e4260.stex" ]
[params] [params]

112
Main.tscn

File diff suppressed because one or more lines are too long

View file

@ -14,8 +14,8 @@ __meta__ = {
"_edit_horizontal_guides_": [ ] "_edit_horizontal_guides_": [ ]
} }
[node name="Layer_Visible" type="TextureButton" parent="." groups=[ [node name="VisibilityButton" type="TextureButton" parent="." groups=[
"LayerButtons", "UIButtons",
]] ]]
margin_left = 6.0 margin_left = 6.0
margin_top = 5.0 margin_top = 5.0
@ -68,5 +68,5 @@ editable = false
caret_blink = true caret_blink = true
caret_blink_speed = 0.5 caret_blink_speed = 0.5
[connection signal="pressed" from="." to="." method="_on_LayerContainer_pressed"] [connection signal="pressed" from="." to="." method="_on_LayerContainer_pressed"]
[connection signal="pressed" from="Layer_Visible" to="." method="_on_VisibilityButton_pressed"] [connection signal="pressed" from="VisibilityButton" to="." method="_on_VisibilityButton_pressed"]
[connection signal="text_changed" from="HBoxContainer/LineEdit" to="." method="_on_LineEdit_text_changed"] [connection signal="text_changed" from="HBoxContainer/LineEdit" to="." method="_on_LineEdit_text_changed"]

View file

@ -281,10 +281,10 @@ func _ready() -> void:
frame_container = find_node_by_name(root, "FrameContainer") frame_container = find_node_by_name(root, "FrameContainer")
var layer_buttons = find_node_by_name(root, "LayerButtons") var layer_buttons = find_node_by_name(root, "LayerButtons")
remove_layer_button = find_node_by_name(layer_buttons, "Delete_Layer") remove_layer_button = find_node_by_name(layer_buttons, "RemoveLayer")
move_up_layer_button = find_node_by_name(layer_buttons, "Move_Up") move_up_layer_button = find_node_by_name(layer_buttons, "MoveUpLayer")
move_down_layer_button = find_node_by_name(layer_buttons, "Move_Down") move_down_layer_button = find_node_by_name(layer_buttons, "MovwDownLayer")
merge_down_layer_button = find_node_by_name(layer_buttons, "Merge_Down") merge_down_layer_button = find_node_by_name(layer_buttons, "MergeDownLayer")
vbox_layer_container = find_node_by_name(root, "VBoxLayerContainer") vbox_layer_container = find_node_by_name(root, "VBoxLayerContainer")
add_palette_button = find_node_by_name(root, "AddPalette") add_palette_button = find_node_by_name(root, "AddPalette")

View file

@ -5,7 +5,7 @@ var i
# warning-ignore:unused_class_variable # warning-ignore:unused_class_variable
var currently_selected := false var currently_selected := false
onready var visibility_button := $Layer_Visible onready var visibility_button := $VisibilityButton
onready var label := $HBoxContainer/Label onready var label := $HBoxContainer/Label
onready var line_edit := $HBoxContainer/LineEdit onready var line_edit := $HBoxContainer/LineEdit
@ -71,12 +71,10 @@ func changed_selection() -> void:
func _on_VisibilityButton_pressed() -> void: func _on_VisibilityButton_pressed() -> void:
if Global.canvas.layers[i][3]: if Global.canvas.layers[i][3]:
Global.canvas.layers[i][3] = false Global.canvas.layers[i][3] = false
visibility_button.name = "Layer_Invisible"
visibility_button.texture_normal = load("res://Assets/Graphics/%s Themes/Layers/Layer_Invisible.png" % Global.theme_type) visibility_button.texture_normal = load("res://Assets/Graphics/%s Themes/Layers/Layer_Invisible.png" % Global.theme_type)
visibility_button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/Layer_Invisible_Hover.png" % Global.theme_type) visibility_button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/Layer_Invisible_Hover.png" % Global.theme_type)
else: else:
Global.canvas.layers[i][3] = true Global.canvas.layers[i][3] = true
visibility_button.name = "Layer_Visible"
visibility_button.texture_normal = load("res://Assets/Graphics/%s Themes/Layers/Layer_Visible.png" % Global.theme_type) visibility_button.texture_normal = load("res://Assets/Graphics/%s Themes/Layers/Layer_Visible.png" % Global.theme_type)
visibility_button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/Layer_Visible_Hover.png" % Global.theme_type) visibility_button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/Layer_Visible_Hover.png" % Global.theme_type)

View file

@ -62,11 +62,17 @@ func change_theme(ID : int) -> void:
Global.vertical_ruler.add_stylebox_override("pressed", ruler_style) Global.vertical_ruler.add_stylebox_override("pressed", ruler_style)
Global.vertical_ruler.add_stylebox_override("hover", ruler_style) Global.vertical_ruler.add_stylebox_override("hover", ruler_style)
Global.vertical_ruler.add_stylebox_override("focus", ruler_style) Global.vertical_ruler.add_stylebox_override("focus", ruler_style)
for button in get_tree().get_nodes_in_group("LayerButtons"): for button in get_tree().get_nodes_in_group("UIButtons"):
button.texture_normal = load("res://Assets/Graphics/%s Themes/Layers/%s.png" % [Global.theme_type, button.name]) var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/")
button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/%s_Hover.png" % [Global.theme_type, button.name]) var button_category = button.texture_normal.resource_path.get_base_dir().right(last_backslash + 1)
var normal_file_name = button.texture_normal.resource_path.get_file()
button.texture_normal = load("res://Assets/Graphics/%s Themes/%s/%s" % [Global.theme_type, button_category, normal_file_name])
if button.texture_hover:
var hover_file_name = button.texture_hover.resource_path.get_file()
button.texture_hover = load("res://Assets/Graphics/%s Themes/%s/%s" % [Global.theme_type, button_category, hover_file_name])
if button.texture_disabled: if button.texture_disabled:
button.texture_disabled = load("res://Assets/Graphics/%s Themes/Layers/%s_Disabled.png" % [Global.theme_type, button.name]) var disabled_file_name = button.texture_disabled.resource_path.get_file()
button.texture_disabled = load("res://Assets/Graphics/%s Themes/%s/%s" % [Global.theme_type, button_category, disabled_file_name])
func _on_GridWidthValue_value_changed(value : float) -> void: func _on_GridWidthValue_value_changed(value : float) -> void:
Global.grid_width = value Global.grid_width = value