Skip to content

Commit

Permalink
Merge pull request #7 from Orama-Interactive/master
Browse files Browse the repository at this point in the history
Title
  • Loading branch information
Erevoid authored Dec 21, 2019
2 parents c33903e + 238bb3b commit 8e2f05d
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

importer="texture"
type="StreamTexture"
path="res://.import/Next_Frame_hover.png-29e3bdc3bfb09dbf24f0d4ef57cdadd0.stex"
path="res://.import/Next_Frame_Hover.png-ba92cf8a5dbcda245610c78c96d6bf93.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Assets/Graphics/Dark Themes/Timeline/Next_Frame_hover.png"
dest_files=[ "res://.import/Next_Frame_hover.png-29e3bdc3bfb09dbf24f0d4ef57cdadd0.stex" ]
source_file="res://Assets/Graphics/Dark Themes/Timeline/Next_Frame_Hover.png"
dest_files=[ "res://.import/Next_Frame_Hover.png-ba92cf8a5dbcda245610c78c96d6bf93.stex" ]

[params]

Expand Down
Binary file removed Assets/Graphics/Dark Themes/Timeline/onion_skinning.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

importer="texture"
type="StreamTexture"
path="res://.import/onion_skinning.png-d0842f2eb16b7f7b21f3177f2d045336.stex"
path="res://.import/Play Backwards_Hover.png-a09d4ebe9901867db26b4f435a7e4260.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Assets/Graphics/Dark Themes/Timeline/onion_skinning.png"
dest_files=[ "res://.import/onion_skinning.png-d0842f2eb16b7f7b21f3177f2d045336.stex" ]
source_file="res://Assets/Graphics/Light Themes/Timeline/Play Backwards_Hover.png"
dest_files=[ "res://.import/Play Backwards_Hover.png-a09d4ebe9901867db26b4f435a7e4260.stex" ]

[params]

Expand Down
112 changes: 74 additions & 38 deletions Main.tscn

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Prefabs/LayerContainer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ __meta__ = {
"_edit_horizontal_guides_": [ ]
}

[node name="Layer_Visible" type="TextureButton" parent="." groups=[
"LayerButtons",
[node name="VisibilityButton" type="TextureButton" parent="." groups=[
"UIButtons",
]]
margin_left = 6.0
margin_top = 5.0
Expand Down Expand Up @@ -68,5 +68,5 @@ editable = false
caret_blink = true
caret_blink_speed = 0.5
[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"]
8 changes: 4 additions & 4 deletions Scripts/Global.gd
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ func _ready() -> void:
frame_container = find_node_by_name(root, "FrameContainer")

var layer_buttons = find_node_by_name(root, "LayerButtons")
remove_layer_button = find_node_by_name(layer_buttons, "Delete_Layer")
move_up_layer_button = find_node_by_name(layer_buttons, "Move_Up")
move_down_layer_button = find_node_by_name(layer_buttons, "Move_Down")
merge_down_layer_button = find_node_by_name(layer_buttons, "Merge_Down")
remove_layer_button = find_node_by_name(layer_buttons, "RemoveLayer")
move_up_layer_button = find_node_by_name(layer_buttons, "MoveUpLayer")
move_down_layer_button = find_node_by_name(layer_buttons, "MovwDownLayer")
merge_down_layer_button = find_node_by_name(layer_buttons, "MergeDownLayer")
vbox_layer_container = find_node_by_name(root, "VBoxLayerContainer")

add_palette_button = find_node_by_name(root, "AddPalette")
Expand Down
4 changes: 1 addition & 3 deletions Scripts/LayerContainer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var i
# warning-ignore:unused_class_variable
var currently_selected := false

onready var visibility_button := $Layer_Visible
onready var visibility_button := $VisibilityButton
onready var label := $HBoxContainer/Label
onready var line_edit := $HBoxContainer/LineEdit

Expand Down Expand Up @@ -71,12 +71,10 @@ func changed_selection() -> void:
func _on_VisibilityButton_pressed() -> void:
if Global.canvas.layers[i][3]:
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_hover = load("res://Assets/Graphics/%s Themes/Layers/Layer_Invisible_Hover.png" % Global.theme_type)
else:
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_hover = load("res://Assets/Graphics/%s Themes/Layers/Layer_Visible_Hover.png" % Global.theme_type)

Expand Down
14 changes: 10 additions & 4 deletions Scripts/PreferencesDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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("hover", ruler_style)
Global.vertical_ruler.add_stylebox_override("focus", ruler_style)
for button in get_tree().get_nodes_in_group("LayerButtons"):
button.texture_normal = load("res://Assets/Graphics/%s Themes/Layers/%s.png" % [Global.theme_type, button.name])
button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/%s_Hover.png" % [Global.theme_type, button.name])
for button in get_tree().get_nodes_in_group("UIButtons"):
var last_backslash = button.texture_normal.resource_path.get_base_dir().find_last("/")
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:
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:
Global.grid_width = value
Expand Down

0 comments on commit 8e2f05d

Please sign in to comment.