diff --git a/client/levels/loadingScreen/LoadingScreen.tscn b/client/levels/loadingScreen/LoadingScreen.tscn index 7f7ef231b6d12915d8b343eb9046baf908807fd0..0990e336257d2c272535c5d3184c95f88b18d9a2 100644 --- a/client/levels/loadingScreen/LoadingScreen.tscn +++ b/client/levels/loadingScreen/LoadingScreen.tscn @@ -1,26 +1,154 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=8 format=2] -[sub_resource type="StreamTexture" id=1] -flags = 4 +[ext_resource path="res://levels/commons/assets/fondmain.png" type="Texture" id=1] +[ext_resource path="res://levels/loadingScreen/assets/fond2.png" type="Texture" id=2] +[ext_resource path="res://levels/loadingScreen/loadingScreen.gd" type="Script" id=3] +[ext_resource path="res://levels/commons/assets/logotmp.png" type="Texture" id=4] +[ext_resource path="res://levels/commons/themes/panelThemeBlack.tres" type="StyleBox" id=5] +[ext_resource path="res://levels/commons/themes/labelSkillFont.tres" type="Theme" id=6] + +[sub_resource type="Animation" id=1] +length = 5.0 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath(".:rect_scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0.5, 0.7, 0.9, 1.8, 2, 2.2, 3.2, 3.4, 3.6, 4.4, 4.6, 4.8 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ), Vector2( 0.99, 0.99 ), Vector2( 1, 1 ), Vector2( 1, 1 ), Vector2( 0.99, 0.99 ), Vector2( 1, 1 ), Vector2( 1, 1 ), Vector2( 0.99, 0.99 ), Vector2( 1, 1 ), Vector2( 1, 1 ), Vector2( 0.99, 0.99 ), Vector2( 1, 1 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:rect_rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 2.3, 5 ), +"transitions": PoolRealArray( 0.34151, 4.59479, 0.34151 ), +"update": 0, +"values": [ 0.0, 5.0, 0.0 ] +} [node name="loadingScreen" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +script = ExtResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="TextureRect3" type="TextureRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_right = 576.0 +margin_bottom = 1000.0 +texture = ExtResource( 1 ) +stretch_mode = 1 +__meta__ = { +"_edit_use_anchors_": false +} [node name="TextureRect" type="TextureRect" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -texture = SubResource( 1 ) - -[node name="Label" type="Label" parent="."] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -44.0 -margin_top = -7.0 -margin_right = 44.0 -margin_bottom = 7.0 -text = "Chargement" +texture = ExtResource( 2 ) +expand = true +stretch_mode = 7 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarginContainer" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/margin_right = 300 +custom_constants/margin_left = 300 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +margin_left = 300.0 +margin_right = 800.0 +margin_bottom = 600.0 + +[node name="MarginContainer2" type="MarginContainer" parent="MarginContainer/VBoxContainer"] +margin_right = 500.0 +margin_bottom = 50.0 +size_flags_horizontal = 3 +custom_constants/margin_top = 50 + +[node name="MusicArena" type="TextureRect" parent="MarginContainer/VBoxContainer"] +margin_top = 54.0 +margin_right = 500.0 +margin_bottom = 54.0 +rect_pivot_offset = Vector2( 175.725, -12.5801 ) +rect_clip_content = true +texture = ExtResource( 4 ) +expand = true +stretch_mode = 6 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="title" type="AnimationPlayer" parent="MarginContainer/VBoxContainer/MusicArena"] +autoplay = "title" +anims/title = SubResource( 1 ) + +[node name="MarginContainer3" type="MarginContainer" parent="MarginContainer/VBoxContainer"] +margin_top = 58.0 +margin_right = 500.0 +margin_bottom = 108.0 +size_flags_horizontal = 3 +custom_constants/margin_top = 50 + +[node name="Panel" type="Panel" parent="MarginContainer/VBoxContainer"] +margin_left = 250.0 +margin_top = 111.0 +margin_right = 250.0 +margin_bottom = 161.0 +rect_min_size = Vector2( 0, 50 ) +size_flags_horizontal = 4 +size_flags_vertical = 4 +custom_styles/panel = ExtResource( 5 ) + +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/Panel"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/margin_right = 10 +custom_constants/margin_top = 10 +custom_constants/margin_left = 10 +custom_constants/margin_bottom = 10 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Panel/MarginContainer"] +margin_left = 10.0 +margin_top = 16.0 +margin_right = 219.0 +margin_bottom = 34.0 +size_flags_vertical = 6 +theme = ExtResource( 6 ) +text = "your game is loading..." align = 1 +valign = 1 uppercase = true + +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer"] +margin_top = 166.0 +margin_right = 500.0 +margin_bottom = 600.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/margin_top = 290 diff --git a/client/levels/loadingScreen/assets/charaPic.png b/client/levels/loadingScreen/assets/charaPic.png new file mode 100644 index 0000000000000000000000000000000000000000..10242745c43285c796ffbfa9e6c0a7c885f657da Binary files /dev/null and b/client/levels/loadingScreen/assets/charaPic.png differ diff --git a/client/levels/loadingScreen/assets/charaPic.png.import b/client/levels/loadingScreen/assets/charaPic.png.import new file mode 100644 index 0000000000000000000000000000000000000000..c5299973ea05e77482d002b0b8c64b5cccf6890d --- /dev/null +++ b/client/levels/loadingScreen/assets/charaPic.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/charaPic.png-f26f91d582b4c7736730487d75b29713.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://levels/loadingScreen/assets/charaPic.png" +dest_files=[ "res://.import/charaPic.png-f26f91d582b4c7736730487d75b29713.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/client/levels/loadingScreen/assets/fond.png b/client/levels/loadingScreen/assets/fond.png new file mode 100644 index 0000000000000000000000000000000000000000..44cc44fc1df0dc47162e91548a5748a346dfa196 Binary files /dev/null and b/client/levels/loadingScreen/assets/fond.png differ diff --git a/client/levels/loadingScreen/assets/fond.png.import b/client/levels/loadingScreen/assets/fond.png.import new file mode 100644 index 0000000000000000000000000000000000000000..1ea7c03ccf01675b5e34dddc4fe1a55b31b58997 --- /dev/null +++ b/client/levels/loadingScreen/assets/fond.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/fond.png-b367423ab31d16ceed61fcc1087f6a2e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://levels/loadingScreen/assets/fond.png" +dest_files=[ "res://.import/fond.png-b367423ab31d16ceed61fcc1087f6a2e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/client/levels/loadingScreen/assets/fond2.png b/client/levels/loadingScreen/assets/fond2.png new file mode 100644 index 0000000000000000000000000000000000000000..b71c0f2b159ece8ab4ffdfe0860f833a38ff94ff Binary files /dev/null and b/client/levels/loadingScreen/assets/fond2.png differ diff --git a/client/levels/loadingScreen/assets/fond2.png.import b/client/levels/loadingScreen/assets/fond2.png.import new file mode 100644 index 0000000000000000000000000000000000000000..21038216823fcd386cd438ddf841d57294fd0156 --- /dev/null +++ b/client/levels/loadingScreen/assets/fond2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/fond2.png-dc4f9f0646444294ab806e07d71e43d6.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://levels/loadingScreen/assets/fond2.png" +dest_files=[ "res://.import/fond2.png-dc4f9f0646444294ab806e07d71e43d6.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/client/levels/loadingScreen/loadingScreen.gd b/client/levels/loadingScreen/loadingScreen.gd new file mode 100644 index 0000000000000000000000000000000000000000..a4038824deb235cb24c6b8b3a90b422ab173a279 --- /dev/null +++ b/client/levels/loadingScreen/loadingScreen.gd @@ -0,0 +1,47 @@ +extends Control + +var LOGO +var PANEL + +# Initial size = 408*175px +var rlogotmpX = float(300)/float(1024) +var rlogotmpY = float(129)/float(600) + +var xWindow = 0 +var yWindow = 0 +# Initial button size = 350*79px +# First display size = 300*61 +var ratioX = float(300)/float(1024) +var ratioY = float(79)/float(600) +var ratioPanel = float(425)/float(1014) + + +func _ready(): + LOGO = $MarginContainer/VBoxContainer/MusicArena + PANEL = $MarginContainer/VBoxContainer/Panel + + xWindow = get_viewport().size.x + yWindow = get_viewport().size.y + var x = xWindow*ratioX + #float(xWindow)*ratioX + var y = (float(79)*x)/float(350) + var logoX = float(xWindow)*rlogotmpX + var logoY = float(yWindow)*rlogotmpY + LOGO.set_custom_minimum_size(Vector2(logoX,logoY)) + var xPanel = float(xWindow)*ratioPanel + PANEL.set_custom_minimum_size(Vector2(xPanel,50)) + var error = get_tree().get_root().connect("size_changed", self, "myfunc") + +func myfunc(): + LOGO = $MarginContainer/VBoxContainer/MusicArena + PANEL = $MarginContainer/VBoxContainer/Panel + + if(get_viewport_rect().size.x != xWindow): + xWindow = get_viewport_rect().size.x + var x = float(xWindow)*ratioX + var y = 0 + var logoX = float(xWindow)*rlogotmpX + 40 + var logoY = (float(175)*x)/float(408) + var xPanel = float(xWindow)*ratioPanel + LOGO.set_custom_minimum_size(Vector2(logoX,logoY)) + PANEL.set_custom_minimum_size(Vector2(xPanel,50))