From 94097c456b2187f8d98cc46a2fc6f59cd58cb64b Mon Sep 17 00:00:00 2001 From: osquallo Date: Sun, 22 Mar 2020 20:12:52 +0100 Subject: [PATCH] EDIT remplacement des fenetre popup par des nodes custom, WIP. --- addons/ui_window/background_default.jpg | Bin 0 -> 13591 bytes addons/ui_window/button_close.png | Bin 0 -> 520 bytes addons/ui_window/button_move.png | Bin 0 -> 674 bytes addons/ui_window/button_open.png | Bin 0 -> 604 bytes addons/ui_window/button_quit.png | Bin 0 -> 605 bytes addons/ui_window/button_resize.png | Bin 0 -> 514 bytes addons/ui_window/icon.png | Bin 0 -> 620 bytes addons/ui_window/plugin.cfg | 7 + addons/ui_window/ui_window.gd | 527 ++++++++++++++++++ addons/ui_window/ui_window_plugin.gd | 12 + .../interfaces/debug_window/debug_window.gd | 6 +- .../interfaces/debug_window/debug_window.tscn | 136 ++--- project.godot | 2 +- scenes/game/game.gd | 6 - scenes/game/game.tscn | 5 +- scenes/interfaces/game_menu/game_ui.gd | 44 +- scenes/interfaces/game_menu/game_ui.tscn | 31 +- scenes/interfaces/windows/window.gd | 14 - 18 files changed, 671 insertions(+), 119 deletions(-) create mode 100644 addons/ui_window/background_default.jpg create mode 100644 addons/ui_window/button_close.png create mode 100644 addons/ui_window/button_move.png create mode 100644 addons/ui_window/button_open.png create mode 100644 addons/ui_window/button_quit.png create mode 100644 addons/ui_window/button_resize.png create mode 100644 addons/ui_window/icon.png create mode 100644 addons/ui_window/plugin.cfg create mode 100644 addons/ui_window/ui_window.gd create mode 100644 addons/ui_window/ui_window_plugin.gd diff --git a/addons/ui_window/background_default.jpg b/addons/ui_window/background_default.jpg new file mode 100644 index 0000000000000000000000000000000000000000..458f64ee341b7ba2a385ed46c521eb552a46f197 GIT binary patch literal 13591 zcmeHtbzGH8_wTc5klK`VY`T<?@P%_0U$);0C4~Se1XVP(#^sY z0Ayv^01N;C&;eW!5Ys~79l9#WpWVoFd|Dhm>4*j7}L61IGNK*%PJ@X9EhgBwf?jG#-!!G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B+u!~h~v2dNzrn6a};44|3c rjzCNIobxbjZW}433t9zTeEa$U({)Kxt;CI$00000NkvXXu0mjf;9Ld+ literal 0 HcmV?d00001 diff --git a/addons/ui_window/button_resize.png b/addons/ui_window/button_resize.png new file mode 100644 index 0000000000000000000000000000000000000000..9182aa6f02b6679cf67c8dab27e29dd314ab16a3 GIT binary patch literal 514 zcmV+d0{#7oP)HgVZakYFp=SOhFY z8()S0KwH69K@b!{MEnW98VTziSBQwtGJ8MH%(={*0soY#=bgGi$QO!sJQfYjCl^A& zCxUd+$QVtU?pV{alL`JE?>G2Vy^g3}|L^;AG^Y(m2VaBmh;G?M;c?-q)uN?%Q@BIV zX=&ko;jk?S6uwY;%Hv1HS&v^8+llxD_*KtP_6Mhau%5H?!UMv+d9$Q{pGV!K#VE|p zO6``}gF~DcQ9`6Bv5ZNPh}42)_P1~F%QwS{cy#$&l(EH;B`4mns3qxYNX>|D$Y)Yk zx&O}7$qWy9-CLqi|KPeWeGuG&YQ=Rw4qUf-2!VSzE7bfelGEs$=#`q*y9aISaB^PL zQrmF40bO^NW@}$kK&C&Ff#+jrO+xz>G%b2reXnzL3yC#(qD$D>g?`!Jw)6=ITxbqj zHlOp?`!jlK=n!07*qoM6N<$ Ef>$lwW&i*H literal 0 HcmV?d00001 diff --git a/addons/ui_window/icon.png b/addons/ui_window/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..71d2090f021a8e4f8da96a9f567ca6146bea9696 GIT binary patch literal 620 zcmV-y0+aoTP)$1B+f~{a zVVa20M~7~>_T=!YDs2)`})hiDVD`!$ls=fBaR$-@%D;Zl&%@6Smng9AbLhB(wd`2I^5gty>x)Av6PeE;(hs_)^2hCSdw-99Yz0T1sBv<8$E@5XEx@CWK@e3C{Xceu2 zRQUh^010qNS#tmY3labT3lag+-G2N4005*(L_t(o3GG%v4uBvGL*obhn>XL*&A<5s zJvCV{ZXFPbabA`Pv|YCmQi|{I4h)t7+p(Y49&LS{7nNhw4!^NBu_RU|IS%U_EdT@- zuvh4JN&p9BhHyjv!#*~4cOV3W1L1)CCY1ACGylM$1>n-b!B(+*541`oaEcvJpGy+e z+l1_dPy)Q<5YC7&1(cGrBD#-Z2)Ok?ZOu{pr 0.0: - $stats_window/oubli.value -= value/2 + $stats_window.get_content_child( "oubli" ).value -= value/2 func change_oubli( value ): - $stats_window/oubli.value += value + $stats_window.get_content_child( "oubli" ).value += value if value > 0.0: - $stats_window/douleur.value -= value/2 + $stats_window.get_content_child( "douleur" ).value -= value/2 func change_trauma( value ): - $stats_window/trauma.value += value + $stats_window.get_content_child( "trauma" ).value += value func set_douleur( value ): - var delta = value - $stats_window/douleur.value - $stats_window/douleur.value = value + var delta = value - $stats_window.get_content_child( "douleur" ).value + $stats_window.get_content_child( "douleur" ).value = value if delta > 0.0: - $stats_window/oubli.value -= delta/2 + $stats_window.get_content_child( "oubli" ).value -= delta/2 func set_oubli( value ): - var delta = value - $stats_window/oubli.value - $stats_window/oubli.value = value + var delta = value - $stats_window.get_content_child( "oubli" ).value + $stats_window.get_content_child( "oubli" ).value = value if delta > 0.0: - $stats_window/douleur.value -= delta/2 + $stats_window.get_content_child( "douleur" ).value -= delta/2 func set_trauma( value ): - $stats_window/trauma.value = value + $stats_window.get_content_child( "trauma" ).value = value + + +func update_trauma(): + $stats_window.get_content_child( "trauma" ).value = ($stats_window.get_content_child( "oubli" ).value+$stats_window.get_content_child( "douleur" ).value)/2 + +func _on_douleur_value_changed(value): + $stats_window.get_content_child( "douleur" ).self_modulate.a = (value / 18.0) * (value / 18.0) + self.update_trauma() + +func _on_oubli_value_changed(value): + $stats_window.get_content_child( "oubli" ).self_modulate.a = (value / 18.0) * (value / 18.0) + self.update_trauma() + + +func _on_trauma_value_changed(value): + $stats_window.get_content_child( "trauma" ).self_modulate.a = (value / 6.0) * (value / 6.0) + diff --git a/scenes/interfaces/game_menu/game_ui.tscn b/scenes/interfaces/game_menu/game_ui.tscn index 243086e..1b3dd92 100644 --- a/scenes/interfaces/game_menu/game_ui.tscn +++ b/scenes/interfaces/game_menu/game_ui.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=4 format=2] -[ext_resource path="res://assets/interfaces/themes/transparent_window.tres" type="Theme" id=1] +[ext_resource path="res://addons/ui_window/ui_window.gd" type="Script" id=1] [ext_resource path="res://scenes/interfaces/game_menu/game_ui.gd" type="Script" id=2] [ext_resource path="res://assets/interfaces/jauges/jauge_ring_white.png" type="Texture" id=3] -[ext_resource path="res://scenes/interfaces/windows/window.gd" type="Script" id=4] [node name="game_ui" type="Control"] anchor_right = 1.0 @@ -14,18 +13,19 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="stats_window" type="WindowDialog" parent="."] -visible = true -rect_min_size = Vector2( 128, 128 ) -size_flags_horizontal = 3 -size_flags_vertical = 3 -theme = ExtResource( 1 ) -custom_constants/close_v_ofs = 0 -popup_exclusive = true -script = ExtResource( 4 ) +[node name="stats_window" type="MarginContainer" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 +script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } +is_resizable = false +is_borderless = true +has_footer = false +has_scrollbar = false +is_dragged_by_header_only = false +title = "" [node name="douleur" type="TextureProgress" parent="stats_window"] margin_right = 126.0 @@ -66,7 +66,6 @@ radial_fill_degrees = 90.0 __meta__ = { "_edit_use_anchors_": false } -[connection signal="gui_input" from="stats_window" to="stats_window" method="_on_stats_window_gui_input"] -[connection signal="value_changed" from="stats_window/douleur" to="stats_window" method="_on_douleur_value_changed"] -[connection signal="value_changed" from="stats_window/oubli" to="stats_window" method="_on_oubli_value_changed"] -[connection signal="value_changed" from="stats_window/trauma" to="stats_window" method="_on_trauma_value_changed"] +[connection signal="value_changed" from="stats_window/douleur" to="." method="_on_douleur_value_changed"] +[connection signal="value_changed" from="stats_window/oubli" to="." method="_on_oubli_value_changed"] +[connection signal="value_changed" from="stats_window/trauma" to="." method="_on_trauma_value_changed"] diff --git a/scenes/interfaces/windows/window.gd b/scenes/interfaces/windows/window.gd index f3b2b2c..d1f3239 100644 --- a/scenes/interfaces/windows/window.gd +++ b/scenes/interfaces/windows/window.gd @@ -13,17 +13,3 @@ func _on_stats_window_gui_input(event): self.set_position( self.get_position() - delta ) -func update_trauma(): - $trauma.value = ($oubli.value+$douleur.value)/2 - -func _on_douleur_value_changed(value): - $douleur.self_modulate.a = (value / 18.0) * (value / 18.0) - self.update_trauma() - -func _on_oubli_value_changed(value): - $oubli.self_modulate.a = (value / 18.0) * (value / 18.0) - self.update_trauma() - - -func _on_trauma_value_changed(value): - $trauma.self_modulate.a = (value / 6.0) * (value / 6.0)