Compare commits

...
This repository has been archived on 2023-11-16. You can view files and clone it, but cannot push or open issues or pull requests.

1 Commits

Author SHA1 Message Date
f2a9b64fee lock custom setting by preset 2023-09-24 10:41:14 +02:00
3 changed files with 40 additions and 12 deletions

View File

@ -13,11 +13,11 @@ public partial class Playbutton : Button
llmApiRequest = GetNode<LLMApiRequest>("/root/Node2D/HTTPRequests");
}
public override void _Pressed()
{
// llmApiRequest.RequestCompleted += OnRequestCompleted;
// llmApiRequest.Request("https://api.github.com/repos/godotengine/godot/releases/latest");
llmApiRequest?.PostToApi(OnRequestCompleted);
public override void _Pressed()
{
// llmApiRequest.RequestCompleted += OnRequestCompleted;
// llmApiRequest.Request("https://api.github.com/repos/godotengine/godot/releases/latest");
llmApiRequest?.PostToApi(OnRequestCompleted);
GD.Print("a");
@ -26,13 +26,13 @@ public partial class Playbutton : Button
node.Show();
var GParent = this.GetTree().Root.GetNode<CanvasLayer>("Root/Hauptmenü/HauptMenü");
GParent.Hide();
}
}
private void OnRequestCompleted(long result, long responseCode, string[] headers, byte[] body)
{
// Godot.Collections.Dictionary json = Json.ParseString(System.Text.Encoding.UTF8.GetString(body)).AsGodotDictionary();
// GD.Print(json["name"]);
private void OnRequestCompleted(long result, long responseCode, string[] headers, byte[] body)
{
// Godot.Collections.Dictionary json = Json.ParseString(System.Text.Encoding.UTF8.GetString(body)).AsGodotDictionary();
// GD.Print(json["name"]);
// GD.Print(Json.ParseString(System.Text.Encoding.UTF8.GetString(body)).AsGodotDictionary());
GD.Print(System.Text.Encoding.UTF8.GetString(body));
}
}
}

22
godot/PopupMenuSzenen.cs Normal file
View File

@ -0,0 +1,22 @@
using Godot;
using System;
public partial class PopupMenuSzenen : MenuButton
{
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
this.Pressed += ButtonPressed;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
private void ButtonPressed()
{
GD.Print("abc");
}
}

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=7 format=3 uid="uid://1gar30yhw8ay"]
[gd_scene load_steps=8 format=3 uid="uid://1gar30yhw8ay"]
[ext_resource type="Script" path="res://Hauptmenü.cs" id="1_4eu52"]
[ext_resource type="Script" path="res://TextEdit.cs" id="1_5gfrp"]
[ext_resource type="Texture2D" uid="uid://vn2ficr8n4n5" path="res://GodofAi.jpg" id="2_m684j"]
[ext_resource type="Script" path="res://PopupMenuSzenen.cs" id="3_l3xnr"]
[ext_resource type="Script" path="res://Playbutton.cs" id="3_ucfae"]
[ext_resource type="Script" path="res://LLMApiRequests.cs" id="5_pukni"]
@ -72,6 +73,7 @@ popup/item_10/text = "Krimi 1"
popup/item_10/id = 10
popup/item_11/text = "Krimi 2"
popup/item_11/id = 11
script = ExtResource("3_l3xnr")
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer"]
custom_minimum_size = Vector2(520, 300)
@ -368,3 +370,7 @@ stretch_mode = 1
[node name="LLMApiRequests" type="HTTPRequest" parent="."]
script = ExtResource("5_pukni")
[node name="Button" type="Button" parent="."]
offset_right = 8.0
offset_bottom = 8.0