Recommiting glbs for LFS
Deploy Promiscuity Auth API / deploy (push) Successful in 1m59s
Deploy Promiscuity Character API / deploy (push) Successful in 1m16s
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled
Deploy Promiscuity Auth API / deploy (push) Successful in 1m59s
Deploy Promiscuity Character API / deploy (push) Successful in 1m16s
Deploy Promiscuity Inventory API / deploy (push) Has been cancelled
Deploy Promiscuity Locations API / deploy (push) Has been cancelled
Deploy Promiscuity Mail API / deploy (push) Has been cancelled
Deploy Promiscuity World API / deploy (push) Has been cancelled
Deploy Promiscuity Crafting API / deploy (push) Has been cancelled
k8s smoke test / test (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
# addons/godot_mcp/ui/mcp_panel.gd
|
||||
@tool
|
||||
extends Control
|
||||
|
||||
var status_label: Label
|
||||
var port_field: SpinBox
|
||||
var start_button: Button
|
||||
var stop_button: Button
|
||||
var log_display: TextEdit
|
||||
|
||||
func _ready():
|
||||
# Set up references to UI elements
|
||||
status_label = $VBoxContainer/StatusPanel/StatusLabel
|
||||
port_field = $VBoxContainer/ConfigPanel/PortField
|
||||
start_button = $VBoxContainer/ButtonPanel/StartButton
|
||||
stop_button = $VBoxContainer/ButtonPanel/StopButton
|
||||
log_display = $VBoxContainer/LogPanel/LogDisplay
|
||||
|
||||
# Initialize UI
|
||||
port_field.value = 6400 # Default port
|
||||
start_button.disabled = false
|
||||
stop_button.disabled = true
|
||||
|
||||
# Connect signals
|
||||
start_button.pressed.connect(_on_start_button_pressed)
|
||||
stop_button.pressed.connect(_on_stop_button_pressed)
|
||||
|
||||
# Set initial status
|
||||
update_status("Not running")
|
||||
add_log_message("Godot MCP Plugin initialized")
|
||||
|
||||
func update_status(status_text: String, is_error: bool = false):
|
||||
status_label.text = "Status: " + status_text
|
||||
if is_error:
|
||||
status_label.add_theme_color_override("font_color", Color(1, 0.3, 0.3))
|
||||
else:
|
||||
status_label.remove_theme_color_override("font_color")
|
||||
|
||||
func add_log_message(message: String):
|
||||
var timestamp = Time.get_datetime_string_from_system()
|
||||
log_display.text += "[" + timestamp + "] " + message + "\n"
|
||||
log_display.scroll_vertical = log_display.get_line_count()
|
||||
|
||||
func _on_start_button_pressed():
|
||||
# This function will be called from the plugin.gd script
|
||||
# when the server is actually started
|
||||
update_status("Running on port " + str(port_field.value))
|
||||
start_button.disabled = true
|
||||
stop_button.disabled = false
|
||||
add_log_message("MCP Server started on port " + str(port_field.value))
|
||||
|
||||
func _on_stop_button_pressed():
|
||||
# This function will be called from the plugin.gd script
|
||||
# when the server is actually stopped
|
||||
update_status("Stopped")
|
||||
start_button.disabled = false
|
||||
stop_button.disabled = true
|
||||
add_log_message("MCP Server stopped")
|
||||
|
||||
# Function to be called from plugin.gd when a client connects
|
||||
func on_client_connected():
|
||||
add_log_message("Client connected")
|
||||
update_status("Client connected")
|
||||
|
||||
# Function to be called from plugin.gd when a client disconnects
|
||||
func on_client_disconnected():
|
||||
add_log_message("Client disconnected")
|
||||
update_status("Running (no clients)")
|
||||
|
||||
# Function to be called from plugin.gd when a command is received
|
||||
func on_command_received(command_type, params):
|
||||
add_log_message("Command received: " + command_type)
|
||||
|
||||
# Function to be called from plugin.gd when a response is sent
|
||||
func on_response_sent(command_type, success):
|
||||
var status = "Success" if success else "Failed"
|
||||
add_log_message("Response sent for " + command_type + ": " + status)
|
||||
@@ -0,0 +1 @@
|
||||
uid://bqabyd7ce60u0
|
||||
@@ -0,0 +1,69 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dxvt86ck6b2a4"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/godot_mcp/ui/mcp_panel.gd" id="1_4g23r"]
|
||||
|
||||
[node name="MCPPanel" 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_4g23r")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="StatusPanel" type="PanelContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="VBoxContainer/StatusPanel"]
|
||||
layout_mode = 2
|
||||
text = "Status: Not running"
|
||||
|
||||
[node name="ConfigPanel" type="PanelContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ConfigPanel"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PortLabel" type="Label" parent="VBoxContainer/ConfigPanel/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Port:"
|
||||
|
||||
[node name="PortField" type="SpinBox" parent="VBoxContainer/ConfigPanel"]
|
||||
layout_mode = 2
|
||||
min_value = 1024.0
|
||||
max_value = 65535.0
|
||||
value = 6400.0
|
||||
alignment = 1
|
||||
|
||||
[node name="ButtonPanel" type="PanelContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ButtonPanel"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="StartButton" type="Button" parent="VBoxContainer/ButtonPanel"]
|
||||
layout_mode = 2
|
||||
text = "Start Server"
|
||||
|
||||
[node name="StopButton" type="Button" parent="VBoxContainer/ButtonPanel"]
|
||||
layout_mode = 2
|
||||
disabled = true
|
||||
text = "Stop Server"
|
||||
|
||||
[node name="LogPanel" type="PanelContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="LogDisplay" type="TextEdit" parent="VBoxContainer/LogPanel"]
|
||||
layout_mode = 2
|
||||
editable = false
|
||||
wrap_mode = 1
|
||||
Reference in New Issue
Block a user