This commit is contained in:
2023-09-12 11:52:01 +03:00
parent a423a95ade
commit 3d888f9485
2 changed files with 41 additions and 16 deletions

View File

@@ -1,25 +1,50 @@
[gd_scene load_steps=5 format=3 uid="uid://nl1vklubr5kr"]
[gd_scene load_steps=7 format=3 uid="uid://nl1vklubr5kr"]
[ext_resource type="Shader" path="res://shaders/bip.gdshader" id="1_k6vue"]
[ext_resource type="Shader" path="res://bip.gdshader" id="1_7g5ro"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2dulj"]
shader = ExtResource("1_k6vue")
shader_parameter/color = Color(1, 0.101961, 0.494118, 1)
shader_parameter/color_up = Color(1, 1, 1, 1)
shader_parameter/tick_update = 0
shader = ExtResource("1_7g5ro")
shader_parameter/color = Color(1, 1, 1, 1)
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_tgf76"]
[sub_resource type="CanvasTexture" id="CanvasTexture_bupt8"]
[sub_resource type="GDScript" id="GDScript_4xy3s"]
script/source = "extends Sprite2D
func set_bip_color(col: Color): material.set('shader_parameter/color', col)
func get_bip_color() -> Color: return material.get('shader_parameter/color')
func set_tick_update(tick): material.set('shader_parameter/tick_update', tick)
func set_tick_update():
$animate.current_animation = 'new_animation'
$animate.seek(0)
$animate.play()
"
[sub_resource type="Animation" id="Animation_6ou4w"]
resource_name = "new_animation"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.1, 0.4),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(0.945098, 0.423529, 0.160784, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8nqrd"]
_data = {
"new_animation": SubResource("Animation_6ou4w")
}
[node name="bip" type="Sprite2D"]
material = SubResource("ShaderMaterial_2dulj")
position = Vector2(6, -5)
scale = Vector2(10, 10)
texture = SubResource("PlaceholderTexture2D_tgf76")
texture = SubResource("CanvasTexture_bupt8")
script = SubResource("GDScript_4xy3s")
[node name="animate" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_8nqrd")
}

View File

@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://trt0q8th3bn2"]
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_3f1mv"]
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="1_t5g4h"]
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_5ggvp"]
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="2_vhkcr"]
[node name="журнал" type="Control"]
layout_mode = 3
@@ -10,7 +10,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_3f1mv")
script = ExtResource("1_5ggvp")
[node name="content" type="RichTextLabel" parent="."]
layout_mode = 0
@@ -23,7 +23,7 @@ theme_override_colors/selection_color = Color(0.72549, 0.270588, 0.133333, 1)
threaded = true
selection_enabled = true
deselect_on_focus_loss_enabled = false
script = ExtResource("1_t5g4h")
script = ExtResource("2_vhkcr")
[node name="btn_save" type="Button" parent="."]
layout_mode = 0
@@ -43,8 +43,8 @@ text = "Очистить"
[node name="dlg_file" type="FileDialog" parent="."]
gui_embed_subwindows = true
title = "Сохранить журнал работы в файл"
initial_position = 2
title = "Сохранить журнал работы в файл"
size = Vector2i(900, 900)
borderless = true
ok_button_text = "Да"