mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-12 08:43:08 +00:00
Use dark theme's button textures for the gold theme
This commit is contained in:
parent
d29338a9aa
commit
0ebc7a6033
|
@ -701,7 +701,7 @@ func disable_button(button : BaseButton, disable : bool) -> void:
|
||||||
if button is Button:
|
if button is Button:
|
||||||
var theme := theme_type
|
var theme := theme_type
|
||||||
if theme == "Gold":
|
if theme == "Gold":
|
||||||
theme = "Light"
|
theme = "Dark"
|
||||||
for c in button.get_children():
|
for c in button.get_children():
|
||||||
if c is TextureRect:
|
if c is TextureRect:
|
||||||
var last_backslash = c.texture.resource_path.get_base_dir().find_last("/")
|
var last_backslash = c.texture.resource_path.get_base_dir().find_last("/")
|
||||||
|
|
|
@ -373,7 +373,7 @@ func change_theme(ID : int) -> void:
|
||||||
elif button is Button:
|
elif button is Button:
|
||||||
var theme_type := Global.theme_type
|
var theme_type := Global.theme_type
|
||||||
if theme_type == "Gold":
|
if theme_type == "Gold":
|
||||||
theme_type = "Light"
|
theme_type = "Dark"
|
||||||
|
|
||||||
var texture : TextureRect
|
var texture : TextureRect
|
||||||
for child in button.get_children():
|
for child in button.get_children():
|
||||||
|
|
|
@ -178,7 +178,7 @@ func _on_OnionSkinning_pressed() -> void:
|
||||||
Global.canvas.update()
|
Global.canvas.update()
|
||||||
var theme_type := Global.theme_type
|
var theme_type := Global.theme_type
|
||||||
if theme_type == "Gold":
|
if theme_type == "Gold":
|
||||||
theme_type = "Light"
|
theme_type = "Dark"
|
||||||
var texture_button : TextureRect = Global.onion_skinning_button.get_child(0)
|
var texture_button : TextureRect = Global.onion_skinning_button.get_child(0)
|
||||||
if Global.onion_skinning:
|
if Global.onion_skinning:
|
||||||
texture_button.texture = load("res://Assets/Graphics/%s_themes/timeline/onion_skinning.png" % theme_type.to_lower())
|
texture_button.texture = load("res://Assets/Graphics/%s_themes/timeline/onion_skinning.png" % theme_type.to_lower())
|
||||||
|
@ -194,7 +194,7 @@ func _on_LoopAnim_pressed() -> void:
|
||||||
var texture_button : TextureRect = Global.loop_animation_button.get_child(0)
|
var texture_button : TextureRect = Global.loop_animation_button.get_child(0)
|
||||||
var theme_type := Global.theme_type
|
var theme_type := Global.theme_type
|
||||||
if theme_type == "Gold":
|
if theme_type == "Gold":
|
||||||
theme_type = "Light"
|
theme_type = "Dark"
|
||||||
match animation_loop:
|
match animation_loop:
|
||||||
0: # Make it loop
|
0: # Make it loop
|
||||||
animation_loop = 1
|
animation_loop = 1
|
||||||
|
@ -213,7 +213,7 @@ func _on_LoopAnim_pressed() -> void:
|
||||||
func _on_PlayForward_toggled(button_pressed : bool) -> void:
|
func _on_PlayForward_toggled(button_pressed : bool) -> void:
|
||||||
var theme_type := Global.theme_type
|
var theme_type := Global.theme_type
|
||||||
if theme_type == "Gold":
|
if theme_type == "Gold":
|
||||||
theme_type = "Light"
|
theme_type = "Dark"
|
||||||
if button_pressed:
|
if button_pressed:
|
||||||
Global.play_forward.get_child(0).texture = load("res://Assets/Graphics/%s_themes/timeline/pause.png" % theme_type.to_lower())
|
Global.play_forward.get_child(0).texture = load("res://Assets/Graphics/%s_themes/timeline/pause.png" % theme_type.to_lower())
|
||||||
else:
|
else:
|
||||||
|
@ -225,7 +225,7 @@ func _on_PlayForward_toggled(button_pressed : bool) -> void:
|
||||||
func _on_PlayBackwards_toggled(button_pressed : bool) -> void:
|
func _on_PlayBackwards_toggled(button_pressed : bool) -> void:
|
||||||
var theme_type := Global.theme_type
|
var theme_type := Global.theme_type
|
||||||
if theme_type == "Gold":
|
if theme_type == "Gold":
|
||||||
theme_type = "Light"
|
theme_type = "Dark"
|
||||||
if button_pressed:
|
if button_pressed:
|
||||||
Global.play_backwards.get_child(0).texture = load("res://Assets/Graphics/%s_themes/timeline/pause.png" % theme_type.to_lower())
|
Global.play_backwards.get_child(0).texture = load("res://Assets/Graphics/%s_themes/timeline/pause.png" % theme_type.to_lower())
|
||||||
else:
|
else:
|
||||||
|
@ -269,7 +269,7 @@ func _on_AnimationTimer_timeout() -> void:
|
||||||
func play_animation(play : bool, forward_dir : bool) -> void:
|
func play_animation(play : bool, forward_dir : bool) -> void:
|
||||||
var theme_type := Global.theme_type
|
var theme_type := Global.theme_type
|
||||||
if theme_type == "Gold":
|
if theme_type == "Gold":
|
||||||
theme_type = "Light"
|
theme_type = "Dark"
|
||||||
|
|
||||||
if forward_dir:
|
if forward_dir:
|
||||||
Global.play_backwards.disconnect("toggled", self, "_on_PlayBackwards_toggled")
|
Global.play_backwards.disconnect("toggled", self, "_on_PlayBackwards_toggled")
|
||||||
|
|
|
@ -17,7 +17,7 @@ func _ready() -> void:
|
||||||
line_edit = Global.find_node_by_name(self, "LineEdit")
|
line_edit = Global.find_node_by_name(self, "LineEdit")
|
||||||
var theme_type := Global.theme_type
|
var theme_type := Global.theme_type
|
||||||
if theme_type == "Gold":
|
if theme_type == "Gold":
|
||||||
theme_type = "Light"
|
theme_type = "Dark"
|
||||||
|
|
||||||
if Global.layers[i][1]:
|
if Global.layers[i][1]:
|
||||||
visibility_button.get_child(0).texture = load("res://Assets/Graphics/%s_themes/layers/layer_visible.png" % theme_type.to_lower())
|
visibility_button.get_child(0).texture = load("res://Assets/Graphics/%s_themes/layers/layer_visible.png" % theme_type.to_lower())
|
||||||
|
|
Loading…
Reference in a new issue