diff --git a/assets/interfaces/debug_window/debug_window.gd b/assets/interfaces/debug_window/debug_window.gd index 4c0bd4a..8fb93e3 100644 --- a/assets/interfaces/debug_window/debug_window.gd +++ b/assets/interfaces/debug_window/debug_window.gd @@ -2,7 +2,9 @@ extends WindowDialog signal time_of_day_changed( value ) signal mist_level_changed( value ) - +signal oubli_changed( value ) +signal douleur_changed( value ) +signal trauma_changed( value ) func _on_time_of_day_value_changed(value): emit_signal( "time_of_day_changed", value ) @@ -10,3 +12,15 @@ func _on_time_of_day_value_changed(value): func _on_mist_level_value_changed(value): emit_signal( "mist_level_changed", value ) + + +func _on_oubli_value_changed(value): + emit_signal( "oubli_changed", value ) + + +func _on_douleur_value_changed(value): + emit_signal( "douleur_changed", value ) + + +func _on_trauma_value_changed(value): + emit_signal( "trauma_changed", value ) diff --git a/assets/interfaces/debug_window/debug_window.tscn b/assets/interfaces/debug_window/debug_window.tscn index ac30d9a..967fc22 100644 --- a/assets/interfaces/debug_window/debug_window.tscn +++ b/assets/interfaces/debug_window/debug_window.tscn @@ -19,6 +19,7 @@ __meta__ = { [node name="v_box_container" type="VBoxContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 +mouse_filter = 2 __meta__ = { "_edit_use_anchors_": false } @@ -84,5 +85,81 @@ margin_bottom = 16.0 size_flags_horizontal = 3 max_value = 1.0 step = 0.1 + +[node name="fears_label" type="Label" parent="v_box_container"] +margin_top = 76.0 +margin_right = 256.0 +margin_bottom = 90.0 +text = "Fears:" + +[node name="fears_box" type="VBoxContainer" parent="v_box_container"] +margin_top = 94.0 +margin_right = 256.0 +margin_bottom = 150.0 + +[node name="oubli" type="HBoxContainer" parent="v_box_container/fears_box"] +margin_right = 256.0 +margin_bottom = 16.0 + +[node name="label" type="Label" parent="v_box_container/fears_box/oubli"] +margin_left = 91.0 +margin_top = 1.0 +margin_right = 126.0 +margin_bottom = 15.0 +size_flags_horizontal = 10 +text = "Oubli" + +[node name="value" type="HSlider" parent="v_box_container/fears_box/oubli"] +margin_left = 130.0 +margin_right = 256.0 +margin_bottom = 16.0 +size_flags_horizontal = 3 +max_value = 100.0 +step = 0.1 + +[node name="douleur" type="HBoxContainer" parent="v_box_container/fears_box"] +margin_top = 20.0 +margin_right = 256.0 +margin_bottom = 36.0 + +[node name="label" type="Label" parent="v_box_container/fears_box/douleur"] +margin_left = 75.0 +margin_top = 1.0 +margin_right = 126.0 +margin_bottom = 15.0 +size_flags_horizontal = 10 +text = "Douleur" + +[node name="value" type="HSlider" parent="v_box_container/fears_box/douleur"] +margin_left = 130.0 +margin_right = 256.0 +margin_bottom = 16.0 +size_flags_horizontal = 3 +max_value = 100.0 +step = 0.1 + +[node name="trauma" type="HBoxContainer" parent="v_box_container/fears_box"] +margin_top = 40.0 +margin_right = 256.0 +margin_bottom = 56.0 + +[node name="label" type="Label" parent="v_box_container/fears_box/trauma"] +margin_left = 79.0 +margin_top = 1.0 +margin_right = 126.0 +margin_bottom = 15.0 +size_flags_horizontal = 10 +text = "Trauma" + +[node name="value" type="HSlider" parent="v_box_container/fears_box/trauma"] +margin_left = 130.0 +margin_right = 256.0 +margin_bottom = 16.0 +size_flags_horizontal = 3 +max_value = 100.0 +step = 0.1 [connection signal="value_changed" from="v_box_container/sky_box/time_of_day/value" to="." method="_on_time_of_day_value_changed"] [connection signal="value_changed" from="v_box_container/mist_box/mist_level/value" to="." method="_on_mist_level_value_changed"] +[connection signal="value_changed" from="v_box_container/fears_box/oubli/value" to="." method="_on_oubli_value_changed"] +[connection signal="value_changed" from="v_box_container/fears_box/douleur/value" to="." method="_on_douleur_value_changed"] +[connection signal="value_changed" from="v_box_container/fears_box/trauma/value" to="." method="_on_trauma_value_changed"] diff --git a/assets/interfaces/jauges/jauge_ring_inner_white.png b/assets/interfaces/jauges/jauge_ring_inner_white.png new file mode 100644 index 0000000..8aa60f6 Binary files /dev/null and b/assets/interfaces/jauges/jauge_ring_inner_white.png differ diff --git a/assets/interfaces/jauges/jauge_ring_white.png b/assets/interfaces/jauges/jauge_ring_white.png new file mode 100644 index 0000000..e3c66dc Binary files /dev/null and b/assets/interfaces/jauges/jauge_ring_white.png differ diff --git a/assets/interfaces/loading_screen/khanat_sound_cover_bg.png b/assets/interfaces/loading_screen/khanat_sound_cover_bg.png new file mode 100644 index 0000000..4d1505d Binary files /dev/null and b/assets/interfaces/loading_screen/khanat_sound_cover_bg.png differ diff --git a/assets/interfaces/loading_screen/khanat_sound_cover_hover.png b/assets/interfaces/loading_screen/khanat_sound_cover_hover.png new file mode 100644 index 0000000..004b755 Binary files /dev/null and b/assets/interfaces/loading_screen/khanat_sound_cover_hover.png differ diff --git a/assets/interfaces/loading_screen/khanat_sound_cover_progress.png b/assets/interfaces/loading_screen/khanat_sound_cover_progress.png new file mode 100644 index 0000000..38aaafd Binary files /dev/null and b/assets/interfaces/loading_screen/khanat_sound_cover_progress.png differ diff --git a/assets/interfaces/themes/transparent_window.tres b/assets/interfaces/themes/transparent_window.tres new file mode 100644 index 0000000..3cc6e1b --- /dev/null +++ b/assets/interfaces/themes/transparent_window.tres @@ -0,0 +1,18 @@ +[gd_resource type="Theme" load_steps=3 format=2] + +[ext_resource path="res://assets/interfaces/windows/blank_pixel.png" type="Texture" id=1] + +[sub_resource type="StyleBoxFlat" id=1] +bg_color = Color( 0.6, 0.6, 0.6, 0 ) +expand_margin_top = 8.0 + +[resource] +WindowDialog/colors/title_color = Color( 0, 0, 0, 1 ) +WindowDialog/constants/close_h_ofs = 18 +WindowDialog/constants/close_v_ofs = 18 +WindowDialog/constants/scaleborder_size = 4 +WindowDialog/constants/title_height = 24 +WindowDialog/fonts/title_font = null +WindowDialog/icons/close = ExtResource( 1 ) +WindowDialog/icons/close_highlight = ExtResource( 1 ) +WindowDialog/styles/panel = SubResource( 1 ) diff --git a/assets/interfaces/windows/blank_pixel.png b/assets/interfaces/windows/blank_pixel.png new file mode 100644 index 0000000..f344fa7 Binary files /dev/null and b/assets/interfaces/windows/blank_pixel.png differ diff --git a/project.godot b/project.godot index d758244..2420413 100644 --- a/project.godot +++ b/project.godot @@ -97,6 +97,11 @@ music_manager={ "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":77,"unicode":0,"echo":false,"script":null) ] } +debug_window={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":73,"unicode":0,"echo":false,"script":null) + ] +} [khanat] diff --git a/ressources/scripts/creatures.gd b/ressources/scripts/creatures.gd index ef52622..6880a02 100644 --- a/ressources/scripts/creatures.gd +++ b/ressources/scripts/creatures.gd @@ -15,6 +15,7 @@ class Creature: class Ra extends Creature: + var sex = Creature.Sex.F var female_boobs = 0.0 @@ -25,6 +26,10 @@ class Ra extends Creature: var color = Color( 1.0, 1.0, 1.0 ) + var douleur = 0.0 + var trauma = 0.0 + var oubli = 0.0 + func _init( p_pseudonym = "Créature" ): self.type = "ra" self.pseudonym = p_pseudonym diff --git a/scenes/game/game.gd b/scenes/game/game.gd index 7164107..3e9cf60 100644 --- a/scenes/game/game.gd +++ b/scenes/game/game.gd @@ -43,3 +43,15 @@ func _on_debug_window_time_of_day_changed(value): func _on_debug_window_mist_level_changed(value): $mist_fx.get_surface_material( 0 ).set_shader_param( "mist_level", value ) + + +func _on_debug_window_douleur_changed(value): + $game_ui.set_douleur( value ) + + +func _on_debug_window_oubli_changed(value): + $game_ui.set_oubli( value ) + + +func _on_debug_window_trauma_changed(value): + $game_ui.set_trauma( value ) diff --git a/scenes/game/game.tscn b/scenes/game/game.tscn index 418759c..f7bf394 100644 --- a/scenes/game/game.tscn +++ b/scenes/game/game.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=20 format=2] +[gd_scene load_steps=21 format=2] [ext_resource path="res://scenes/player/player.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/decors/terrains/dunes/dunes.tscn" type="PackedScene" id=2] @@ -10,6 +10,7 @@ [ext_resource path="res://assets/interfaces/debug_window/debug_window.tscn" type="PackedScene" id=8] [ext_resource path="res://assets/interfaces/themes/khanat_theme.theme" type="Theme" id=9] [ext_resource path="res://assets/interfaces/buttons/close_icon.png" type="Texture" id=10] +[ext_resource path="res://scenes/interfaces/game_menu/game_ui.tscn" type="PackedScene" id=11] [sub_resource type="OpenSimplexNoise" id=1] period = 8.0 @@ -24,8 +25,8 @@ noise = SubResource( 1 ) [sub_resource type="ShaderMaterial" id=3] resource_local_to_scene = true shader = ExtResource( 5 ) -shader_param/iTime = 3252.08 -shader_param/iFrame = 118130 +shader_param/iTime = 10.7628 +shader_param/iFrame = 609 shader_param/COVERAGE = 0.5 shader_param/THICKNESS = 25.0 shader_param/ABSORPTION = 1.031 @@ -121,9 +122,18 @@ extra_cull_margin = 16384.0 mesh = SubResource( 8 ) material/0 = SubResource( 9 ) +[node name="game_ui" parent="." instance=ExtResource( 11 )] + [node name="debug_window" parent="." instance=ExtResource( 8 )] visible = true +margin_left = 972.873 +margin_top = 52.3552 +margin_right = -51.1268 +margin_bottom = -411.645 theme = ExtResource( 9 ) custom_icons/close = ExtResource( 10 ) +[connection signal="douleur_changed" from="debug_window" to="." method="_on_debug_window_douleur_changed"] [connection signal="mist_level_changed" from="debug_window" to="." method="_on_debug_window_mist_level_changed"] +[connection signal="oubli_changed" from="debug_window" to="." method="_on_debug_window_oubli_changed"] [connection signal="time_of_day_changed" from="debug_window" to="." method="_on_debug_window_time_of_day_changed"] +[connection signal="trauma_changed" from="debug_window" to="." method="_on_debug_window_trauma_changed"] diff --git a/scenes/interfaces/game_menu/game_ui.gd b/scenes/interfaces/game_menu/game_ui.gd new file mode 100644 index 0000000..9e206a3 --- /dev/null +++ b/scenes/interfaces/game_menu/game_ui.gd @@ -0,0 +1,12 @@ +extends Control + + +func _ready(): + $stats_window.popup() + +func set_douleur( value ): + $stats_window/douleur.value = value +func set_oubli( value ): + $stats_window/oubli.value = value +func set_trauma( value ): + $stats_window/trauma.value = value diff --git a/scenes/interfaces/game_menu/game_ui.tscn b/scenes/interfaces/game_menu/game_ui.tscn new file mode 100644 index 0000000..4d6bdc1 --- /dev/null +++ b/scenes/interfaces/game_menu/game_ui.tscn @@ -0,0 +1,70 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://assets/interfaces/themes/transparent_window.tres" type="Theme" 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 +anchor_bottom = 1.0 +mouse_filter = 2 +script = ExtResource( 2 ) +__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 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="douleur" type="TextureProgress" parent="stats_window"] +margin_right = 126.0 +margin_bottom = 126.0 +max_value = 100.0 +step = 0.1 +texture_progress = ExtResource( 3 ) +fill_mode = 4 +tint_progress = Color( 1, 0, 0, 1 ) +radial_fill_degrees = 112.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="oubli" type="TextureProgress" parent="stats_window"] +margin_right = 126.0 +margin_bottom = 126.0 +step = 0.1 +texture_progress = ExtResource( 3 ) +fill_mode = 5 +tint_progress = Color( 0, 1, 0, 1 ) +radial_fill_degrees = 112.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="trauma" type="TextureProgress" parent="stats_window"] +margin_right = 126.0 +margin_bottom = 126.0 +step = 0.1 +texture_progress = ExtResource( 3 ) +fill_mode = 8 +tint_progress = Color( 0, 0, 1, 1 ) +radial_initial_angle = 180.0 +radial_fill_degrees = 135.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"] diff --git a/scenes/interfaces/windows/window.gd b/scenes/interfaces/windows/window.gd new file mode 100644 index 0000000..37eeb30 --- /dev/null +++ b/scenes/interfaces/windows/window.gd @@ -0,0 +1,25 @@ +extends WindowDialog + +var old_mouse_position = Vector2( 0, 0 ) + + +func _on_stats_window_gui_input(event): + + if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and Input.is_mouse_button_pressed( BUTTON_LEFT ): + self.old_mouse_position = event.position + + if event is InputEventMouseMotion and Input.is_mouse_button_pressed( BUTTON_LEFT ): + var delta = self.old_mouse_position - event.position + self.set_position( self.get_position() - delta ) + + +func _on_douleur_value_changed(value): + $douleur.self_modulate.a = (value / 100.0) * (value / 100.0) + + +func _on_oubli_value_changed(value): + $oubli.self_modulate.a = (value / 100.0) * (value / 100.0) + + +func _on_trauma_value_changed(value): + $trauma.self_modulate.a = (value / 100.0) * (value / 100.0) diff --git a/scenes/main/main.tscn b/scenes/main/main.tscn index add6776..a266ea8 100644 --- a/scenes/main/main.tscn +++ b/scenes/main/main.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://scenes/interfaces/main_menu/main_menu.tscn" type="PackedScene" id=1] -[ext_resource path="res://assets/interfaces/new_launcher_bg_0-1.png" type="Texture" id=2] +[ext_resource path="res://assets/interfaces/loading_screen/khanat_sound_cover_hover.png" type="Texture" id=2] [ext_resource path="res://scenes/main/main.gd" type="Script" id=3] -[ext_resource path="res://assets/interfaces/Login-Khanat-background-loading.png" type="Texture" id=4] +[ext_resource path="res://assets/interfaces/loading_screen/khanat_sound_cover_bg.png" type="Texture" id=4] +[ext_resource path="res://assets/interfaces/loading_screen/khanat_sound_cover_progress.png" type="Texture" id=5] [node name="main" type="Spatial"] script = ExtResource( 3 ) @@ -14,10 +15,14 @@ script = ExtResource( 3 ) [node name="loading_screen" type="TextureProgress" parent="."] visible = false -margin_right = 1280.0 -margin_bottom = 720.0 -texture_under = ExtResource( 2 ) -texture_progress = ExtResource( 4 ) +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_bottom = 6.10352e-05 +step = 0.1 +texture_under = ExtResource( 4 ) +texture_over = ExtResource( 2 ) +texture_progress = ExtResource( 5 ) +fill_mode = 6 nine_patch_stretch = true __meta__ = { "_edit_use_anchors_": false