forked from akjava/godot-simple-gemini-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaiB5EE.tmp
91 lines (73 loc) · 3.23 KB
/
maiB5EE.tmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[gd_scene load_steps=3 format=3 uid="uid://bfpwf6thusdxn"]
[ext_resource type="Script" path="res://main.gd" id="1_lwiex"]
[sub_resource type="LabelSettings" id="LabelSettings_3l24x"]
font_size = 32
[node name="Main" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_lwiex")
[node name="MarginContainer" type="MarginContainer" parent="."]
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 = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
text = "Godot Simple Gemini API"
label_settings = SubResource("LabelSettings_3l24x")
horizontal_alignment = 1
[node name="Label2" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
visible = false
layout_mode = 2
text = "you need to understand pricing.https://ai.google.dev/pricing"
[node name="KeyContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer/VBoxContainer"]
visible = false
layout_mode = 2
[node name="TextEdit" type="TextEdit" parent="MarginContainer/HBoxContainer/VBoxContainer/KeyContainer"]
custom_minimum_size = Vector2(0, 120)
layout_mode = 2
text = "Read https://ai.google.dev/pricing first
This sample need api key from settings.json . (this file added .gitignore)
make by yourself({\"api_key\":KEY} or set and click set api button.
how to get key see https://ai.google.dev/tutorials/setup"
editable = false
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer/VBoxContainer/KeyContainer"]
layout_mode = 2
alignment = 1
[node name="KeyEdit" type="LineEdit" parent="MarginContainer/HBoxContainer/VBoxContainer/KeyContainer/HBoxContainer"]
custom_minimum_size = Vector2(400, 0)
layout_mode = 2
[node name="SetAPIButton" type="Button" parent="MarginContainer/HBoxContainer/VBoxContainer/KeyContainer/HBoxContainer"]
layout_mode = 2
text = "Set API Key"
[node name="ButtonContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="Label2" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer/ButtonContainer"]
layout_mode = 2
text = "Click to open Example Scene.No way to back from selected scene so far"
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer/VBoxContainer/ButtonContainer"]
layout_mode = 2
theme_override_constants/margin_top = 20
[node name="EnterChatButton" type="Button" parent="MarginContainer/HBoxContainer/VBoxContainer/ButtonContainer/MarginContainer"]
custom_minimum_size = Vector2(100, 50)
layout_direction = 2
layout_mode = 2
size_flags_horizontal = 4
text = "Chat"
[connection signal="pressed" from="MarginContainer/HBoxContainer/VBoxContainer/KeyContainer/HBoxContainer/SetAPIButton" to="." method="_on_set_api_button_pressed"]