update assets + new window

This commit is contained in:
Mylloon 2023-02-26 18:31:57 +01:00
parent 38384d82af
commit 59cb8370cb
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
10 changed files with 120 additions and 22 deletions

BIN
Assets/warning2/0.png (Stored with Git LFS)

Binary file not shown.

BIN
Assets/warning2/1.png (Stored with Git LFS)

Binary file not shown.

BIN
Assets/warning2/2.png (Stored with Git LFS)

Binary file not shown.

BIN
Assets/warning2/3.png (Stored with Git LFS)

Binary file not shown.

BIN
Assets/windows/window_main.png (Stored with Git LFS) Executable file

Binary file not shown.

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/window_main.png-7b32d96b4553f4a0a864caadf78c1293.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/windows/window_main.png"
dest_files=[ "res://.import/window_main.png-7b32d96b4553f4a0a864caadf78c1293.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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -1,7 +1,11 @@
[gd_scene load_steps=5 format=2] [gd_scene load_steps=10 format=2]
[ext_resource path="res://Assets/windows/folder_square.png" type="Texture" id=1] [ext_resource path="res://Assets/windows/folder_square.png" type="Texture" id=1]
[ext_resource path="res://Elements/Scripts/WindowHeader.gd" type="Script" id=2] [ext_resource path="res://Elements/Scripts/WindowHeader.gd" type="Script" id=2]
[ext_resource path="res://Assets/warning2/1.png" type="Texture" id=3]
[ext_resource path="res://Assets/warning2/2.png" type="Texture" id=4]
[ext_resource path="res://Assets/warning2/3.png" type="Texture" id=5]
[ext_resource path="res://Assets/warning2/0.png" type="Texture" id=6]
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 555, 60 ) extents = Vector2( 555, 60 )
@ -9,6 +13,14 @@ extents = Vector2( 555, 60 )
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 38.75, 38.75 ) extents = Vector2( 38.75, 38.75 )
[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ ExtResource( 6 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "default",
"speed": 5.0
} ]
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
position = Vector2( 312, 248 ) position = Vector2( 312, 248 )
@ -33,5 +45,31 @@ script = ExtResource( 2 )
position = Vector2( 486.25, -486.25 ) position = Vector2( 486.25, -486.25 )
shape = SubResource( 2 ) shape = SubResource( 2 )
[node name="Window2" type="AnimatedSprite" parent="."]
visible = false
position = Vector2( 56, -12 )
scale = Vector2( 0.4, 0.4 )
frames = SubResource( 3 )
frame = 2
playing = true
[node name="Area2D" type="Area2D" parent="Window2"]
position = Vector2( 487.5, -490 )
script = ExtResource( 2 )
[node name="Header" type="CollisionShape2D" parent="Window2/Area2D"]
position = Vector2( -489.5, 171 )
scale = Vector2( 0.999999, 0.999999 )
shape = SubResource( 1 )
[node name="Area2D2" type="Area2D" parent="Window2"]
script = ExtResource( 2 )
[node name="CloseButton" type="CollisionShape2D" parent="Window2/Area2D2"]
position = Vector2( 488, -321 )
shape = SubResource( 2 )
[connection signal="input_event" from="Window/Area2D" to="Window/Area2D" method="_on_Area2D_input_event"] [connection signal="input_event" from="Window/Area2D" to="Window/Area2D" method="_on_Area2D_input_event"]
[connection signal="input_event" from="Window/Area2D2" to="Window/Area2D" method="_on_Area2D2_input_event"] [connection signal="input_event" from="Window/Area2D2" to="Window/Area2D" method="_on_Area2D2_input_event"]
[connection signal="input_event" from="Window2/Area2D" to="Window2/Area2D" method="_on_Area2D_input_event"]
[connection signal="input_event" from="Window2/Area2D2" to="Window/Area2D" method="_on_Area2D2_input_event"]

View file

