Made quest visuals

feature/quest_system
cblech 6 months ago
parent 27e137bc02
commit 32249fde86

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cvu5dybw31uxn"
path="res://.godot/imported/Circle.png-1776eabbad99f201f3fa20f90655dedf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ui/UI/Circle.png"
dest_files=["res://.godot/imported/Circle.png-1776eabbad99f201f3fa20f90655dedf.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://70twb0i3e2wo"
path="res://.godot/imported/journal_note.png-456d095624ebf40e3c23543b3d0f829a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ui/UI/journal_note.png"
dest_files=["res://.godot/imported/journal_note.png-456d095624ebf40e3c23543b3d0f829a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0anh3hdk0clc"
path="res://.godot/imported/journal_standard.png-09a8c39fc0e5420f9430aff7f945ae55.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ui/UI/journal_standard.png"
dest_files=["res://.godot/imported/journal_standard.png-09a8c39fc0e5420f9430aff7f945ae55.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b2q3xgw8xj880"
path="res://.godot/imported/quest_note.png-857ff56cb8cdd8e4401bb6320261518e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ui/UI/quest_note.png"
dest_files=["res://.godot/imported/quest_note.png-857ff56cb8cdd8e4401bb6320261518e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

@ -1,24 +1,67 @@
[gd_scene load_steps=2 format=3 uid="uid://1iqqwh7d6xoh"] [gd_scene load_steps=3 format=3 uid="uid://1iqqwh7d6xoh"]
[ext_resource type="Script" uid="uid://dwhee40ksubke" path="res://scripts/CSharp/Common/Quest/QuestListItemUi.cs" id="1_svwef"] [ext_resource type="Script" uid="uid://dwhee40ksubke" path="res://scripts/CSharp/Common/Quest/QuestListItemUi.cs" id="1_svwef"]
[ext_resource type="Texture2D" uid="uid://cvu5dybw31uxn" path="res://art/ui/UI/Circle.png" id="2_qlq3v"]
[node name="QuestListItem" type="Control"] [node name="QuestListItem" type="Control"]
custom_minimum_size = Vector2(0, 30) custom_minimum_size = Vector2(0, 40)
layout_mode = 3 layout_mode = 3
anchors_preset = 0
offset_right = 300.0
offset_bottom = 30.0
script = ExtResource("1_svwef")
[node name="TitleButton" type="Button" parent="."]
layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_svwef") flat = true
[node name="TitleButton" type="Button" parent="."] [node name="HBoxContainer" type="HBoxContainer" parent="TitleButton"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="TitleButton/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 30
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 30
theme_override_constants/margin_bottom = 0
[node name="DotText" type="Label" parent="TitleButton/HBoxContainer/MarginContainer"]
layout_mode = 2
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 17
text = "•"
vertical_alignment = 1
[node name="TitleText" type="Label" parent="TitleButton/HBoxContainer"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 17
text = "Switch to Unity"
vertical_alignment = 1
autowrap_mode = 2
[node name="Circled" type="TextureRect" parent="TitleButton"]
visible = false
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
text = "Hello world" texture = ExtResource("2_qlq3v")
[connection signal="pressed" from="TitleButton" to="." method="ClickedTitleButton"] [connection signal="pressed" from="TitleButton" to="." method="ClickedTitleButton"]

@ -1,55 +1,162 @@
[gd_scene load_steps=5 format=3 uid="uid://2q1n6g2kj5er"] [gd_scene load_steps=6 format=3 uid="uid://2q1n6g2kj5er"]
[ext_resource type="Script" uid="uid://c7ilqe2fmjyvx" path="res://scripts/CSharp/Common/Quest/QuestListUi.cs" id="1_17sli"] [ext_resource type="Script" uid="uid://c7ilqe2fmjyvx" path="res://scripts/CSharp/Common/Quest/QuestListUi.cs" id="1_17sli"]
[ext_resource type="Script" uid="uid://o1qpo0wdqlw3" path="res://scripts/CSharp/Common/Quest/QuestLog.cs" id="1_vc33n"] [ext_resource type="Script" uid="uid://o1qpo0wdqlw3" path="res://scripts/CSharp/Common/Quest/QuestLog.cs" id="1_vc33n"]
[ext_resource type="PackedScene" uid="uid://1iqqwh7d6xoh" path="res://prefabs/UI/Quest/QuestListItem.tscn" id="2_fswdj"] [ext_resource type="PackedScene" uid="uid://1iqqwh7d6xoh" path="res://prefabs/UI/Quest/QuestListItem.tscn" id="2_fswdj"]
[ext_resource type="Texture2D" uid="uid://d0anh3hdk0clc" path="res://art/ui/UI/journal_standard.png" id="2_wdbu4"]
[ext_resource type="Script" uid="uid://b8mywolvj2yq7" path="res://scripts/CSharp/Common/Quest/QuestDescriptionUi.cs" id="4_1vy15"] [ext_resource type="Script" uid="uid://b8mywolvj2yq7" path="res://scripts/CSharp/Common/Quest/QuestDescriptionUi.cs" id="4_1vy15"]
[node name="QuestLog" type="Control"] [node name="QuestLogRoot" type="Control"]
custom_minimum_size = Vector2(700, 500)
layout_mode = 3 layout_mode = 3
anchors_preset = 0
[node name="MovingLog" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_right = -452.0 offset_left = 460.0
offset_bottom = -148.0 offset_top = -615.0
offset_right = 1460.0
offset_bottom = -54.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
mouse_filter = 2
script = ExtResource("1_vc33n") script = ExtResource("1_vc33n")
_closedPos = Vector2(460, -615)
_openedPos = Vector2(460, 240)
[node name="LeftPage" type="Control" parent="."] [node name="Background" type="Control" parent="MovingLog"]
layout_mode = 1 layout_mode = 1
anchors_preset = 9 anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="TextureRect" type="TextureRect" parent="MovingLog/Background"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_right = 350.0 grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_wdbu4")
expand_mode = 2
stretch_mode = 5
[node name="MarginContainer" type="MarginContainer" parent="MovingLog"]
layout_mode = 2
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme_override_constants/margin_left = 160
theme_override_constants/margin_top = 60
theme_override_constants/margin_right = 160
theme_override_constants/margin_bottom = 60
[node name="VBoxContainer" type="VBoxContainer" parent="LeftPage"] [node name="ReferenceRect" type="ReferenceRect" parent="MovingLog/MarginContainer"]
layout_mode = 2
[node name="QuestLog" type="HBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect"]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
[node name="LeftPage" type="Control" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog"]
layout_mode = 2
size_flags_horizontal = 3
[node name="MarginContainer" type="MarginContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 15
[node name="ReferenceRect" type="ReferenceRect" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer"]
layout_mode = 2
border_color = Color(1.49205e-06, 0.62774, 0.489941, 1)
[node name="VBoxContainer2" type="VBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer/ReferenceRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer/ReferenceRect/VBoxContainer2"]
custom_minimum_size = Vector2(0, 60.975)
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 31
text = "Quests"
horizontal_alignment = 1
vertical_alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/LeftPage/MarginContainer/ReferenceRect/VBoxContainer2"]
layout_mode = 2
size_flags_vertical = 3
script = ExtResource("1_17sli") script = ExtResource("1_17sli")
_questListItemPrefab = ExtResource("2_fswdj") _questListItemPrefab = ExtResource("2_fswdj")
[node name="RightPage" type="Control" parent="."] [node name="RightPage" type="Control" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog"]
layout_mode = 2
size_flags_horizontal = 3
[node name="MarginContainer" type="MarginContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage"]
layout_mode = 1 layout_mode = 1
anchors_preset = 11 anchors_preset = 15
anchor_left = 1.0
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
offset_left = -350.0 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 15
[node name="ReferenceRect" type="ReferenceRect" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer"]
layout_mode = 2
border_color = Color(1.49205e-06, 0.62774, 0.489941, 1)
[node name="Description" type="RichTextLabel" parent="RightPage"] [node name="VBoxContainer2" type="VBoxContainer" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect"]
layout_mode = 1 layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
[node name="Label" type="Label" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect/VBoxContainer2"]
custom_minimum_size = Vector2(0, 60.975)
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 31
text = "Details"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Description" type="RichTextLabel" parent="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect/VBoxContainer2"]
layout_mode = 2
size_flags_vertical = 3
theme_override_colors/default_color = Color(0, 0, 0, 1)
bbcode_enabled = true
text = "[center][font_size=24]Find 10 Mushroms[/font_size][/center]
Collect 10 mushroms in the forrest by the bushes down the road with the singn that says \"to the mushroms\" and has a small mushrom logo on it. Its realy hard to miss."
script = ExtResource("4_1vy15") script = ExtResource("4_1vy15")
[connection signal="DetailQuestChanged" from="." to="RightPage/Description" method="UpdateText"] [connection signal="DetailQuestChanged" from="MovingLog" to="MovingLog/MarginContainer/ReferenceRect/QuestLog/RightPage/MarginContainer/ReferenceRect/VBoxContainer2/Description" method="UpdateText"]

@ -164,6 +164,11 @@ interact={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
] ]
} }
ui_inventory_journal_open_close={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":74,"key_label":0,"unicode":106,"location":0,"echo":false,"script":null)
]
}
ui_inventory_open_close={ ui_inventory_open_close={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null)

@ -1,7 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://c4ns2ixo8k2ih"] [gd_scene load_steps=6 format=3 uid="uid://c4ns2ixo8k2ih"]
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="1_opxcj"] [ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="1_opxcj"]
[ext_resource type="PackedScene" uid="uid://2q1n6g2kj5er" path="res://prefabs/UI/Quest/QuestLog.tscn" id="2_lj712"]
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="3_sx4ix"] [ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="3_sx4ix"]
[ext_resource type="Resource" uid="uid://0aruj4lm74n6" path="res://resources/quests/test_01.tres" id="4_qyyck"] [ext_resource type="Resource" uid="uid://0aruj4lm74n6" path="res://resources/quests/test_01.tres" id="4_qyyck"]
[ext_resource type="Resource" uid="uid://be1dmc6d2mxl5" path="res://resources/quests/test_02.tres" id="5_sokiv"] [ext_resource type="Resource" uid="uid://be1dmc6d2mxl5" path="res://resources/quests/test_02.tres" id="5_sokiv"]
@ -180,12 +179,6 @@ text = "Hide
script = ExtResource("3_sx4ix") script = ExtResource("3_sx4ix")
questResource = ExtResource("6_ajsa7") questResource = ExtResource("6_ajsa7")
[node name="QuestLog" parent="CanvasLayer2" instance=ExtResource("2_lj712")]
offset_left = 625.0
offset_top = 294.0
offset_right = -595.0
offset_bottom = -286.0
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Active" to="CanvasLayer2/VBoxContainer/HBoxContainer/Active/QuestSetter" method="Trigger"] [connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Active" to="CanvasLayer2/VBoxContainer/HBoxContainer/Active/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Done" to="CanvasLayer2/VBoxContainer/HBoxContainer/Done/QuestSetter" method="Trigger"] [connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Done" to="CanvasLayer2/VBoxContainer/HBoxContainer/Done/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Cancle" to="CanvasLayer2/VBoxContainer/HBoxContainer/Cancle/QuestSetter" method="Trigger"] [connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer/Cancle" to="CanvasLayer2/VBoxContainer/HBoxContainer/Cancle/QuestSetter" method="Trigger"]
@ -198,5 +191,3 @@ offset_bottom = -286.0
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Done" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Done/QuestSetter" method="Trigger"] [connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Done" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Done/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Cancle" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Cancle/QuestSetter" method="Trigger"] [connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Cancle" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Cancle/QuestSetter" method="Trigger"]
[connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Hide" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Hide/QuestSetter" method="Trigger"] [connection signal="pressed" from="CanvasLayer2/VBoxContainer/HBoxContainer3/Hide" to="CanvasLayer2/VBoxContainer/HBoxContainer3/Hide/QuestSetter" method="Trigger"]
[editable path="CanvasLayer"]

@ -7,6 +7,8 @@ namespace Babushka.scripts.CSharp.Common.Quest;
public partial class QuestListItemUi : Control public partial class QuestListItemUi : Control
{ {
private Button TitleButton => GetNode<Button>("TitleButton"); private Button TitleButton => GetNode<Button>("TitleButton");
private Label TitleLabel => GetNode<Label>("TitleButton/HBoxContainer/TitleText");
private TextureRect CircleTexture => GetNode<TextureRect>("TitleButton/Circled");
private QuestResource? _questResource; private QuestResource? _questResource;
public void UpdateButton(QuestResource questResource) public void UpdateButton(QuestResource questResource)
@ -22,13 +24,19 @@ public partial class QuestListItemUi : Control
_ => "" _ => ""
}; };
UpdateCircled(questResource == QuestManager.Instance.GetFollowQuest());
ShowName(name); ShowName(name);
TitleButton.Pressed += ClickedTitleButton; TitleButton.Pressed += ClickedTitleButton;
}
private void UpdateCircled(bool value)
{
CircleTexture.Visible = value;
} }
private void ShowName(string questResourceTitle) private void ShowName(string questResourceTitle)
{ {
TitleButton.Text = questResourceTitle; TitleLabel.Text = questResourceTitle;
} }
public void ClickedTitleButton() public void ClickedTitleButton()

@ -8,6 +8,15 @@ public partial class QuestLog : Control
[Signal] [Signal]
public delegate void DetailQuestChangedEventHandler(QuestLog questLog); public delegate void DetailQuestChangedEventHandler(QuestLog questLog);
[Export]
private Vector2 _closedPos;
[Export]
private Vector2 _openedPos;
private bool _isClosed = true;
private Tween? _closeOpenTween;
public QuestResource? currentDetailQuest public QuestResource? currentDetailQuest
{ {
get => QuestManager.Instance!.GetFollowQuest(); get => QuestManager.Instance!.GetFollowQuest();
@ -23,5 +32,22 @@ public partial class QuestLog : Control
QuestManager.Instance!.QuestsChanged += () => EmitSignalDetailQuestChanged(this); QuestManager.Instance!.QuestsChanged += () => EmitSignalDetailQuestChanged(this);
} }
public override void _Input(InputEvent inputEvent)
{
if (inputEvent.IsActionPressed("ui_inventory_journal_open_close"))
{
if(_closeOpenTween != null)
_closeOpenTween.Kill();
_isClosed = !_isClosed;
_closeOpenTween = GetTree().CreateTween();
_closeOpenTween
.TweenProperty(this, "position", _isClosed ? _closedPos : _openedPos, 0.5)
.SetEase(Tween.EaseType.Out)
.SetTrans(Tween.TransitionType.Cubic);
}
}
//private QuestResource? _currentDetailQuestBacking; //private QuestResource? _currentDetailQuestBacking;
} }

@ -30,8 +30,6 @@ public partial class QuestMessagePopup : Control
private void NewActiveQuest() private void NewActiveQuest()
{ {
GD.Print("NewActiveQuest");
var shownQuest = QuestManager.Instance!.GetFollowQuest(); var shownQuest = QuestManager.Instance!.GetFollowQuest();
if (_currentlyShown == shownQuest) if (_currentlyShown == shownQuest)
return; return;

Loading…
Cancel
Save