mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Made Timeline & Tool buttons change depending on theme type
Changed "LayerButtons" group to "UIButtons", as it includes most UI buttons.
This commit is contained in:
parent
8058cf2f55
commit
238bb3b488
|
@ -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]
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 660 B |
BIN
Assets/Graphics/Light Themes/Timeline/Play Backwards_Hover.png
Normal file
BIN
Assets/Graphics/Light Themes/Timeline/Play Backwards_Hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 654 B |
|
@ -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]
|
||||
|
|
@ -15,7 +15,7 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="VisibilityButton" type="TextureButton" parent="." groups=[
|
||||
"LayerButtons",
|
||||
"UIButtons",
|
||||
]]
|
||||
margin_left = 6.0
|
||||
margin_top = 5.0
|
||||
|
|
|
@ -62,14 +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"):
|
||||
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/Layers/%s" % [Global.theme_type, normal_file_name])
|
||||
var hover_file_name = button.texture_hover.resource_path.get_file()
|
||||
button.texture_hover = load("res://Assets/Graphics/%s Themes/Layers/%s" % [Global.theme_type, hover_file_name])
|
||||
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:
|
||||
var disabled_file_name = button.texture_disabled.resource_path.get_file()
|
||||
button.texture_disabled = load("res://Assets/Graphics/%s Themes/Layers/%s" % [Global.theme_type, disabled_file_name])
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue