Dialogue system; ask user if they want to teleport to next floor
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="src\items\weapons\models\" />
|
||||
<Folder Include="src\map\dungeon\corridor\" />
|
||||
<Folder Include="src\ui\dialogue\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include=".editorconfig" />
|
||||
|
||||
@@ -22,6 +22,8 @@ DialogueManager="*res://addons/dialogue_manager/dialogue_manager.gd"
|
||||
[dialogue_manager]
|
||||
|
||||
general/uses_dotnet=true
|
||||
general/wrap_lines=true
|
||||
general/balloon_path="res://src/ui/dialogue/Balloon.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
@@ -54,6 +56,34 @@ ui_cancel={
|
||||
, 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":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
, 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":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
, 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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
, 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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||
, 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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
MoveUp={
|
||||
"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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||
@@ -109,7 +139,7 @@ Throw={
|
||||
|
||||
[internationalization]
|
||||
|
||||
locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialogue")
|
||||
locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialogue", "res://src/ui/dialogue/FloorExit.dialogue")
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
||||
11
src/game/DialogueController.cs
Normal file
11
src/game/DialogueController.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using DialogueManagerRuntime;
|
||||
using Godot;
|
||||
public partial class DialogueController : Node
|
||||
{
|
||||
private DialogueManager DialogueManager;
|
||||
|
||||
[Export] public PackedScene DialogueBalloon { get; set; } = default!;
|
||||
|
||||
[Export] public Resource DialogueResource { get; set; } = default!;
|
||||
}
|
||||
@@ -3,11 +3,15 @@ namespace GameJamDungeon;
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using DialogueManagerRuntime;
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public interface IGame : IProvide<IGameRepo>, INode3D;
|
||||
public interface IGame : IProvide<IGameRepo>, INode3D
|
||||
{
|
||||
}
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class Game : Node3D, IGame
|
||||
@@ -42,6 +46,8 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
[Node] public AnimationPlayer AnimationPlayer { get; set; } = default!;
|
||||
|
||||
[Node] public DialogueController DialogueController { get; set; } = default!;
|
||||
|
||||
private List<IDungeonFloor> Floors;
|
||||
|
||||
private int _currentFloor = -1;
|
||||
@@ -58,8 +64,17 @@ public partial class Game : Node3D, IGame
|
||||
}
|
||||
|
||||
private void OnTeleportEntered(Node3D body)
|
||||
{
|
||||
GameRepo.Pause();
|
||||
DialogueManager.GetCurrentScene = (() => this);
|
||||
DialogueManager.ShowDialogueBalloonScene(DialogueController.DialogueBalloon, DialogueController.DialogueResource, "floor_exit");
|
||||
DialogueManager.DialogueEnded += (Resource resource) => { GameRepo.Resume(); };
|
||||
}
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
GameLogic.Input(new GameLogic.Input.LoadNextFloor());
|
||||
GameRepo.Resume();
|
||||
}
|
||||
|
||||
public void OnResolved()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://33ek675mfb5n"]
|
||||
[gd_scene load_steps=18 format=3 uid="uid://33ek675mfb5n"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/game/Game.cs" id="1_ytcii"]
|
||||
[ext_resource type="PackedScene" uid="uid://cfecvvav8kkp6" path="res://src/player/Player.tscn" id="3_kk6ly"]
|
||||
@@ -8,7 +8,10 @@
|
||||
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="6_owlf4"]
|
||||
[ext_resource type="PackedScene" path="res://src/map/dungeon/floors/Floor2.tscn" id="7_1sm5s"]
|
||||
[ext_resource type="PackedScene" path="res://src/map/dungeon/floors/Floor3.tscn" id="8_87yk1"]
|
||||
[ext_resource type="PackedScene" path="res://src/map/Teleport.tscn" id="9_nwu7r"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjqgl5u05ia04" path="res://src/map/Teleport.tscn" id="9_nwu7r"]
|
||||
[ext_resource type="Script" path="res://src/game/DialogueController.cs" id="10_58pbt"]
|
||||
[ext_resource type="Resource" uid="uid://6bhfbvi6jbms" path="res://src/ui/dialogue/FloorExit.dialogue" id="11_4ysvf"]
|
||||
[ext_resource type="PackedScene" uid="uid://73jm5qjy52vq" path="res://src/ui/dialogue/Balloon.tscn" id="11_ofwv2"]
|
||||
|
||||
[sub_resource type="Environment" id="Environment_fke5g"]
|
||||
|
||||
@@ -123,3 +126,10 @@ unique_name_in_owner = true
|
||||
process_mode = 3
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 900, 900, 900)
|
||||
disable_mode = 2
|
||||
|
||||
[node name="DialogueController" type="Node" parent="."]
|
||||
unique_name_in_owner = true
|
||||
process_mode = 3
|
||||
script = ExtResource("10_58pbt")
|
||||
DialogueBalloon = ExtResource("11_ofwv2")
|
||||
DialogueResource = ExtResource("11_4ysvf")
|
||||
|
||||
@@ -104,6 +104,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
if (Input.IsActionJustPressed(GameInputs.Throw))
|
||||
{
|
||||
var selectedMenuItem = ItemList.GetChild<ItemLabel>(_currentSelection);
|
||||
GameRepo.InventoryItems.Value.Remove(selectedMenuItem.InventoryItem);
|
||||
ItemList.RemoveChild(selectedMenuItem);
|
||||
}
|
||||
}
|
||||
|
||||
4
src/items/IEquippable.cs
Normal file
4
src/items/IEquippable.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace GameJamDungeon
|
||||
{
|
||||
public interface IEquippable;
|
||||
}
|
||||
@@ -9,6 +9,4 @@ namespace GameJamDungeon
|
||||
|
||||
public InventoryItemInfo Info { get; }
|
||||
}
|
||||
|
||||
public interface IEquippable;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,12 @@ namespace GameJamDungeon
|
||||
[Export]
|
||||
public PackedScene AccessoryScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene ThrowableItemScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene ConsumableItemScene { get; set; }
|
||||
|
||||
public List<(IInventoryItem Item, float SpawnRate)> Database { get; private set; }
|
||||
|
||||
public void SpawnItems()
|
||||
@@ -23,13 +29,15 @@ namespace GameJamDungeon
|
||||
var armorResources = DirAccess.GetFilesAt("res://src/items/armor/resources/");
|
||||
var weaponResources = DirAccess.GetFilesAt("res://src/items/weapons/resources/");
|
||||
var accessoryResources = DirAccess.GetFilesAt("res://src/items/accessory/resources/");
|
||||
var throwableResources = DirAccess.GetFilesAt("res://src/items/throwable/resources/");
|
||||
var consumableResources = DirAccess.GetFilesAt("res://src/items/consumable/resources/");
|
||||
|
||||
foreach (var armor in armorResources)
|
||||
{
|
||||
var armorInfo = GD.Load<ArmorInfo>($"res://src/items/armor/resources/{armor}");
|
||||
var armorScene = ArmorScene.Instantiate<Armor>();
|
||||
armorScene.ArmorInfo = armorInfo;
|
||||
Database.Add(new(armorScene, 0.75f));
|
||||
Database.Add(new(armorScene, 0.01f));
|
||||
}
|
||||
|
||||
foreach (var weapon in weaponResources)
|
||||
@@ -37,7 +45,7 @@ namespace GameJamDungeon
|
||||
var weaponInfo = GD.Load<WeaponInfo>($"res://src/items/weapons/resources/{weapon}");
|
||||
var weaponScene = WeaponScene.Instantiate<Weapon>();
|
||||
weaponScene.WeaponInfo = weaponInfo;
|
||||
Database.Add(new(weaponScene, 0.75f));
|
||||
Database.Add(new(weaponScene, 0.01f));
|
||||
}
|
||||
|
||||
foreach (var accessory in accessoryResources)
|
||||
@@ -45,7 +53,23 @@ namespace GameJamDungeon
|
||||
var accessoryInfo = GD.Load<AccessoryInfo>($"res://src/items/accessory/resources/{accessory}");
|
||||
var accessoryScene = AccessoryScene.Instantiate<Accessory>();
|
||||
accessoryScene.AccessoryInfo = accessoryInfo;
|
||||
Database.Add(new(accessoryScene, 0.75f));
|
||||
Database.Add(new(accessoryScene, 0.01f));
|
||||
}
|
||||
|
||||
foreach (var throwable in throwableResources)
|
||||
{
|
||||
var throwableItemInfo = GD.Load<ThrowableItemInfo>($"res://src/items/throwable/resources/{throwable}");
|
||||
var throwableItemScene = ThrowableItemScene.Instantiate<ThrowableItem>();
|
||||
throwableItemScene.ThrowableItemInfo = throwableItemInfo;
|
||||
Database.Add(new(throwableItemScene, 0.01f));
|
||||
}
|
||||
|
||||
foreach (var consumable in consumableResources)
|
||||
{
|
||||
var consumableItemInfo = GD.Load<ConsumableItemInfo>($"res://src/items/consumable/resources/{consumable}");
|
||||
var consumableItemScene = ConsumableItemScene.Instantiate<ConsumableItem>();
|
||||
consumableItemScene.ConsumableItemInfo = consumableItemInfo;
|
||||
Database.Add(new(consumableItemScene, 0.9f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://twrj4wixcbu7"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://twrj4wixcbu7"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/ItemDatabase.cs" id="1_7b315"]
|
||||
[ext_resource type="PackedScene" uid="uid://db206brufi83s" path="res://src/items/weapons/Weapon.tscn" id="2_14w53"]
|
||||
[ext_resource type="PackedScene" uid="uid://dorr7v1tkeiy0" path="res://src/items/armor/Armor.tscn" id="3_p6rkn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b07srt3lckt4e" path="res://src/items/accessory/Accessory.tscn" id="4_oqm6k"]
|
||||
[ext_resource type="PackedScene" uid="uid://1fl6s352e2ej" path="res://src/items/throwable/ThrowableItem.tscn" id="5_l0fpl"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6w7dpk0hurj0" path="res://src/items/consumable/ConsumableItem.tscn" id="6_51k8r"]
|
||||
|
||||
[node name="ItemDatabase" type="Node"]
|
||||
script = ExtResource("1_7b315")
|
||||
WeaponScene = ExtResource("2_14w53")
|
||||
ArmorScene = ExtResource("3_p6rkn")
|
||||
AccessoryScene = ExtResource("4_oqm6k")
|
||||
ThrowableItemScene = ExtResource("5_l0fpl")
|
||||
ConsumableItemScene = ExtResource("6_51k8r")
|
||||
|
||||
39
src/items/consumable/ConsumableItem.cs
Normal file
39
src/items/consumable/ConsumableItem.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using GameJamDungeon;
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class ConsumableItem : Node3D, IInventoryItem
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Dependency] public IGameRepo GameRepo => this.DependOn<IGameRepo>();
|
||||
|
||||
public InventoryItemInfo Info => ConsumableItemInfo;
|
||||
|
||||
[Export]
|
||||
public ConsumableItemInfo ConsumableItemInfo { get; set; }
|
||||
|
||||
[Node] public Sprite3D Sprite { get; set; } = default!;
|
||||
|
||||
[Node] public Area3D Pickup { get; set; } = default!;
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
Sprite.Texture = ConsumableItemInfo.Texture;
|
||||
Pickup.BodyEntered += OnEntered;
|
||||
}
|
||||
|
||||
public void OnEntered(Node3D body)
|
||||
{
|
||||
if (GameRepo.InventoryItems.Value.Count() >= GameRepo.MaxItemSize)
|
||||
return;
|
||||
|
||||
var inventoryList = GameRepo.InventoryItems.Value.Append(this).ToList();
|
||||
GameRepo.InventoryItems.OnNext(inventoryList);
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
34
src/items/consumable/ConsumableItem.tscn
Normal file
34
src/items/consumable/ConsumableItem.tscn
Normal file
@@ -0,0 +1,34 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c6w7dpk0hurj0"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItem.cs" id="1_26bad"]
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemInfo.cs" id="2_g3oo3"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_33w5s"]
|
||||
script = ExtResource("2_g3oo3")
|
||||
Name = ""
|
||||
Description = ""
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_7mh0f"]
|
||||
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||
|
||||
[node name="ConsumableItem" type="Node3D"]
|
||||
script = ExtResource("1_26bad")
|
||||
ConsumableItemInfo = SubResource("Resource_33w5s")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="Pickup"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0322805, 0)
|
||||
pixel_size = 0.001
|
||||
billboard = 2
|
||||
double_sided = false
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||
shape = SubResource("BoxShape3D_7mh0f")
|
||||
8
src/items/consumable/ConsumableItemInfo.cs
Normal file
8
src/items/consumable/ConsumableItemInfo.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Godot;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class ConsumableItemInfo : InventoryItemInfo
|
||||
{
|
||||
}
|
||||
11
src/items/consumable/resources/SteloFragment.tres
Normal file
11
src/items/consumable/resources/SteloFragment.tres
Normal file
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="Resource" script_class="ConsumableItemInfo" load_steps=3 format=3 uid="uid://75fpkwfp0t0k"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/consumable/ConsumableItemInfo.cs" id="1_f8ogj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbl5v5i1s3m2u" path="res://src/items/consumable/textures/stelo fragment.PNG" id="1_ic5xm"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_f8ogj")
|
||||
Name = "Stelo Fragment"
|
||||
Description = "A small gathered piece of the former heavens.
|
||||
Restores 30 VT. If VT full, raises MAX VT by 10."
|
||||
Texture = ExtResource("1_ic5xm")
|
||||
BIN
src/items/consumable/textures/stelo fragment.PNG
Normal file
BIN
src/items/consumable/textures/stelo fragment.PNG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
35
src/items/consumable/textures/stelo fragment.PNG.import
Normal file
35
src/items/consumable/textures/stelo fragment.PNG.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dbl5v5i1s3m2u"
|
||||
path.s3tc="res://.godot/imported/stelo fragment.PNG-87ebe2402340a8a359426101165d22a0.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/consumable/textures/stelo fragment.PNG"
|
||||
dest_files=["res://.godot/imported/stelo fragment.PNG-87ebe2402340a8a359426101165d22a0.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
@@ -1,26 +1,46 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using GameJamDungeon;
|
||||
using Godot;
|
||||
|
||||
public interface IThrowableItem : INode3D
|
||||
{
|
||||
public IAnimationPlayer AnimationPlayer { get; set; }
|
||||
}
|
||||
using System.Linq;
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
public partial class ThrowableItem : Node3D, IThrowableItem
|
||||
public partial class ThrowableItem : Node3D, IInventoryItem
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Dependency] public IGameRepo GameRepo => this.DependOn<IGameRepo>();
|
||||
|
||||
[Node] public IAnimationPlayer AnimationPlayer { get; set; } = default!;
|
||||
|
||||
[Node] public IHitbox Hitbox { get; set; } = default!;
|
||||
|
||||
public void Setup()
|
||||
public InventoryItemInfo Info => ThrowableItemInfo;
|
||||
|
||||
[Export]
|
||||
public ThrowableItemInfo ThrowableItemInfo { get; set; }
|
||||
|
||||
[Node] public Sprite3D Sprite { get; set; } = default!;
|
||||
|
||||
[Node] public Area3D Pickup { get; set; } = default!;
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
AnimationPlayer.AnimationFinished += OnAnimationFinished;
|
||||
Hitbox.Damage = 5;
|
||||
Sprite.Texture = ThrowableItemInfo.Texture;
|
||||
Pickup.BodyEntered += OnEntered;
|
||||
}
|
||||
|
||||
public void OnEntered(Node3D body)
|
||||
{
|
||||
if (GameRepo.InventoryItems.Value.Count() >= GameRepo.MaxItemSize)
|
||||
return;
|
||||
|
||||
var inventoryList = GameRepo.InventoryItems.Value.Append(this).ToList();
|
||||
GameRepo.InventoryItems.OnNext(inventoryList);
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
private void OnAnimationFinished(StringName animName)
|
||||
@@ -28,30 +48,3 @@ public partial class ThrowableItem : Node3D, IThrowableItem
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
public enum ThrowableItemTag
|
||||
{
|
||||
InflictTelluricDamage,
|
||||
InflictAeolicDamage,
|
||||
InflictHydricDamage,
|
||||
InflictIgneousDamage,
|
||||
InflictFerrumDamage,
|
||||
DoubleEXP,
|
||||
RandomWarp,
|
||||
LowerTargetTo1HP,
|
||||
IdentifyAllItemsCostHP,
|
||||
WarpToExitIfFound,
|
||||
RandomNewItem,
|
||||
BasicItem,
|
||||
SwapHPandVTWithEntitiesInRoom,
|
||||
TeleportAllEnemiesToRoom,
|
||||
TurnAllEnemiesIntoHealingItem,
|
||||
KillHalfEnemiesInRoom,
|
||||
AbsorbHPFromAllEnemiesInRoom,
|
||||
HealsAllInRoomToMaxHP,
|
||||
RandomEffect,
|
||||
Add1ATK,
|
||||
Add1DEF,
|
||||
RaiseLevelBy1,
|
||||
BriefImmunity
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://1fl6s352e2ej"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItem.cs" id="1_nac2l"]
|
||||
[ext_resource type="Texture2D" uid="uid://dr8mjn3wahdvp" path="res://src/inventory_menu/cursor.png" id="2_mojlk"]
|
||||
[ext_resource type="Script" path="res://src/hitbox/Hitbox.cs" id="3_qpunu"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_qihtb"]
|
||||
size = Vector3(0.371643, 0.289612, 0.286743)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_03cqg"]
|
||||
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_d22ed"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
@@ -45,7 +47,6 @@ _data = {
|
||||
}
|
||||
|
||||
[node name="ThrowableItem" type="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.535839)
|
||||
script = ExtResource("1_nac2l")
|
||||
|
||||
[node name="Hitbox" type="Area3D" parent="."]
|
||||
@@ -55,13 +56,23 @@ collision_layer = 16
|
||||
collision_mask = 16
|
||||
script = ExtResource("3_qpunu")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="Hitbox"]
|
||||
[node name="Sprite" type="Sprite3D" parent="Hitbox"]
|
||||
unique_name_in_owner = true
|
||||
pixel_size = 0.0005
|
||||
billboard = 2
|
||||
texture = ExtResource("2_mojlk")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"]
|
||||
shape = SubResource("BoxShape3D_qihtb")
|
||||
|
||||
[node name="Pickup" type="Area3D" parent="Hitbox"]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox/Pickup"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||
shape = SubResource("BoxShape3D_03cqg")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class ThrowableItemInfo : InventoryItemInfo
|
||||
{
|
||||
[Export]
|
||||
public Godot.Collections.Array<ThrowableItemTag> ThrowableItemTags { get; set; }
|
||||
public Godot.Collections.Array<ThrowableItemTag> ThrowableItemTags { get; set; } = new Godot.Collections.Array<ThrowableItemTag>();
|
||||
}
|
||||
|
||||
26
src/items/throwable/ThrowableItemTag.cs
Normal file
26
src/items/throwable/ThrowableItemTag.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
public enum ThrowableItemTag
|
||||
{
|
||||
InflictTelluricDamage,
|
||||
InflictAeolicDamage,
|
||||
InflictHydricDamage,
|
||||
InflictIgneousDamage,
|
||||
InflictFerrumDamage,
|
||||
DoubleEXP,
|
||||
RandomWarp,
|
||||
LowerTargetTo1HP,
|
||||
IdentifyAllItemsCostHP,
|
||||
WarpToExitIfFound,
|
||||
RandomNewItem,
|
||||
BasicItem,
|
||||
SwapHPandVTWithEntitiesInRoom,
|
||||
TeleportAllEnemiesToRoom,
|
||||
TurnAllEnemiesIntoHealingItem,
|
||||
KillHalfEnemiesInRoom,
|
||||
AbsorbHPFromAllEnemiesInRoom,
|
||||
HealsAllInRoomToMaxHP,
|
||||
RandomEffect,
|
||||
Add1ATK,
|
||||
Add1DEF,
|
||||
RaiseLevelBy1,
|
||||
BriefImmunity
|
||||
}
|
||||
11
src/items/throwable/resources/GeomanticDice.tres
Normal file
11
src/items/throwable/resources/GeomanticDice.tres
Normal file
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="Resource" script_class="ThrowableItemInfo" load_steps=3 format=3 uid="uid://bph8c6by4s047"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItemInfo.cs" id="1_ewck5"]
|
||||
[ext_resource type="Texture2D" uid="uid://mi70lolgtf3n" path="res://src/items/throwable/textures/GEOMANCER-DICE.png" id="1_jhits"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ewck5")
|
||||
ThrowableItemTags = []
|
||||
Name = "Geomantic Dice"
|
||||
Description = "Inflicts Affinity damage when thrown."
|
||||
Texture = ExtResource("1_jhits")
|
||||
11
src/items/throwable/resources/SpellSignKnowledge.tres
Normal file
11
src/items/throwable/resources/SpellSignKnowledge.tres
Normal file
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="Resource" script_class="ThrowableItemInfo" load_steps=3 format=3 uid="uid://qqg0gdcb8fwg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dhfn51smm818x" path="res://src/items/throwable/textures/spell sign - luck.PNG" id="1_3605p"]
|
||||
[ext_resource type="Script" path="res://src/items/throwable/ThrowableItemInfo.cs" id="1_s3pq7"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_s3pq7")
|
||||
ThrowableItemTags = []
|
||||
Name = "Spell Sign: Knowledge"
|
||||
Description = "Doubles experience points earned. Effect is temporary."
|
||||
Texture = ExtResource("1_3605p")
|
||||
BIN
src/items/throwable/textures/GEOMANCER-DICE.png
Normal file
BIN
src/items/throwable/textures/GEOMANCER-DICE.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
35
src/items/throwable/textures/GEOMANCER-DICE.png.import
Normal file
35
src/items/throwable/textures/GEOMANCER-DICE.png.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://mi70lolgtf3n"
|
||||
path.s3tc="res://.godot/imported/GEOMANCER-DICE.png-29575eb9771a13eb2cd0b8f4bb92f76c.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/throwable/textures/GEOMANCER-DICE.png"
|
||||
dest_files=["res://.godot/imported/GEOMANCER-DICE.png-29575eb9771a13eb2cd0b8f4bb92f76c.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
BIN
src/items/throwable/textures/spell sign - luck.PNG
Normal file
BIN
src/items/throwable/textures/spell sign - luck.PNG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
35
src/items/throwable/textures/spell sign - luck.PNG.import
Normal file
35
src/items/throwable/textures/spell sign - luck.PNG.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dhfn51smm818x"
|
||||
path.s3tc="res://.godot/imported/spell sign - luck.PNG-f0fcf0db4cd4291911c8889eda080fdc.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/items/throwable/textures/spell sign - luck.PNG"
|
||||
dest_files=["res://.godot/imported/spell sign - luck.PNG-f0fcf0db4cd4291911c8889eda080fdc.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c3ek5i43cl0r5"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bjqgl5u05ia04"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_vtvx6"]
|
||||
radius = 1.0
|
||||
|
||||
@@ -1,22 +1,42 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bn4gslp2gk8ds"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bn4gslp2gk8ds"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_y0rqi"]
|
||||
[ext_resource type="Script" path="res://src/map/dungeon/corridor/remove_unused_doors.gd" id="3_8i1ij"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8ivxp"]
|
||||
|
||||
[node name="Corridor" type="Node3D"]
|
||||
script = ExtResource("1_y0rqi")
|
||||
voxel_scale = Vector3(5, 5, 5)
|
||||
voxel_scale = Vector3(12.955, 13.01, 12.945)
|
||||
|
||||
[node name="RemoveUnusedDoors" type="Node" parent="."]
|
||||
script = ExtResource("3_8i1ij")
|
||||
|
||||
[node name="DOOR?" type="Marker3D" parent="."]
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
||||
operation = 2
|
||||
size = Vector3(12, 13, 12)
|
||||
material = SubResource("StandardMaterial3D_8ivxp")
|
||||
|
||||
[node name="DOOR?2" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.58454, 0, 0)
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="CSGBox3D"]
|
||||
flip_faces = true
|
||||
size = Vector3(11, 12, 11)
|
||||
|
||||
[node name="DOOR?3" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3.69131)
|
||||
[node name="DOOR?" type="CSGBox3D" parent="CSGBox3D/CSGBox3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.04977, 0, 0)
|
||||
operation = 2
|
||||
size = Vector3(3, 13.01, 12.945)
|
||||
|
||||
[node name="DOOR?4" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.98855)
|
||||
[node name="DOOR?2" type="CSGBox3D" parent="CSGBox3D/CSGBox3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.78526, 0, 0)
|
||||
operation = 2
|
||||
size = Vector3(3, 13.01, 12.945)
|
||||
|
||||
[node name="DOOR?3" type="CSGBox3D" parent="CSGBox3D/CSGBox3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.20009, 0, 6.52993)
|
||||
operation = 2
|
||||
size = Vector3(13.01, 13.01, 3)
|
||||
|
||||
[node name="DOOR?4" type="CSGBox3D" parent="CSGBox3D/CSGBox3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -6.77681)
|
||||
operation = 2
|
||||
size = Vector3(12.955, 13.01, 3)
|
||||
|
||||
@@ -14,6 +14,6 @@ script = ExtResource("1_sr15j")
|
||||
room_scenes = Array[PackedScene]([ExtResource("3_vdv5c")])
|
||||
corridor_room_scene = ExtResource("4_pgrs5")
|
||||
dungeon_size = Vector3i(50, 3, 50)
|
||||
voxel_scale = Vector3(5, 5, 5)
|
||||
voxel_scale = Vector3(12.955, 13.01, 12.945)
|
||||
generate_on_ready = false
|
||||
place_even_if_fail = true
|
||||
|
||||
@@ -34,10 +34,4 @@ public partial class Overworld : Node3D, IDungeonFloor
|
||||
{
|
||||
GameRepo.IsWithinDialogueSpace = true;
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed("ui_accept") && GameRepo.IsWithinDialogueSpace)
|
||||
DialogueManager.ShowDialogueBalloon(Dialogue, "start");
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
1626
src/map/dungeon/rooms/ColumnRoom.tscn
Normal file
1626
src/map/dungeon/rooms/ColumnRoom.tscn
Normal file
File diff suppressed because one or more lines are too long
@@ -2,7 +2,6 @@
|
||||
using Chickensoft.Collections;
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.LogicBlocks;
|
||||
using Chickensoft.SaveFileBuilder;
|
||||
using Godot;
|
||||
|
||||
@@ -148,6 +147,13 @@ namespace GameJamDungeon
|
||||
SetPhysicsProcess(true);
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
var attackIsPressed = Input.IsActionJustPressed(GameInputs.Attack);
|
||||
if (attackIsPressed && !GameRepo.IsWithinDialogueSpace)
|
||||
PlayerLogic.Input(new PlayerLogic.Input.Attack());
|
||||
}
|
||||
|
||||
private void OnEnemyHitBoxEntered(Area3D area)
|
||||
{
|
||||
if (area is IHitbox hitBox)
|
||||
@@ -172,10 +178,6 @@ namespace GameJamDungeon
|
||||
{
|
||||
PlayerLogic.Input(new PlayerLogic.Input.PhysicsTick(delta));
|
||||
|
||||
var attackIsPressed = Input.IsActionJustPressed(GameInputs.Attack);
|
||||
if (attackIsPressed && !GameRepo.IsWithinDialogueSpace)
|
||||
PlayerLogic.Input(new PlayerLogic.Input.Attack());
|
||||
|
||||
MoveAndSlide();
|
||||
|
||||
PlayerLogic.Input(new PlayerLogic.Input.Moved(GlobalPosition));
|
||||
@@ -196,7 +198,7 @@ namespace GameJamDungeon
|
||||
public void ThrowItem()
|
||||
{
|
||||
var itemScene = GD.Load<PackedScene>("res://src/items/throwable/ThrowableItem.tscn");
|
||||
var throwItem = itemScene.Instantiate<IThrowableItem>();
|
||||
var throwItem = itemScene.Instantiate<ThrowableItem>();
|
||||
GetTree().Root.AddChildEx(throwItem);
|
||||
throwItem.GlobalPosition = GameRepo.PlayerGlobalPosition.Value;
|
||||
throwItem.GlobalRotation = GlobalRotation;
|
||||
@@ -224,7 +226,10 @@ namespace GameJamDungeon
|
||||
HPBar.Value = newHP;
|
||||
|
||||
if (newHP <= 0.0)
|
||||
{
|
||||
PlayerLogic.Input(new PlayerLogic.Input.Killed());
|
||||
HealthTimer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnVTChanged(int newVT)
|
||||
|
||||
@@ -169,7 +169,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.163955, 1.13605, -0.159032)
|
||||
cull_mask = 1048573
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
omni_range = 73.156
|
||||
light_energy = 4.183
|
||||
omni_range = 83.659
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
112
src/ui/dialogue/Balloon.tscn
Normal file
112
src/ui/dialogue/Balloon.tscn
Normal file
@@ -0,0 +1,112 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://73jm5qjy52vq"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/ui/dialogue/DialogueBalloon.cs" id="1_36de5"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_a8ve6"]
|
||||
[ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="2_fn8n4"]
|
||||
[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_reponses_menu.gd" id="3_72ixx"]
|
||||
[ext_resource type="Script" path="res://src/ui/dialogue/ResponseExample.cs" id="5_0xrfp"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_hrxr4"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1f7pn"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_kknbg"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_osqma"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_sb66p"]
|
||||
|
||||
[sub_resource type="Theme" id="Theme_qq3yp"]
|
||||
default_font = ExtResource("2_fn8n4")
|
||||
default_font_size = 20
|
||||
Button/styles/disabled = SubResource("StyleBoxEmpty_hrxr4")
|
||||
Button/styles/focus = SubResource("StyleBoxEmpty_1f7pn")
|
||||
Button/styles/hover = SubResource("StyleBoxEmpty_kknbg")
|
||||
Button/styles/normal = SubResource("StyleBoxEmpty_osqma")
|
||||
MarginContainer/constants/margin_bottom = 15
|
||||
MarginContainer/constants/margin_left = 30
|
||||
MarginContainer/constants/margin_right = 30
|
||||
MarginContainer/constants/margin_top = 15
|
||||
Panel/styles/panel = SubResource("StyleBoxEmpty_sb66p")
|
||||
|
||||
[node name="ExampleBalloon" type="CanvasLayer"]
|
||||
layer = 100
|
||||
script = ExtResource("1_36de5")
|
||||
|
||||
[node name="Balloon" type="Control" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = SubResource("Theme_qq3yp")
|
||||
|
||||
[node name="Panel" type="Panel" parent="Balloon"]
|
||||
clip_children = 2
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 21.0
|
||||
offset_top = -183.0
|
||||
offset_right = -19.0
|
||||
offset_bottom = -19.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Dialogue" type="MarginContainer" parent="Balloon/Panel"]
|
||||
layout_mode = 2
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Balloon/Panel/Dialogue"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CharacterLabel" type="RichTextLabel" parent="Balloon/Panel/Dialogue/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 1, 1, 0.501961)
|
||||
layout_mode = 2
|
||||
mouse_filter = 1
|
||||
bbcode_enabled = true
|
||||
text = "Character"
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
|
||||
[node name="DialogueLabel" parent="Balloon/Panel/Dialogue/VBoxContainer" instance=ExtResource("2_a8ve6")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
text = "Dialogue..."
|
||||
|
||||
[node name="Responses" type="CenterContainer" parent="Balloon"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ResponsesMenu" type="VBoxContainer" parent="Balloon/Responses" node_paths=PackedStringArray("response_template")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
theme_override_constants/separation = 2
|
||||
script = ExtResource("3_72ixx")
|
||||
response_template = NodePath("ResponseExample")
|
||||
|
||||
[node name="ResponseExample" type="Button" parent="Balloon/Responses/ResponsesMenu"]
|
||||
layout_mode = 2
|
||||
text = "Response example"
|
||||
script = ExtResource("5_0xrfp")
|
||||
|
||||
[node name="ResponseExample2" type="Button" parent="Balloon/Responses/ResponsesMenu"]
|
||||
layout_mode = 2
|
||||
text = "Response example"
|
||||
|
||||
[connection signal="gui_input" from="Balloon" to="." method="_on_balloon_gui_input"]
|
||||
[connection signal="response_selected" from="Balloon/Responses/ResponsesMenu" to="." method="_on_responses_menu_response_selected"]
|
||||
219
src/ui/dialogue/DialogueBalloon.cs
Normal file
219
src/ui/dialogue/DialogueBalloon.cs
Normal file
@@ -0,0 +1,219 @@
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
namespace DialogueManagerRuntime
|
||||
{
|
||||
public partial class DialogueBalloon : CanvasLayer
|
||||
{
|
||||
[Export] public string NextAction = "ui_accept";
|
||||
[Export] public string SkipAction = "ui_cancel";
|
||||
|
||||
|
||||
Control balloon;
|
||||
RichTextLabel characterLabel;
|
||||
RichTextLabel dialogueLabel;
|
||||
VBoxContainer responsesMenu;
|
||||
|
||||
Resource resource;
|
||||
Array<Variant> temporaryGameStates = new Array<Variant>();
|
||||
bool isWaitingForInput = false;
|
||||
bool willHideBalloon = false;
|
||||
|
||||
DialogueLine dialogueLine;
|
||||
DialogueLine DialogueLine
|
||||
{
|
||||
get => dialogueLine;
|
||||
set
|
||||
{
|
||||
isWaitingForInput = false;
|
||||
balloon.FocusMode = Control.FocusModeEnum.All;
|
||||
balloon.GrabFocus();
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
QueueFree();
|
||||
return;
|
||||
}
|
||||
|
||||
dialogueLine = value;
|
||||
UpdateDialogue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
balloon = GetNode<Control>("%Balloon");
|
||||
characterLabel = GetNode<RichTextLabel>("%CharacterLabel");
|
||||
dialogueLabel = GetNode<RichTextLabel>("%DialogueLabel");
|
||||
responsesMenu = GetNode<VBoxContainer>("%ResponsesMenu");
|
||||
|
||||
balloon.Hide();
|
||||
|
||||
balloon.GuiInput += (@event) =>
|
||||
{
|
||||
if ((bool)dialogueLabel.Get("is_typing"))
|
||||
{
|
||||
bool mouseWasClicked = @event is InputEventMouseButton && (@event as InputEventMouseButton).ButtonIndex == MouseButton.Left && @event.IsPressed();
|
||||
bool skipButtonWasPressed = @event.IsActionPressed(SkipAction);
|
||||
if (mouseWasClicked || skipButtonWasPressed)
|
||||
{
|
||||
GetViewport().SetInputAsHandled();
|
||||
dialogueLabel.Call("skip_typing");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isWaitingForInput) return;
|
||||
if (dialogueLine.Responses.Count > 0) return;
|
||||
|
||||
GetViewport().SetInputAsHandled();
|
||||
|
||||
if (@event is InputEventMouseButton && @event.IsPressed() && (@event as InputEventMouseButton).ButtonIndex == MouseButton.Left)
|
||||
{
|
||||
Next(dialogueLine.NextId);
|
||||
}
|
||||
else if (@event.IsActionPressed(NextAction) && GetViewport().GuiGetFocusOwner() == balloon)
|
||||
{
|
||||
Next(dialogueLine.NextId);
|
||||
}
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty((string)responsesMenu.Get("next_action")))
|
||||
{
|
||||
responsesMenu.Set("next_action", NextAction);
|
||||
}
|
||||
responsesMenu.Connect("response_selected", Callable.From((DialogueResponse response) =>
|
||||
{
|
||||
Next(response.NextId);
|
||||
}));
|
||||
|
||||
DialogueManager.Mutated += OnMutated;
|
||||
}
|
||||
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
DialogueManager.Mutated -= OnMutated;
|
||||
}
|
||||
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
// Only the balloon is allowed to handle input while it's showing
|
||||
GetViewport().SetInputAsHandled();
|
||||
}
|
||||
|
||||
|
||||
public override async void _Notification(int what)
|
||||
{
|
||||
// Detect a change of locale and update the current dialogue line to show the new language
|
||||
if (what == NotificationTranslationChanged)
|
||||
{
|
||||
float visibleRatio = dialogueLabel.VisibleRatio;
|
||||
DialogueLine = await DialogueManager.GetNextDialogueLine(resource, DialogueLine.Id, temporaryGameStates);
|
||||
if (visibleRatio < 1.0f)
|
||||
{
|
||||
dialogueLabel.Call("skip_typing");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async void Start(Resource dialogueResource, string title, Array<Variant> extraGameStates = null)
|
||||
{
|
||||
temporaryGameStates = extraGameStates ?? new Array<Variant>();
|
||||
isWaitingForInput = false;
|
||||
resource = dialogueResource;
|
||||
|
||||
DialogueLine = await DialogueManager.GetNextDialogueLine(resource, title, temporaryGameStates);
|
||||
}
|
||||
|
||||
|
||||
public async void Next(string nextId)
|
||||
{
|
||||
DialogueLine = await DialogueManager.GetNextDialogueLine(resource, nextId, temporaryGameStates);
|
||||
}
|
||||
|
||||
|
||||
#region Helpers
|
||||
|
||||
|
||||
private async void UpdateDialogue()
|
||||
{
|
||||
if (!IsNodeReady())
|
||||
{
|
||||
await ToSignal(this, SignalName.Ready);
|
||||
}
|
||||
|
||||
// Set up the character name
|
||||
characterLabel.Visible = !string.IsNullOrEmpty(dialogueLine.Character);
|
||||
characterLabel.Text = Tr(dialogueLine.Character, "dialogue");
|
||||
|
||||
// Set up the dialogue
|
||||
dialogueLabel.Hide();
|
||||
dialogueLabel.Set("dialogue_line", dialogueLine);
|
||||
|
||||
// Set up the responses
|
||||
responsesMenu.Hide();
|
||||
responsesMenu.Set("responses", dialogueLine.Responses);
|
||||
|
||||
// Type out the text
|
||||
balloon.Show();
|
||||
willHideBalloon = false;
|
||||
dialogueLabel.Show();
|
||||
if (!string.IsNullOrEmpty(dialogueLine.Text))
|
||||
{
|
||||
dialogueLabel.Call("type_out");
|
||||
await ToSignal(dialogueLabel, "finished_typing");
|
||||
}
|
||||
|
||||
// Wait for input
|
||||
if (dialogueLine.Responses.Count > 0)
|
||||
{
|
||||
balloon.FocusMode = Control.FocusModeEnum.None;
|
||||
responsesMenu.Show();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(dialogueLine.Time))
|
||||
{
|
||||
float time = 0f;
|
||||
if (!float.TryParse(dialogueLine.Time, out time))
|
||||
{
|
||||
time = dialogueLine.Text.Length * 0.02f;
|
||||
}
|
||||
await ToSignal(GetTree().CreateTimer(time), "timeout");
|
||||
Next(dialogueLine.NextId);
|
||||
}
|
||||
else
|
||||
{
|
||||
isWaitingForInput = true;
|
||||
balloon.FocusMode = Control.FocusModeEnum.All;
|
||||
balloon.GrabFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region signals
|
||||
|
||||
|
||||
private void OnMutated(Dictionary _mutation)
|
||||
{
|
||||
isWaitingForInput = false;
|
||||
willHideBalloon = true;
|
||||
GetTree().CreateTimer(0.1f).Timeout += () =>
|
||||
{
|
||||
if (willHideBalloon)
|
||||
{
|
||||
willHideBalloon = false;
|
||||
balloon.Hide();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
174
src/ui/dialogue/DialogueBalloon.tscn
Normal file
174
src/ui/dialogue/DialogueBalloon.tscn
Normal file
@@ -0,0 +1,174 @@
|
||||
[gd_scene load_steps=20 format=3 uid="uid://drrynjlwqt8wi"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/dialogue_manager/example_balloon/ExampleBalloon.cs" id="1_okfmu"]
|
||||
[ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="2_c4c1f"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckvgyvclnwggo" path="res://addons/dialogue_manager/dialogue_label.tscn" id="2_jm6sr"]
|
||||
[ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="3_bc8ok"]
|
||||
[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_reponses_menu.gd" id="3_yiii3"]
|
||||
[ext_resource type="FontFile" uid="uid://bohbd123672ea" path="res://src/ui/fonts/FT88-Italic.ttf" id="5_2dxvx"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spyqn"]
|
||||
bg_color = Color(0, 0, 0, 0)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(0.329412, 0.329412, 0.329412, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ri4m3"]
|
||||
bg_color = Color(0.121569, 0.121569, 0.121569, 0)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(1, 1, 1, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_e0njw"]
|
||||
bg_color = Color(0, 0, 0, 0)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(0.6, 0.6, 0.6, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
expand_margin_left = 5.0
|
||||
expand_margin_top = 5.0
|
||||
expand_margin_right = 5.0
|
||||
expand_margin_bottom = 5.0
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uy0d5"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
border_width_left = 3
|
||||
border_width_top = 3
|
||||
border_width_right = 3
|
||||
border_width_bottom = 3
|
||||
border_color = Color(0.741176, 0.8, 0.737255, 0)
|
||||
border_blend = true
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="Theme" id="Theme_qq3yp"]
|
||||
default_font = ExtResource("2_c4c1f")
|
||||
default_font_size = 20
|
||||
Button/styles/disabled = SubResource("StyleBoxFlat_spyqn")
|
||||
Button/styles/focus = SubResource("StyleBoxFlat_ri4m3")
|
||||
Button/styles/hover = SubResource("StyleBoxFlat_e0njw")
|
||||
Button/styles/normal = SubResource("StyleBoxFlat_e0njw")
|
||||
MarginContainer/constants/margin_bottom = 15
|
||||
MarginContainer/constants/margin_left = 30
|
||||
MarginContainer/constants/margin_right = 30
|
||||
MarginContainer/constants/margin_top = 15
|
||||
Panel/styles/panel = SubResource("StyleBoxFlat_uy0d5")
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8reha"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cb5sp"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_0trte"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_yxgtq"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vtj1a"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_c2c5i"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_wv0ko"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_dboi3"]
|
||||
|
||||
[node name="DialogueBalloon" type="CanvasLayer"]
|
||||
layer = 100
|
||||
script = ExtResource("1_okfmu")
|
||||
|
||||
[node name="Balloon" type="Control" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = SubResource("Theme_qq3yp")
|
||||
|
||||
[node name="Dialogue" type="MarginContainer" parent="Balloon"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 21.0
|
||||
offset_top = 897.0
|
||||
offset_right = 21.0
|
||||
offset_bottom = 897.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Balloon/Dialogue"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CharacterLabel" type="RichTextLabel" parent="Balloon/Dialogue/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 1, 1, 0.501961)
|
||||
layout_mode = 2
|
||||
mouse_filter = 1
|
||||
theme_override_colors/default_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||
theme_override_fonts/normal_font = ExtResource("3_bc8ok")
|
||||
theme_override_styles/fill = SubResource("StyleBoxEmpty_8reha")
|
||||
theme_override_styles/background = SubResource("StyleBoxEmpty_cb5sp")
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_0trte")
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_yxgtq")
|
||||
bbcode_enabled = true
|
||||
text = "Character"
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
|
||||
[node name="DialogueLabel" parent="Balloon/Dialogue/VBoxContainer" instance=ExtResource("2_jm6sr")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_fonts/normal_font = ExtResource("2_c4c1f")
|
||||
theme_override_fonts/italics_font = ExtResource("5_2dxvx")
|
||||
theme_override_fonts/bold_font = ExtResource("3_bc8ok")
|
||||
theme_override_styles/fill = SubResource("StyleBoxEmpty_vtj1a")
|
||||
theme_override_styles/background = SubResource("StyleBoxEmpty_c2c5i")
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_wv0ko")
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_dboi3")
|
||||
text = "Dialogue..."
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="Balloon"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Responses" type="MarginContainer" parent="Balloon/CenterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ResponsesMenu" type="VBoxContainer" parent="Balloon/CenterContainer/Responses" node_paths=PackedStringArray("response_template")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
theme_override_constants/separation = 2
|
||||
script = ExtResource("3_yiii3")
|
||||
response_template = NodePath("ResponseExample")
|
||||
|
||||
[node name="ResponseExample" type="Button" parent="Balloon/CenterContainer/Responses/ResponsesMenu"]
|
||||
layout_mode = 2
|
||||
text = "Response example"
|
||||
|
||||
[connection signal="gui_input" from="Balloon" to="." method="_on_balloon_gui_input"]
|
||||
[connection signal="response_selected" from="Balloon/CenterContainer/Responses/ResponsesMenu" to="." method="_on_responses_menu_response_selected"]
|
||||
6
src/ui/dialogue/FloorExit.dialogue
Normal file
6
src/ui/dialogue/FloorExit.dialogue
Normal file
@@ -0,0 +1,6 @@
|
||||
~ floor_exit
|
||||
Proceed to the next floor?
|
||||
- Yes
|
||||
do Exit()
|
||||
- No
|
||||
=> END
|
||||
15
src/ui/dialogue/FloorExit.dialogue.import
Normal file
15
src/ui/dialogue/FloorExit.dialogue.import
Normal file
@@ -0,0 +1,15 @@
|
||||
[remap]
|
||||
|
||||
importer="dialogue_manager_compiler_12"
|
||||
type="Resource"
|
||||
uid="uid://6bhfbvi6jbms"
|
||||
path="res://.godot/imported/FloorExit.dialogue-d2fbe7fb8dbc88a2f9b0dc79a5124041.tres"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/dialogue/FloorExit.dialogue"
|
||||
dest_files=["res://.godot/imported/FloorExit.dialogue-d2fbe7fb8dbc88a2f9b0dc79a5124041.tres"]
|
||||
|
||||
[params]
|
||||
|
||||
defaults=true
|
||||
11
src/ui/dialogue/ResponseExample.cs
Normal file
11
src/ui/dialogue/ResponseExample.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class ResponseExample : Button
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
Set("theme_override_colors/font_color", new Color("bcb4b0"));
|
||||
Set("theme_override_colors/font_focus_color", new Color("fff200"));
|
||||
}
|
||||
}
|
||||
BIN
src/ui/fonts/FT88-Bold.ttf
Normal file
BIN
src/ui/fonts/FT88-Bold.ttf
Normal file
Binary file not shown.
34
src/ui/fonts/FT88-Bold.ttf.import
Normal file
34
src/ui/fonts/FT88-Bold.ttf.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://cb41qqmxqurj8"
|
||||
path="res://.godot/imported/FT88-Bold.ttf-8048d5645d94ef79fb5ce0a2440ace77.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/FT88-Bold.ttf"
|
||||
dest_files=["res://.godot/imported/FT88-Bold.ttf-8048d5645d94ef79fb5ce0a2440ace77.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
src/ui/fonts/FT88-Italic.ttf
Normal file
BIN
src/ui/fonts/FT88-Italic.ttf
Normal file
Binary file not shown.
34
src/ui/fonts/FT88-Italic.ttf.import
Normal file
34
src/ui/fonts/FT88-Italic.ttf.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://bohbd123672ea"
|
||||
path="res://.godot/imported/FT88-Italic.ttf-60dc5d8522bbf018628773e8057dd0ca.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/FT88-Italic.ttf"
|
||||
dest_files=["res://.godot/imported/FT88-Italic.ttf-60dc5d8522bbf018628773e8057dd0ca.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
src/ui/fonts/FT88-Regular.ttf
Normal file
BIN
src/ui/fonts/FT88-Regular.ttf
Normal file
Binary file not shown.
34
src/ui/fonts/FT88-Regular.ttf.import
Normal file
34
src/ui/fonts/FT88-Regular.ttf.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://dit3vylt7hmmx"
|
||||
path="res://.godot/imported/FT88-Regular.ttf-0f2e9f2a66e4aa9c15dbcc62a912fdde.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/FT88-Regular.ttf"
|
||||
dest_files=["res://.godot/imported/FT88-Regular.ttf-0f2e9f2a66e4aa9c15dbcc62a912fdde.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
src/ui/fonts/FT88-Serif.ttf
Normal file
BIN
src/ui/fonts/FT88-Serif.ttf
Normal file
Binary file not shown.
34
src/ui/fonts/FT88-Serif.ttf.import
Normal file
34
src/ui/fonts/FT88-Serif.ttf.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://q8uova06hnon"
|
||||
path="res://.godot/imported/FT88-Serif.ttf-2107f72327313ffd9defb0a5e614fb14.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/FT88-Serif.ttf"
|
||||
dest_files=["res://.godot/imported/FT88-Serif.ttf-2107f72327313ffd9defb0a5e614fb14.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
src/ui/fonts/Lust_Sans_Regular.otf
Normal file
BIN
src/ui/fonts/Lust_Sans_Regular.otf
Normal file
Binary file not shown.
40
src/ui/fonts/Lust_Sans_Regular.otf.import
Normal file
40
src/ui/fonts/Lust_Sans_Regular.otf.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://dp1k143v7cppw"
|
||||
path="res://.godot/imported/Lust_Sans_Regular.otf-2d4d46b654c743da665ff51feb634231.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/Lust_Sans_Regular.otf"
|
||||
dest_files=["res://.godot/imported/Lust_Sans_Regular.otf-2d4d46b654c743da665ff51feb634231.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=false
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=false
|
||||
force_autohinter=false
|
||||
hinting=0
|
||||
subpixel_positioning=4
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=false
|
||||
preload=[{
|
||||
"chars": [],
|
||||
"glyphs": [],
|
||||
"name": "New Configuration",
|
||||
"size": Vector2i(16, 0),
|
||||
"variation_embolden": 0.0
|
||||
}]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf
Normal file
BIN
src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf
Normal file
Binary file not shown.
40
src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf.import
Normal file
40
src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://cm8j5vcdop5x0"
|
||||
path="res://.godot/imported/Mrs-Eaves-OT-Roman_31443.ttf-ec147a64c6637c23f1cc6429203e2cda.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf"
|
||||
dest_files=["res://.godot/imported/Mrs-Eaves-OT-Roman_31443.ttf-ec147a64c6637c23f1cc6429203e2cda.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[{
|
||||
"chars": [],
|
||||
"glyphs": [],
|
||||
"name": "New Configuration",
|
||||
"size": Vector2i(16, 0),
|
||||
"variation_embolden": 0.0
|
||||
}]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
8
src/ui/label_settings/HeadingFont.tres
Normal file
8
src/ui/label_settings/HeadingFont.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://wc363u5t1yi2"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="1_olalj"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_olalj")
|
||||
font_size = 48
|
||||
font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||
8
src/ui/label_settings/HeadingFontUnselected.tres
Normal file
8
src/ui/label_settings/HeadingFontUnselected.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://dw0lfsckex1yx"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="1_amsqn"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_amsqn")
|
||||
font_size = 48
|
||||
font_color = Color(0.439216, 0.415686, 0.407843, 1)
|
||||
8
src/ui/label_settings/MainTextApplied.tres
Normal file
8
src/ui/label_settings/MainTextApplied.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://ckvxvx2tiwttt"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="1_roceg"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_roceg")
|
||||
font_size = 36
|
||||
font_color = Color(1, 0.94902, 0, 1)
|
||||
8
src/ui/label_settings/MainTextBold.tres
Normal file
8
src/ui/label_settings/MainTextBold.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://cuuo43x72xcsc"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="1_4xbcf"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_4xbcf")
|
||||
font_size = 36
|
||||
font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||
8
src/ui/label_settings/MainTextFontEquipped.tres
Normal file
8
src/ui/label_settings/MainTextFontEquipped.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://ur3wpe2kp2j2"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://bohbd123672ea" path="res://src/ui/fonts/FT88-Italic.ttf" id="1_c4w2u"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_c4w2u")
|
||||
font_size = 36
|
||||
font_color = Color(1, 0.94902, 0, 1)
|
||||
7
src/ui/label_settings/MainTextFontItalicized.tres
Normal file
7
src/ui/label_settings/MainTextFontItalicized.tres
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://c4wbba5mo7qcp"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://bohbd123672ea" path="res://src/ui/fonts/FT88-Italic.ttf" id="1_ofouc"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_ofouc")
|
||||
font_size = 36
|
||||
8
src/ui/label_settings/MainTextRegular.tres
Normal file
8
src/ui/label_settings/MainTextRegular.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://dupifadnagodp"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="1_u174r"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_u174r")
|
||||
font_size = 36
|
||||
font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||
10
src/ui/label_settings/TitleFont.tres
Normal file
10
src/ui/label_settings/TitleFont.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://dnkovn3xwbt0t"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dp1k143v7cppw" path="res://src/ui/fonts/Lust_Sans_Regular.otf" id="1_kbo40"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_kbo40")
|
||||
font_size = 128
|
||||
font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||
shadow_size = 0
|
||||
shadow_offset = Vector2(0, 0)
|
||||
83
src/ui/label_settings/UISandbox.tscn
Normal file
83
src/ui/label_settings/UISandbox.tscn
Normal file
@@ -0,0 +1,83 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dxfbdk7lhdvus"]
|
||||
|
||||
[ext_resource type="LabelSettings" uid="uid://dnkovn3xwbt0t" path="res://src/ui/label_settings/TitleFont.tres" id="1_lt2oc"]
|
||||
[ext_resource type="LabelSettings" uid="uid://wc363u5t1yi2" path="res://src/ui/label_settings/HeadingFont.tres" id="2_6orqu"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dupifadnagodp" path="res://src/ui/label_settings/MainTextRegular.tres" id="3_vgwwa"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dw0lfsckex1yx" path="res://src/ui/label_settings/HeadingFontUnselected.tres" id="3_wb0jr"]
|
||||
[ext_resource type="LabelSettings" uid="uid://cuuo43x72xcsc" path="res://src/ui/label_settings/MainTextBold.tres" id="4_vds7k"]
|
||||
[ext_resource type="LabelSettings" uid="uid://c4wbba5mo7qcp" path="res://src/ui/label_settings/MainTextFontItalicized.tres" id="6_8ni0v"]
|
||||
[ext_resource type="LabelSettings" uid="uid://ur3wpe2kp2j2" path="res://src/ui/label_settings/MainTextFontEquipped.tres" id="7_o8qef"]
|
||||
[ext_resource type="LabelSettings" uid="uid://ckvxvx2tiwttt" path="res://src/ui/label_settings/MainTextApplied.tres" id="8_ld5mo"]
|
||||
|
||||
[node name="UISandbox" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -5.0
|
||||
offset_right = -5.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.137255, 0.121569, 0.12549, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
theme_override_constants/margin_left = 40
|
||||
theme_override_constants/margin_top = 40
|
||||
theme_override_constants/margin_right = 40
|
||||
theme_override_constants/margin_bottom = 40
|
||||
|
||||
[node name="HFlowContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MainTitleFont" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "MAIN TITLE FONT"
|
||||
label_settings = ExtResource("1_lt2oc")
|
||||
|
||||
[node name="HeadingFont" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "HEADING FONT - STANDARD + SELECTED"
|
||||
label_settings = ExtResource("2_6orqu")
|
||||
|
||||
[node name="Heading Font (Unselected)" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "HEADING FONT - UNSELECTED (50%)"
|
||||
label_settings = ExtResource("3_wb0jr")
|
||||
|
||||
[node name="MainTextRegular" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "Main Text Font - Regular"
|
||||
label_settings = ExtResource("3_vgwwa")
|
||||
|
||||
[node name="MainTextBold" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "Main Text Font - Bold"
|
||||
label_settings = ExtResource("4_vds7k")
|
||||
|
||||
[node name="MainTextItalic" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "Main Text Font - Italic
|
||||
"
|
||||
label_settings = ExtResource("6_8ni0v")
|
||||
|
||||
[node name="MainTextItalicEquipped" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "Main Text Font - Italic
|
||||
"
|
||||
label_settings = ExtResource("7_o8qef")
|
||||
|
||||
[node name="ItemApplied" type="Label" parent="MarginContainer/HFlowContainer"]
|
||||
layout_mode = 2
|
||||
text = "Item Applied Font - Bold"
|
||||
label_settings = ExtResource("8_ld5mo")
|
||||
Reference in New Issue
Block a user