some more changes whatever
This commit is contained in:
@@ -13,9 +13,9 @@
|
||||
]
|
||||
},
|
||||
"welcome": [
|
||||
"Oh hello, {0}... You look great! What do you want from me?",
|
||||
"Hey, {0}! Hope you have fun today! So what do you want?",
|
||||
"Hi! What's up {0}?"
|
||||
"Oh hello, [color=blue]{player}[/color]... You look great! What do you want from me?",
|
||||
"Hey, [color=blue]{player}[/color]! Hope you have fun today! So what do you want?",
|
||||
"Hi! What's up [color=blue]{player}[/color]?"
|
||||
],
|
||||
"else": [
|
||||
"Do you need something else?",
|
||||
@@ -23,7 +23,7 @@
|
||||
],
|
||||
"goodbye": [
|
||||
"Was nice talking to you goodbye!",
|
||||
"Have a great day, {0}!"
|
||||
"Have a great day, [color=blue]{player}[/color]!"
|
||||
],
|
||||
"tipp": [
|
||||
[
|
||||
@@ -32,7 +32,7 @@
|
||||
"You can interact with cupcakes and use the buggy placeholder clouds as a football."
|
||||
],
|
||||
[
|
||||
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr,",
|
||||
"[center][b][wave amp=50 freq=15][rainbow]This is cool test text[/rainbow][/wave][/b][/center]",
|
||||
"sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,",
|
||||
"sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.",
|
||||
"Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
|
||||
|
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://bkm7365u1mm3o"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bkm7365u1mm3o"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/scene-scripts/dialogue-system/dialog_bubble.cs" id="1_xtj1q"]
|
||||
[ext_resource type="FontFile" uid="uid://cx6bvqk0ghmjv" path="res://assets/fonts/urbane-rounded-medium.otf" id="2_qrihj"]
|
||||
[ext_resource type="Texture2D" uid="uid://04pdpdvkg2s" path="res://assets/textures/dialogue/dialogue_answer_ninepatch.png" id="3_n3y1v"]
|
||||
[ext_resource type="PackedScene" uid="uid://cv87js42t1sty" path="res://scenes/gui/dlg_answer_button.tscn" id="4_r5f4t"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5w2xu"]
|
||||
|
||||
@@ -100,3 +101,11 @@ theme_override_constants/margin_bottom = 30
|
||||
|
||||
[node name="v_box_container" type="VBoxContainer" parent="box/panel_container/margin_container"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="answer_button" parent="box/panel_container/margin_container/v_box_container" instance=ExtResource("4_r5f4t")]
|
||||
layout_mode = 2
|
||||
text = "needs focus on mouse hover"
|
||||
|
||||
[node name="answer_button_2" parent="box/panel_container/margin_container/v_box_container" instance=ExtResource("4_r5f4t")]
|
||||
layout_mode = 2
|
||||
text = "jkbhjvvjvhgvhjv"
|
||||
|
@@ -16,10 +16,9 @@ content_margin_top = 8.0
|
||||
|
||||
[node name="answer_button" type="Button"]
|
||||
custom_minimum_size = Vector2(100, 32)
|
||||
focus_mode = 0
|
||||
theme_override_colors/icon_normal_color = Color(0, 0, 0, 0)
|
||||
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/icon_hover_color = Color(0, 0, 0, 0)
|
||||
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/icon_disabled_color = Color(0, 0, 0, 0)
|
||||
|
@@ -16,9 +16,9 @@ public partial class dialog_bubble : CanvasLayer
|
||||
dlgLines.Add("Hello! I'm a [color=purple]debug character[/color] and...");
|
||||
dlgLines.Add("[center][b][wave amp=50 freq=15][rainbow]This is cool test text[/rainbow][/wave][/b][/center]"); //bbcode gets counted to so typewrite effect takes decades //make a seperate variable without bbcode and count that instead
|
||||
}
|
||||
public void GetDialog(string file, string title, Variant actor)
|
||||
public void GetDialog(string file, string title, Variant actor, string playerName)
|
||||
{
|
||||
parsedDlg = Json.ParseString(FileAccess.Open(file, FileAccess.ModeFlags.Read).GetAsText());
|
||||
parsedDlg = Json.ParseString(FileAccess.Open(file, FileAccess.ModeFlags.Read).GetAsText().Replace("{player}", playerName));
|
||||
GetNode<Label>("box/name_label").Text = title;
|
||||
GD.Print("Now talking to: " + actor);
|
||||
if (GetParent().Name == "player") GetParent<player>().allowMovement = false;
|
||||
|
@@ -28,7 +28,7 @@ public partial class player : CharacterBody2D
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (Input.IsActionJustPressed("ui_accept") && dialogRayCast.IsColliding() && allowMovement)
|
||||
GetNode<dialog_bubble>("dialog_bubble").GetDialog(dialogRayCast.GetCollider().Get("file").AsString(), dialogRayCast.GetCollider().Get("title").AsString(), dialogRayCast.GetCollider().Get("actor"));
|
||||
GetNode<dialog_bubble>("dialog_bubble").GetDialog(dialogRayCast.GetCollider().Get("file").AsString(), dialogRayCast.GetCollider().Get("title").AsString(), dialogRayCast.GetCollider().Get("actor"), playerName);
|
||||
|
||||
//animation system (with controller support wich cant get normalized vector)
|
||||
if (allowMovement == false)
|
||||
|
Reference in New Issue
Block a user