@ -6,7 +6,7 @@
[ext_resource path="res://Assets/tres_button/normal.tres" type="StyleBox" id=4] [ext_resource path="res://Assets/tres_button/normal.tres" type="StyleBox" id=4]
[ext_resource path="res://Assets/tres_button/pressed.tres" type="StyleBox" id=5] [ext_resource path="res://Assets/tres_button/pressed.tres" type="StyleBox" id=5]
[ext_resource path="res://Assets/tres_button/hover.tres" type="StyleBox" id=6] [ext_resource path="res://Assets/tres_button/hover.tres" type="StyleBox" id=6]
[ext_resource path="res://Assets/windows/windows.png" type="Texture" id=7] [ext_resource path="res://Assets/windows/window_main.png" type="Texture" id=7]
[ext_resource path="res://Assets/skin_assets/menu_font.tres" type="DynamicFont" id=8] [ext_resource path="res://Assets/skin_assets/menu_font.tres" type="DynamicFont" id=8]
[ext_resource path="res://Elements/SquareWindow.tscn" type="PackedScene" id=9] [ext_resource path="res://Elements/SquareWindow.tscn" type="PackedScene" id=9]
[ext_resource path="res://Scenes/Scripts/Desktop.gd" type="Script" id=10] [ext_resource path="res://Scenes/Scripts/Desktop.gd" type="Script" id=10]
@ -20,8 +20,8 @@
script = ExtResource( 10 ) script = ExtResource( 10 )
[node name="Windows" type="Sprite" parent="."] [node name="Windows" type="Sprite" parent="."]
visible = false position = Vector2( 511, 360 )
position = Vector2( 512, 358 ) scale = Vector2( 0.5, 0.5 )
z_index = -3 z_index = -3
texture = ExtResource( 7 ) texture = ExtResource( 7 )
@ -29,16 +29,14 @@ texture = ExtResource( 7 )
position = Vector2( 871, 589 ) position = Vector2( 871, 589 )
scale = Vector2( 0.2, 0.2 ) scale = Vector2( 0.2, 0.2 )
[node name="Directories" type="Node2D" parent="."] [node name="Directory" parent="." instance=ExtResource( 2 )]
[node name="Directory1" parent="Directories" instance=ExtResource( 2 )]
position = Vector2( 64, 64 ) position = Vector2( 64, 64 )
[node name="Screen" parent="Directories/Directory1" instance=ExtResource( 9 )] [node name="Screen" parent="Directory" instance=ExtResource( 9 )]
visible = false visible = false
position = Vector2( 271, 205 ) position = Vector2( 271, 205 )
[node name="Button2" type="Button" parent="Directories/Directory1/Screen"] [node name="Button2" type="Button" parent="Directory/Screen"]
margin_left = -128.0 margin_left = -128.0
margin_top = -32.0 margin_top = -32.0
margin_right = 149.0 margin_right = 149.0
@ -67,4 +65,4 @@ autoplay = true
[node name="Alert" type="AudioStreamPlayer" parent="."] [node name="Alert" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 13 ) stream = ExtResource( 13 )
[connection signal="pressed" from="Directories/Directory1/Screen/Button2" to="Directories/Directory1/Screen/Button2" method="_on_Button_pressed"] [connection signal="pressed" from="Directory/Screen/Button2" to="Directory/Screen/Button2" method="_on_Button_pressed"]

View file

@ -1,7 +1,7 @@
extends Button extends Button
onready var villain = $"../../../../Villain/AnimatedSprite" onready var villain = $"../../../Villain/AnimatedSprite"
onready var villain_animations = $"../../../../Villain" onready var villain_animations = $"../../../Villain"
var etat = false var etat = false
var remplissage = 0 var remplissage = 0

View file

@ -5,17 +5,41 @@ onready var villain_animations = $"Villain"
onready var mainMusic = $"MainMusic" onready var mainMusic = $"MainMusic"
onready var eyeMusic = $"EyeMusic" onready var eyeMusic = $"EyeMusic"
onready var alert = $"Alert" onready var alert = $"Alert"
onready var directory = $"Directory"
var rng = RandomNumberGenerator.new() var rng = RandomNumberGenerator.new()
const texture_file = preload("res://Assets/dossier/1.png")
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready() -> void: func _ready() -> void:
rng.randomize() rng.randomize()
var nbDossier = rng.randi_range(0, 3) var nbDossier = rng.randi_range(0, 3)
for i in range(nbDossier): for i in range(nbDossier):
var dossier = get_child(2).duplicate() var dossier = directory.duplicate()
dossier.get_child(0).get_child(3).get_child(1).focus_mode = Button.FOCUS_NONE var icon = dossier.get_node("Sprite")
var window = dossier.get_node("Screen")
var button_window = window.get_node("Button2")
# Une chance sur 2 d'avoir une icône
if rng.randi_range(0, 1) == 0:
# Text (icon)
var name_icon = dossier.get_node("Label")
name_icon.text = "Fichier"
# Texture (icon)
var scale_icon = 0.35
icon.scale = Vector2(scale_icon, scale_icon)
icon.texture = texture_file
# Background (window)
window.get_node("Window").visible = false
window.get_node("Window2").visible = true
# Change button text
button_window.text = "."
button_window.focus_mode = Button.FOCUS_NONE
dossier.position = Vector2(dossier.position.x, dossier.position.y + 150 * (i + 1)) dossier.position = Vector2(dossier.position.x, dossier.position.y + 150 * (i + 1))
dossier.set_z_index(dossier.get_z_index() + 10 * (i + 1)) dossier.set_z_index(dossier.get_z_index() + 10 * (i + 1))
add_child(dossier) add_child(dossier)