adding icon jukebox

This commit is contained in:
AleaJactaEst 2021-06-22 18:22:58 +02:00
parent 500b4bc2e0
commit 8e5fad8d89
22 changed files with 1010 additions and 891 deletions

View file

@ -29,3 +29,8 @@
6) Correction du menu de selection de la langue 6) Correction du menu de selection de la langue
7) Activer la sortie audio en fonction de la selection dans le menu option 7) Activer la sortie audio en fonction de la selection dans le menu option
8) Ajouter un icon JukeBox dans la page de démarrage
9) A l'ouverture du JukeBox, il retaille la fenetre afin de ne pas avoir du scrolling (si possible)

View file

@ -0,0 +1,15 @@
1/ To check error on
Impossible de charger le script de lextension depuis le chemin : «res://addons/kh_window/kh_window_plugin.gd». Cela peut être dû à une erreur de programmation dans ce script.
2/
17/06/2021 | 21:49:01 Zatalyz: pour les nouveautés : il faudrait que le texte ne demande pas de scroll horizontal, qu'il s'adapte à la largeur de cette fenêtre. 80 caractères si tu cherche la meilleure taille pour ce morceau :)
dépend de la taille du texte, si trop grand ..., mais bonne remarque je note
17/06/2021 | 21:52:17 Zatalyz: ha, un détail : quand on choisit "tête", c'est pas mal de zoomer sur la tête
17/06/2021 | 21:52:47 Zatalyz: Ha oui, le nom commence par M, donc ça l'a fait apparaitre... je dirais : pas de raccourci sur cet écran :D
17/06/2021 | 21:53:07 Zatalyz: (zoomer automatiquement... j'ai trouvé le zoom sinon)
3/ je note ajouter un icon pour juke box

View file

@ -4,7 +4,7 @@ extends EditorPlugin
func _enter_tree(): func _enter_tree():
# Initialization of the plugin goes here # Initialization of the plugin goes here
# Add the new type with a name, a parent type, a script and an icon # Add the new type with a name, a parent type, a script and an icon
add_custom_type("kh_window", "MarginContainer", preload("kh_window.gd"), preload("icon.png")) add_custom_type("kh_window", "MarginContainer", preload("res://addons/kh_window/kh_window.gd"), preload("res://addons/kh_window/icon.png"))
func _exit_tree(): func _exit_tree():
# Clean-up of the plugin goes here # Clean-up of the plugin goes here

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -65,6 +65,7 @@ _global_script_class_icons={
config/name="Khanat" config/name="Khanat"
run/main_scene="res://scenes/main/main.tscn" run/main_scene="res://scenes/main/main.tscn"
boot_splash/image="res://assets/interfaces/new_launcher_bg_0-1.png" boot_splash/image="res://assets/interfaces/new_launcher_bg_0-1.png"
boot_splash/bg_color=Color( 0.12549, 0.145098, 0.192157, 1 )
config/icon="res://icon.png" config/icon="res://icon.png"
[audio] [audio]
@ -79,12 +80,18 @@ MusicManager="*res://scenes/interfaces/music_manager/music_manager.tscn"
Connection="*res://scenes/connection/connection.tscn" Connection="*res://scenes/connection/connection.tscn"
Globals="*res://ressources/scripts/global.gd" Globals="*res://ressources/scripts/global.gd"
Datas="*res://ressources/scripts/datas/data.gd" Datas="*res://ressources/scripts/datas/data.gd"
GeneratorMap="*res://scenes/game/generate_map.gd"
[debug] [debug]
settings/stdout/verbose_stdout=true
gdscript/completion/autocomplete_setters_and_getters=true gdscript/completion/autocomplete_setters_and_getters=true
gdscript/warnings/unused_class_variable=true gdscript/warnings/unused_class_variable=true
gdscript/warnings/return_value_discarded=false gdscript/warnings/return_value_discarded=false
gdscript/warnings/unsafe_property_access=true
gdscript/warnings/unsafe_method_access=true
gdscript/warnings/unsafe_cast=true
gdscript/warnings/unsafe_call_argument=true
[display] [display]

View file

@ -85,6 +85,7 @@ size = Vector2( 1, 1.5 )
[node name="attack_delay" type="Timer" parent="."] [node name="attack_delay" type="Timer" parent="."]
one_shot = true one_shot = true
[connection signal="animation_finished" from="creature" to="." method="_on_creature_animation_finished"] [connection signal="animation_finished" from="creature" to="." method="_on_creature_animation_finished"]
[connection signal="equip" from="creature" to="." method="_on_creature_equip"] [connection signal="equip" from="creature" to="." method="_on_creature_equip"]
[connection signal="is_dead" from="creature" to="." method="_on_creature_is_dead"] [connection signal="is_dead" from="creature" to="." method="_on_creature_is_dead"]

View file

@ -89,10 +89,15 @@ func load_from_name( p_name, p_emplacement = "usr" ):
self.update() self.update()
func update(): func update():
Config.msg_debug("Update")
if self.creature: if self.creature:
Config.msg_debug("scale:" + str(self.scale) + " y:" + str(self.translation.y))
if self.scale.y != self.creature.get_data( "size" ):
var delta_y = self.translation.y - self.scale.y
Config.msg_debug("scale:" + str(self.scale) + " y:" + str(self.translation.y) + " deltaY:" + str(delta_y))
self.scale = Vector3( self.creature.get_data( "size" ), self.creature.get_data( "size" ), self.creature.get_data( "size" ) ) self.scale = Vector3( self.creature.get_data( "size" ), self.creature.get_data( "size" ), self.creature.get_data( "size" ) )
self.translation.y = self.scale.y + delta_y
Config.msg_debug("scale:" + str(self.scale) + " y:" + str(self.translation.y) + " deltaY:" + str(self.translation.y - self.scale.y))
self.set_blend_shape( "caucasian", self.creature.get_data( "caucasian" ) ) self.set_blend_shape( "caucasian", self.creature.get_data( "caucasian" ) )
self.set_blend_shape( "african", self.creature.get_data( "african" ) ) self.set_blend_shape( "african", self.creature.get_data( "african" ) )

View file

@ -229,7 +229,6 @@ func _on_underwear_button_toggled(button_pressed):
else: else:
$margin_box/window_box/content_box/preview_box/v_box_container/underwear_button.modulate.a = 0.5 $margin_box/window_box/content_box/preview_box/v_box_container/underwear_button.modulate.a = 0.5
func _on_zoom_head_button_toggled(button_pressed): func _on_zoom_head_button_toggled(button_pressed):
emit_signal( "zoom_head_button_toggled", button_pressed ) emit_signal( "zoom_head_button_toggled", button_pressed )

View file

@ -1,8 +1,27 @@
[gd_scene load_steps=4 format=2] [gd_scene load_steps=7 format=2]
[ext_resource path="res://scenes/characters/character.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/characters/character.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/creatures/creature_creation_menu.tscn" type="PackedScene" id=2] [ext_resource path="res://scenes/creatures/creature_creation_menu.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/creatures/creatures_creation.gd" type="Script" id=3] [ext_resource path="res://scenes/creatures/creatures_creation.gd" type="Script" id=3]
[ext_resource path="res://assets/interfaces/creatures_creation/Material.material" type="Material" id=4]
[sub_resource type="ArrayMesh" id=1]
resource_name = "Cube"
surfaces/0 = {
"aabb": AABB( -4, -1, -4, 8.00001, 1.00001, 8 ),
"array_data": PoolByteArray( 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 128, 192, 0, 0, 129, 0, 0, 127, 0, 127, 0, 57, 0, 56, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 128, 192, 0, 127, 0, 0, 129, 0, 0, 127, 0, 57, 0, 56, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 128, 192, 127, 0, 0, 0, 0, 127, 0, 127, 0, 57, 0, 56, 0, 0, 128, 64, 0, 0, 128, 191, 0, 0, 128, 192, 0, 129, 0, 0, 127, 0, 0, 127, 0, 54, 0, 56, 0, 0, 128, 64, 0, 0, 128, 191, 0, 0, 128, 192, 0, 0, 129, 0, 0, 127, 0, 127, 0, 54, 0, 56, 0, 0, 128, 64, 0, 0, 128, 191, 0, 0, 128, 192, 127, 0, 0, 0, 0, 127, 0, 127, 0, 54, 0, 56, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 128, 64, 0, 0, 127, 0, 0, 127, 0, 127, 0, 57, 0, 52, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 128, 64, 0, 127, 0, 0, 129, 0, 0, 127, 0, 57, 0, 52, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 128, 64, 127, 0, 0, 0, 0, 127, 0, 127, 0, 57, 0, 52, 0, 0, 128, 64, 0, 0, 128, 191, 0, 0, 128, 64, 0, 129, 0, 0, 127, 0, 0, 127, 0, 54, 0, 52, 0, 0, 128, 64, 0, 0, 128, 191, 0, 0, 128, 64, 0, 0, 127, 0, 0, 127, 0, 127, 0, 54, 0, 52, 0, 0, 128, 64, 0, 0, 128, 191, 0, 0, 128, 64, 127, 0, 0, 0, 0, 127, 0, 127, 0, 54, 0, 52, 0, 0, 128, 192, 0, 0, 0, 0, 0, 0, 128, 192, 129, 0, 0, 0, 0, 127, 0, 127, 0, 57, 0, 58, 0, 0, 128, 192, 0, 0, 0, 0, 0, 0, 128, 192, 0, 0, 129, 0, 0, 127, 0, 127, 0, 57, 0, 58, 0, 0, 128, 192, 0, 0, 0, 0, 0, 0, 128, 192, 0, 127, 0, 0, 129, 0, 0, 127, 0, 59, 0, 56, 0, 0, 128, 192, 0, 0, 128, 191, 0, 0, 128, 192, 129, 0, 0, 0, 0, 127, 0, 127, 0, 54, 0, 58, 0, 0, 128, 192, 0, 0, 128, 191, 0, 0, 128, 192, 0, 129, 0, 0, 127, 0, 0, 127, 0, 48, 0, 56, 0, 0, 128, 192, 0, 0, 128, 191, 0, 0, 128, 192, 0, 0, 129, 0, 0, 127, 0, 127, 0, 54, 0, 58, 0, 0, 128, 192, 0, 0, 0, 0, 0, 0, 128, 64, 129, 0, 0, 0, 0, 127, 0, 127, 0, 57, 0, 60, 0, 0, 128, 192, 0, 0, 0, 0, 0, 0, 128, 64, 0, 0, 127, 0, 0, 127, 0, 127, 0, 57, 0, 0, 0, 0, 128, 192, 0, 0, 0, 0, 0, 0, 128, 64, 0, 127, 0, 0, 129, 0, 0, 127, 0, 59, 0, 52, 0, 0, 128, 192, 0, 0, 128, 191, 0, 0, 128, 64, 129, 0, 0, 0, 0, 127, 0, 127, 0, 54, 0, 60, 0, 0, 128, 192, 0, 0, 128, 191, 0, 0, 128, 64, 0, 129, 0, 0, 127, 0, 0, 127, 0, 48, 0, 52, 0, 0, 128, 192, 0, 0, 128, 191, 0, 0, 128, 64, 0, 0, 127, 0, 0, 127, 0, 127, 0, 54, 0, 0 ),
"array_index_data": PoolByteArray( 1, 0, 20, 0, 14, 0, 1, 0, 7, 0, 20, 0, 10, 0, 19, 0, 6, 0, 10, 0, 23, 0, 19, 0, 21, 0, 12, 0, 18, 0, 21, 0, 15, 0, 12, 0, 16, 0, 9, 0, 3, 0, 16, 0, 22, 0, 9, 0, 5, 0, 8, 0, 2, 0, 5, 0, 11, 0, 8, 0, 17, 0, 0, 0, 13, 0, 17, 0, 4, 0, 0, 0 ),
"blend_shape_data": [ ],
"format": 97559,
"index_count": 36,
"material": ExtResource( 4 ),
"primitive": 4,
"skeleton_aabb": [ ],
"vertex_count": 24
}
[sub_resource type="ConcavePolygonShape" id=2]
data = PoolVector3Array( 4, 0, -4, -4, 0, 4, -4, 0, -4, 4, 0, -4, 4, 0, 4, -4, 0, 4, 4, -1, 4, -4, 0, 4, 4, 0, 4, 4, -1, 4, -4, -1, 4, -4, 0, 4, -4, -1, 4, -4, 0, -4, -4, 0, 4, -4, -1, 4, -4, -1, -4, -4, 0, -4, -4, -1, -4, 4, -1, 4, 4, -1, -4, -4, -1, -4, -4, -1, 4, 4, -1, 4, 4, -1, -4, 4, 0, 4, 4, 0, -4, 4, -1, -4, 4, -1, 4, 4, 0, 4, -4, -1, -4, 4, 0, -4, -4, 0, -4, -4, -1, -4, 4, -1, -4, 4, 0, -4 )
[node name="creatures_creation" type="Spatial"] [node name="creatures_creation" type="Spatial"]
script = ExtResource( 3 ) script = ExtResource( 3 )
@ -27,6 +46,23 @@ gravity = 0.0
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.98872, 2.59328 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.98872, 2.59328 )
light_specular = 0.1 light_specular = 0.1
[node name="root" type="Spatial" parent="."]
[node name="Cube" type="MeshInstance" parent="root"]
mesh = SubResource( 1 )
material/0 = null
[node name="static_body" type="StaticBody" parent="root/Cube"]
[node name="collision_shape" type="CollisionShape" parent="root/Cube/static_body"]
shape = SubResource( 2 )
[node name="Light" type="Spatial" parent="root"]
transform = Transform( -0.290865, 0.566393, 0.771101, -0.0551891, 0.794672, -0.604525, -0.955171, -0.218391, -0.199883, 4.07625, 5.90386, -1.00545 )
[node name="Camera" type="Spatial" parent="root"]
transform = Transform( 0.685921, 0.651558, 0.324014, 0, 0.445271, -0.895396, -0.727676, 0.61417, 0.305421, 7.35889, 4.95831, 6.92579 )
[connection signal="choose_pressed" from="creature_creation_menu" to="." method="_on_creature_creation_menu_choose_pressed"] [connection signal="choose_pressed" from="creature_creation_menu" to="." method="_on_creature_creation_menu_choose_pressed"]
[connection signal="cloths_button_toggled" from="creature_creation_menu" to="." method="_on_creature_creation_menu_cloths_button_toggled"] [connection signal="cloths_button_toggled" from="creature_creation_menu" to="." method="_on_creature_creation_menu_cloths_button_toggled"]
[connection signal="load_pressed" from="creature_creation_menu" to="." method="_on_creature_creation_menu_load_pressed"] [connection signal="load_pressed" from="creature_creation_menu" to="." method="_on_creature_creation_menu_load_pressed"]

View file

@ -30,5 +30,6 @@ transform = Transform( 1, 0, 0, 0, -1.62921e-07, 1, 0, -1, -1.62921e-07, 0, 0, 0
[node name="drop_point" type="Spatial" parent="."] [node name="drop_point" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.332089, -0.157172 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.332089, -0.157172 )
[connection signal="animation_finished" from="body_parts/body" to="." method="_on_body_animation_finished"] [connection signal="animation_finished" from="body_parts/body" to="." method="_on_body_animation_finished"]
[connection signal="limb_body_entered" from="body_parts/body" to="." method="_on_body_limb_body_entered"] [connection signal="limb_body_entered" from="body_parts/body" to="." method="_on_body_limb_body_entered"]

View file

@ -179,6 +179,7 @@ bone_name = "pelvis.R"
[node name="handle" type="Spatial" parent="skeleton/attachment_hips_R" index="0"] [node name="handle" type="Spatial" parent="skeleton/attachment_hips_R" index="0"]
transform = Transform( -0.142459, -0.381941, -0.913079, -0.617878, -0.686553, 0.383382, -0.773427, 0.618672, -0.138049, 0.0391004, 0.0367368, 0.013404 ) transform = Transform( -0.142459, -0.381941, -0.913079, -0.617878, -0.686553, 0.383382, -0.773427, 0.618672, -0.138049, 0.0391004, 0.0367368, 0.013404 )
[connection signal="animation_finished" from="skeleton/AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"] [connection signal="animation_finished" from="skeleton/AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
[connection signal="body_entered" from="skeleton/limb_head/area" to="." method="_on_limb_head_area_body_entered"] [connection signal="body_entered" from="skeleton/limb_head/area" to="." method="_on_limb_head_area_body_entered"]
[connection signal="body_entered" from="skeleton/limb_torso_1/area" to="." method="_on_limb_tosro_1_body_entered"] [connection signal="body_entered" from="skeleton/limb_torso_1/area" to="." method="_on_limb_tosro_1_body_entered"]

View file

@ -249,6 +249,7 @@ func add_music(file: String):
self.next_id += 1 self.next_id += 1
playlist_music['player'] = $window_box/scroll_box/musics_box.get_children() playlist_music['player'] = $window_box/scroll_box/musics_box.get_children()
load_music_to_config() load_music_to_config()
auto_sizing_windows()
func _on_music_box_delete_pressed( id ): func _on_music_box_delete_pressed( id ):
@ -256,6 +257,7 @@ func _on_music_box_delete_pressed( id ):
for child in $window_box/scroll_box/musics_box.get_children(): for child in $window_box/scroll_box/musics_box.get_children():
if child.id == id: if child.id == id:
child.queue_free() child.queue_free()
auto_sizing_windows()
func _on_music_box_down_pressed( id ): func _on_music_box_down_pressed( id ):
@ -307,9 +309,35 @@ func move_child_id(id, pos):
load_music_to_config() load_music_to_config()
func auto_sizing_windows():
Config.msg_debug("Auto sizing Jukebox")
var max_x = 0
var max_y = $window_box/controls_box.rect_size.y
for child in $window_box/scroll_box/musics_box.get_children():
var x = 0
for child2 in child.get_children():
x += child2.rect_size.x
if max_x < x:
max_x += x
max_y += 24
var tx = int( (get_viewport().size.x - max_x) / 2 )
var ty = int( (get_viewport().size.y - max_y) / 2 )
if tx <= 20:
max_x = get_viewport().size.x - 20
tx = 10
if ty <= 20:
max_y = get_viewport().size.y - 20
ty = 10
self.rect_size.x = max_x
self.rect_position.x = tx
self.rect_size.y = max_y
self.rect_position.y = ty
func open(): func open():
Config.msg_debug("Open") Config.msg_debug("Open")
update_playermusic() update_playermusic()
# auto_sizing_windows()
self.popup() self.popup()

View file

@ -74,3 +74,7 @@ func _on_sound_button_pressed():
func _on_control_mute_pressed(): func _on_control_mute_pressed():
Config.msg_debug("<Option> Received Signal mute") Config.msg_debug("<Option> Received Signal mute")
update_sound_button() update_sound_button()
func _on_jukebox_button_pressed():
MusicManager.open()

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=19 format=2] [gd_scene load_steps=21 format=2]
[ext_resource path="res://scenes/interfaces/options/options.gd" type="Script" id=1] [ext_resource path="res://scenes/interfaces/options/options.gd" type="Script" id=1]
[ext_resource path="res://assets/interfaces/Login-Khanat-help-button.png" type="Texture" id=2] [ext_resource path="res://assets/interfaces/Login-Khanat-help-button.png" type="Texture" id=2]
@ -18,6 +18,8 @@
[ext_resource path="res://assets/interfaces/Login-Khanat-language-button-hover.png" type="Texture" id=16] [ext_resource path="res://assets/interfaces/Login-Khanat-language-button-hover.png" type="Texture" id=16]
[ext_resource path="res://assets/interfaces/Login-Khanat-settings-button-hover.png" type="Texture" id=17] [ext_resource path="res://assets/interfaces/Login-Khanat-settings-button-hover.png" type="Texture" id=17]
[ext_resource path="res://scenes/interfaces/options/option_settings.tscn" type="PackedScene" id=18] [ext_resource path="res://scenes/interfaces/options/option_settings.tscn" type="PackedScene" id=18]
[ext_resource path="res://assets/interfaces/Login-Khanat-jukebox-button.png" type="Texture" id=19]
[ext_resource path="res://assets/interfaces/Login-Khanat-jukebox-button-hover.png" type="Texture" id=20]
[node name="control" type="Control"] [node name="control" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
@ -32,7 +34,7 @@ __meta__ = {
[node name="options_reduce" type="TextureRect" parent="."] [node name="options_reduce" type="TextureRect" parent="."]
anchor_left = 1.0 anchor_left = 1.0
anchor_right = 1.0 anchor_right = 1.0
margin_left = -416.0 margin_left = -474.0
margin_bottom = 69.0 margin_bottom = 69.0
mouse_default_cursor_shape = 5 mouse_default_cursor_shape = 5
texture = ExtResource( 4 ) texture = ExtResource( 4 )
@ -41,8 +43,8 @@ __meta__ = {
} }
[node name="h_box_container" type="HBoxContainer" parent="options_reduce"] [node name="h_box_container" type="HBoxContainer" parent="options_reduce"]
margin_left = 30.0 margin_left = 45.0
margin_right = 396.0 margin_right = 447.0
margin_bottom = 64.0 margin_bottom = 64.0
alignment = 2 alignment = 2
__meta__ = { __meta__ = {
@ -50,22 +52,21 @@ __meta__ = {
} }
[node name="news_button" type="TextureButton" parent="options_reduce/h_box_container"] [node name="news_button" type="TextureButton" parent="options_reduce/h_box_container"]
margin_left = 22.0 margin_right = 54.0
margin_right = 76.0
margin_bottom = 64.0 margin_bottom = 64.0
texture_normal = ExtResource( 8 ) texture_normal = ExtResource( 8 )
texture_hover = ExtResource( 15 ) texture_hover = ExtResource( 15 )
[node name="language_button" type="TextureButton" parent="options_reduce/h_box_container"] [node name="language_button" type="TextureButton" parent="options_reduce/h_box_container"]
margin_left = 80.0 margin_left = 58.0
margin_right = 134.0 margin_right = 112.0
margin_bottom = 64.0 margin_bottom = 64.0
texture_normal = ExtResource( 9 ) texture_normal = ExtResource( 9 )
texture_hover = ExtResource( 16 ) texture_hover = ExtResource( 16 )
[node name="sound_button" type="TextureButton" parent="options_reduce/h_box_container"] [node name="sound_button" type="TextureButton" parent="options_reduce/h_box_container"]
margin_left = 138.0 margin_left = 116.0
margin_right = 192.0 margin_right = 170.0
margin_bottom = 64.0 margin_bottom = 64.0
texture_normal = ExtResource( 6 ) texture_normal = ExtResource( 6 )
texture_hover = ExtResource( 14 ) texture_hover = ExtResource( 14 )
@ -73,23 +74,30 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="jukebox_button" type="TextureButton" parent="options_reduce/h_box_container"]
margin_left = 174.0
margin_right = 228.0
margin_bottom = 64.0
texture_normal = ExtResource( 19 )
texture_hover = ExtResource( 20 )
[node name="help_button" type="TextureButton" parent="options_reduce/h_box_container"] [node name="help_button" type="TextureButton" parent="options_reduce/h_box_container"]
margin_left = 196.0 margin_left = 232.0
margin_right = 250.0 margin_right = 286.0
margin_bottom = 64.0 margin_bottom = 64.0
texture_normal = ExtResource( 2 ) texture_normal = ExtResource( 2 )
texture_hover = ExtResource( 7 ) texture_hover = ExtResource( 7 )
[node name="settings_button" type="TextureButton" parent="options_reduce/h_box_container"] [node name="settings_button" type="TextureButton" parent="options_reduce/h_box_container"]
margin_left = 254.0 margin_left = 290.0
margin_right = 308.0 margin_right = 344.0
margin_bottom = 64.0 margin_bottom = 64.0
texture_normal = ExtResource( 5 ) texture_normal = ExtResource( 5 )
texture_hover = ExtResource( 17 ) texture_hover = ExtResource( 17 )
[node name="quit_button" type="TextureButton" parent="options_reduce/h_box_container"] [node name="quit_button" type="TextureButton" parent="options_reduce/h_box_container"]
margin_left = 312.0 margin_left = 348.0
margin_right = 366.0 margin_right = 402.0
margin_bottom = 64.0 margin_bottom = 64.0
texture_normal = ExtResource( 3 ) texture_normal = ExtResource( 3 )
texture_hover = ExtResource( 10 ) texture_hover = ExtResource( 10 )
@ -117,6 +125,7 @@ visible = false
[connection signal="pressed" from="options_reduce/h_box_container/news_button" to="." method="_on_news_button_pressed"] [connection signal="pressed" from="options_reduce/h_box_container/news_button" to="." method="_on_news_button_pressed"]
[connection signal="pressed" from="options_reduce/h_box_container/language_button" to="." method="_on_language_button_pressed"] [connection signal="pressed" from="options_reduce/h_box_container/language_button" to="." method="_on_language_button_pressed"]
[connection signal="pressed" from="options_reduce/h_box_container/sound_button" to="." method="_on_sound_button_pressed"] [connection signal="pressed" from="options_reduce/h_box_container/sound_button" to="." method="_on_sound_button_pressed"]
[connection signal="pressed" from="options_reduce/h_box_container/jukebox_button" to="." method="_on_jukebox_button_pressed"]
[connection signal="pressed" from="options_reduce/h_box_container/help_button" to="." method="_on_help_button_pressed"] [connection signal="pressed" from="options_reduce/h_box_container/help_button" to="." method="_on_help_button_pressed"]
[connection signal="pressed" from="options_reduce/h_box_container/settings_button" to="." method="_on_settings_button_pressed"] [connection signal="pressed" from="options_reduce/h_box_container/settings_button" to="." method="_on_settings_button_pressed"]
[connection signal="pressed" from="options_reduce/h_box_container/quit_button" to="." method="_on_quit_button_pressed"] [connection signal="pressed" from="options_reduce/h_box_container/quit_button" to="." method="_on_quit_button_pressed"]

View file

@ -11,13 +11,14 @@ var is_scene_loading = false
var creature_selected_slot = null var creature_selected_slot = null
var creature_selected_filename = null var creature_selected_filename = null
func _ready(): func _ready():
Connection.connect( "connection_ok", self, "_on_connexion_ok" ) Connection.connect( "connection_ok", self, "_on_connexion_ok" )
Connection.connect( "connection_error", self, "_on_connection_error" ) Connection.connect( "connection_error", self, "_on_connection_error" )
#GeneratorMap.GenerateSphere()
#GeneratorMap.GenerateMap("res://ground-0-2-high.png", 0 , 0)
#GeneratorMap.GenerateMap("res://ground-0-4-high.png", 0 , 0)
Globals.ressource_queue.start() Globals.ressource_queue.start()
func _process(_time): func _process(_time):
if self.is_scene_loading: if self.is_scene_loading:
if Globals.ressource_queue.is_ready( self.current_scene_path ): if Globals.ressource_queue.is_ready( self.current_scene_path ):

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=4 format=2] [gd_scene load_steps=5 format=2]
[ext_resource path="res://scenes/interfaces/main_menu/main_menu.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/interfaces/main_menu/main_menu.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/interfaces/loading_screen/loading_screen.tscn" type="PackedScene" id=2] [ext_resource path="res://scenes/interfaces/loading_screen/loading_screen.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/main/main.gd" type="Script" id=3] [ext_resource path="res://scenes/main/main.gd" type="Script" id=3]
[ext_resource path="res://map0-0.tres" type="ArrayMesh" id=5]
[node name="main" type="Spatial"] [node name="main" type="Spatial"]
script = ExtResource( 3 ) script = ExtResource( 3 )
@ -16,5 +17,10 @@ margin_bottom = 1.49829
[node name="loading_screen" parent="." instance=ExtResource( 2 )] [node name="loading_screen" parent="." instance=ExtResource( 2 )]
visible = false visible = false
[node name="mesh_instance_2" type="MeshInstance" parent="."]
visible = false
mesh = ExtResource( 5 )
material/0 = null
[connection signal="play_pressed" from="main_menu" to="." method="_on_main_menu_play_pressed"] [connection signal="play_pressed" from="main_menu" to="." method="_on_main_menu_play_pressed"]
[connection signal="quit_pressed" from="main_menu" to="." method="_on_main_menu_quit_pressed"] [connection signal="quit_pressed" from="main_menu" to="." method="_on_main_menu_quit_pressed"]

View file

@ -67,6 +67,7 @@ material/0 = SubResource( 3 )
[node name="collision_shape" type="CollisionShape" parent="character/crosshair/crosshair_area"] [node name="collision_shape" type="CollisionShape" parent="character/crosshair/crosshair_area"]
shape = SubResource( 4 ) shape = SubResource( 4 )
[connection signal="equip" from="character" to="." method="_on_character_equip"] [connection signal="equip" from="character" to="." method="_on_character_equip"]
[connection signal="unequip" from="character" to="." method="_on_character_unequip"] [connection signal="unequip" from="character" to="." method="_on_character_unequip"]
[connection signal="body_entered" from="character/interact_area" to="." method="_on_interact_area_body_entered"] [connection signal="body_entered" from="character/interact_area" to="." method="_on_interact_area_body_entered"]