A "MCP" combo button in the top toolbar (LevelEditor.LevelEditorToolBar.User) opens a dropdown with: - Status: live Remote Control reachability (:30010, green/red) + re-check, and a "Start Remote Control server" action. - Active tools (N): submenu listing the catalogue from tools.json (name + desc). - Settings: opens the Setup Wizard tab. The bridge ping is refactored into PingRc(bool) so it can update a cached status silently (menu open) or with the startup notification. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
class FBlueprintEditor;
|
|
class IInputProcessor;
|
|
class UBlueprint;
|
|
class UEdGraph;
|
|
|
|
class FUEBlueprintMCPEditorModule : public IModuleInterface
|
|
{
|
|
public:
|
|
virtual void StartupModule() override;
|
|
virtual void ShutdownModule() override;
|
|
|
|
private:
|
|
friend class FMCPZoneInputProcessor;
|
|
|
|
enum class EMcpRcStatus : uint8 { Unknown, Up, Down };
|
|
|
|
void RegisterMenus();
|
|
void RegisterWizardTabAndMenu();
|
|
void RegisterMCPToolbarButton();
|
|
void BuildMCPStatusMenu(class UToolMenu* Menu);
|
|
void BuildToolsSubMenu(class UToolMenu* Menu);
|
|
void PingRc(bool bNotify);
|
|
TSharedRef<class SDockTab> SpawnWizardTab(const class FSpawnTabArgs& Args);
|
|
void NotifyBridgeStatus();
|
|
void ToggleMCPZoneMode(TWeakPtr<FBlueprintEditor> BlueprintEditor);
|
|
bool IsMCPZoneModeActive(TWeakPtr<FBlueprintEditor> BlueprintEditor) const;
|
|
bool TryCreateMCPZoneFromScreenDrag(const FVector2f& StartScreenPosition, const FVector2f& EndScreenPosition);
|
|
void CreateMCPZone(UEdGraph* Graph, UBlueprint* Blueprint, const FVector2f& GraphStart, const FVector2f& GraphEnd) const;
|
|
void RemoveMCPZones(UBlueprint* Blueprint) const;
|
|
|
|
bool bMCPZoneModeActive = false;
|
|
bool bWizardTabRegistered = false;
|
|
EMcpRcStatus CachedRcStatus = EMcpRcStatus::Unknown;
|
|
TWeakPtr<FBlueprintEditor> ActiveMCPZoneEditor;
|
|
TSharedPtr<IInputProcessor> MCPZoneInputProcessor;
|
|
};
|