From 238bb3b4881d3ce492cae0d59741918dfd8e42dd Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 21 Dec 2019 03:50:09 +0200 Subject: [PATCH] Made Timeline & Tool buttons change depending on theme type Changed "LayerButtons" group to "UIButtons", as it includes most UI buttons. --- .../Timeline/Next_Frame_hover.png.import | 6 +- .../Dark Themes/Timeline/onion_skinning.png | Bin 660 -> 0 bytes .../Timeline/Play Backwards_Hover.png | Bin 0 -> 654 bytes .../Timeline/Play Backwards_Hover.png.import} | 6 +- Main.tscn | 88 ++++++++++++------ Prefabs/LayerContainer.tscn | 2 +- Scripts/PreferencesDialog.gd | 13 ++- 7 files changed, 77 insertions(+), 38 deletions(-) delete mode 100644 Assets/Graphics/Dark Themes/Timeline/onion_skinning.png create mode 100644 Assets/Graphics/Light Themes/Timeline/Play Backwards_Hover.png rename Assets/Graphics/{Dark Themes/Timeline/onion_skinning.png.import => Light Themes/Timeline/Play Backwards_Hover.png.import} (64%) diff --git a/Assets/Graphics/Dark Themes/Timeline/Next_Frame_hover.png.import b/Assets/Graphics/Dark Themes/Timeline/Next_Frame_hover.png.import index 2a09b5f80917..dfe23dcc6ac9 100644 --- a/Assets/Graphics/Dark Themes/Timeline/Next_Frame_hover.png.import +++ b/Assets/Graphics/Dark Themes/Timeline/Next_Frame_hover.png.import @@ -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] diff --git a/Assets/Graphics/Dark Themes/Timeline/onion_skinning.png b/Assets/Graphics/Dark Themes/Timeline/onion_skinning.png deleted file mode 100644 index 93acce0c25ea7253514a50f5d3fe353ae04dd115..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 660 zcmV;F0&D$=P)EX>4Tx04R}tkv&MmKpe$iQ$^8=phZL+GPF(>L`58>ibb$c+6t{Ym|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfadlF3krMxx6k5c1aNLh~_a1le0HI!Hs@X9CsG4OY zV^J}aT@|}t(Tf29VGK#k)Z?keG(5-GJ$!tV@h8Y7ldA+q zjs;YpLUR1zfAG6oGe0%yCIzBE=ZkHBgn_PIpi#5!?_=9;oB;l3;7V)xD|KM@lk{3k z3mpOd+rY(jOOyA2%N=0&NtX=Ck^D4;d>(i|qi@OrgSSA>n%i4*AEysMnz~xP0S*p< zu>xhUd%U~5y|;hQH2eDjW3O_d7Y=~l00006VoOIv00000008+zyMF)x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru;|mf3BrA^;p#cB@02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{003-BL_t(I%VT60+9>?Rix-n-AT~|7ETf;7iHS|3 u4Ma~e=wUVjk`1od#05rR@x@5(DgXe3!5ucJ5`=C50000EX>4Tx04R}tkxeK>Q5c3FgGeLED9Pe3hLtHHS!#$BrI}F%3-{hJL(RRWdq*~w z%2rwU+4x)7ShKaTRZ96O+1OeU8|nJaovE2*oI0JS_k8c$cfJFG!>nn!H9cV2c_%g& z)n<~jTHOmlTB!n>b<@pF#zzxWT%UJ-CASfkRk`lZ)tFjzO{mg@hs>Ol7hVt^Sj*=W z?+S;^B|Rm4Cfw~vgTfC=Hwyf!IOB6bWrmzYY*;uXtYymBC}VTUv4s1D!zs&_{J>0s zQ;OFWTiI2!*r$47aM7NQD_wR6V~jJ&6dDGrER!WqL{3{2mzdl~EBM=e|CG24aV=wt zV}unfbl;EqgWt1t(|x^#q+k?kpFQur6Y93%d&~2_jy&)C7^ zK7ghTIKL`s#tvL;Lfd0bcXVH>mK{i^;q6quDG4n%&@fk+Tk)Qgdq~KvCaz&`AG$J< zJzwG7_2qN>x28D19|v-Be9lZ8WdHyG24YJ`L;(K){{a7>y{D4^000SaNLh0L04^f{ z04^f|c%?sf00007bV*G`2jdJC0W1-$aHvZF000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_C zX>@2HM@dakSAh-}0001KNkl*3ThJrnks5FXQD7A-fef|;S?m$q!QTBgb9DU+chF_YEL!Rz ogO-O 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