Real progress on radial menus

This commit is contained in:
2026-05-16 01:49:26 -04:00
parent c0848c2670
commit e17f5417f2
12 changed files with 93 additions and 50 deletions

View File

@@ -25,9 +25,16 @@
- `Docs/` — Documentation. - `Docs/` — Documentation.
- `Config/` — Unreal config files - `Config/` — Unreal config files
- `EnginePatches/` — Custom engine modifications - `EnginePatches/` — Custom engine modifications
- `Plugins/UEWingman/` - A plugin that gives you control over the unreal editor. Drive it from bash via `python3 Plugins/UEWingman/ue-wingman.py <Command> key=value ...` (values starting with `[` or `{` are parsed as JSON). - `Plugins/UEWingman/` - A plugin that gives you control over the unreal editor.
- `../integration.UE/` - the unreal engine source tree - `../integration.UE/` - the unreal engine source tree
## Using ue-wingman
- Drive it from bash using: ue-wingman <Command> <Arg1> <Arg2> ...
- ue-wingman Documentation_Manual
- ue-wingman Documentation_Commands
- ue-wingman Documentation_Command <specific_command>
## Coding Conventions ## Coding Conventions
- Prefer early returns and `continue` to reduce nesting (never-nester style). - Prefer early returns and `continue` to reduce nesting (never-nester style).

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Widgets/WB_Menu.uasset LFS Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -12,41 +12,21 @@ class UWing_Documentation_Manual : public UWingHandler
GENERATED_BODY() GENERATED_BODY()
public: public:
UPROPERTY(EditAnywhere, meta=(Description="section of the manual"))
FString Section;
virtual void Register() override virtual void Register() override
{ {
TStringBuilder<128> Docs; UWingServer::AddHandler(this, TEXT("Print the entire manual."));
Docs.Append(TEXT("Print a section of the manual. Valid sections: "));
WingManual::PrintSectionNames(nullptr, WingManual::GetSections(), Docs);
UWingServer::AddHandler(this, Docs.ToString());
} }
virtual void Handle() override virtual void Handle() override
{ {
TSet<FName> Sections = WingManual::GetSections(); UWingManualSections::FetcherPaths();
if (Section.IsEmpty()) UWingManualSections::ExpressingTypes();
{ UWingManualSections::VariableDeclarations();
UWingManualSections::FetcherPaths(); UWingManualSections::EscapeSequencesInFNames();
UWingManualSections::ExpressingTypes(); UWingManualSections::MaterialEditing();
UWingManualSections::VariableDeclarations(); UWingManualSections::NodeContextMenus();
UWingManualSections::EscapeSequencesInFNames(); UWingManualSections::VariableGettersAndSetters();
UWingManualSections::MaterialEditing(); UWingManualSections::BestPerformance();
UWingManualSections::ImportantCommands(); UWingManualSections::ImportantCommands();
}
else
{
FName SectionName(*Section);
if (WingManual::PrintSection(SectionName))
{
WingOut::Stdout.Printf(TEXT("\n"));
WingManual::PrintSectionNames(TEXT("Other manual sections:"), Sections, WingOut::Stdout);
}
else
{
WingOut::Stdout.Printf(TEXT("Unknown manual section '%s'\n"), *Section);
WingManual::PrintSectionNames(TEXT("Valid manual sections:"), Sections, WingOut::Stdout);
}
}
} }
}; };

View File

@@ -0,0 +1,39 @@
#pragma once
#include "CoreMinimal.h"
#include "WingBasics.h"
#include "WingManual.h"
#include "WingServer.h"
#include "Documentation_Section.generated.h"
UCLASS()
class UWing_Documentation_Section : public UWingHandler
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, meta=(Description="Manual section"))
FString Section;
virtual void Register() override
{
TStringBuilder<128> Docs;
Docs.Append(TEXT("Print a section of the manual. Valid sections: "));
WingManual::PrintSectionNames(nullptr, WingManual::GetSections(), Docs);
UWingServer::AddHandler(this, Docs.ToString());
}
virtual void Handle() override
{
FName SectionName(*Section);
if (WingManual::PrintSection(SectionName))
{
WingOut::Stdout.Printf(TEXT("\n"));
WingManual::PrintSectionNames(TEXT("Other manual sections:"), WingManual::GetSections(), WingOut::Stdout);
}
else
{
WingOut::Stdout.Printf(TEXT("Unknown manual section '%s'\n"), *Section);
WingManual::PrintSectionNames(TEXT("Valid manual sections:"), WingManual::GetSections(), WingOut::Stdout);
}
}
};

View File

@@ -221,10 +221,11 @@ void UWingManualSections::ImportantCommands()
WingOut::Stdout.Print(TEXT( WingOut::Stdout.Print(TEXT(
"\n IMPORTANT COMMANDS:" "\n IMPORTANT COMMANDS:"
"\n" "\n"
"\n Documentation_Manual: print manual sections" "\n Documentation_Manual: print the entire manual"
"\n Documentation_Commands: A concise list of all ue-wingman commands" "\n Documentation_Section: print a single section of the manual"
"\n Documentation_Command: Detailed documentation for a single ue-wingman command" "\n Documentation_Commands: print concise list of all ue-wingman commands"
"\n Documentation_CreateAssets: Additional commands that create new assets" "\n Documentation_Command: detailed documentation for a single ue-wingman command"
"\n Documentation_CreateAssets: list of commands that create new assets"
"\n Blueprint_Dump: a summary of any blueprint" "\n Blueprint_Dump: a summary of any blueprint"
"\n Graph_Dump: a fairly detailed listing of any Graph" "\n Graph_Dump: a fairly detailed listing of any Graph"
"\n Details_Dump: Dump the details panel for a given object" "\n Details_Dump: Dump the details panel for a given object"

View File

@@ -223,15 +223,21 @@ FString UWingServer::PostCallHandler()
return Result; return Result;
} }
void UWingServer::TryCallHandler(const TArray<FString>& Argv) void UWingServer::TryCallHandler(TArrayView<const FString> Argv)
{ {
if (Argv.Num() < 1) FString Command = "Documentation_Manual";
if (Argv.Num() > 0)
{ {
WingOut::Stdout.Print(TEXT("Missing command\n")); Command = Argv[0];
return; Argv = Argv.RightChop(1);
} }
FString Command = Argv[0]; if ((Command.Equals(TEXT("--help"))) ||
(Command.Equals(TEXT("-help"))) ||
(Command.Equals(TEXT("help"))))
{
Command = "Documentation_Manual";
}
// Find the handler for the specified command. // Find the handler for the specified command.
FWingHandlerConfig* Found = FindHandler(Command); FWingHandlerConfig* Found = FindHandler(Command);
@@ -250,7 +256,7 @@ void UWingServer::TryCallHandler(const TArray<FString>& Argv)
// Populate the handler object with argv parameters. // Populate the handler object with argv parameters.
TArray<FWingProperty> Props = FWingProperty::GetVisible(Handler, true); TArray<FWingProperty> Props = FWingProperty::GetVisible(Handler, true);
if (!FWingProperty::PopulateFromArgv(Props, MakeArrayView(Argv).RightChop(1), WingOut::Stdout)) if (!FWingProperty::PopulateFromArgv(Props, Argv, WingOut::Stdout))
{ {
UWingServer::SuggestHandlerHelp(); UWingServer::SuggestHandlerHelp();
return; return;

View File

@@ -80,7 +80,7 @@ private:
TArray<uint8> HandleRequest(const TArray<uint8>& RequestBytes); TArray<uint8> HandleRequest(const TArray<uint8>& RequestBytes);
void PreCallHandler(); void PreCallHandler();
FString PostCallHandler(); FString PostCallHandler();
void TryCallHandler(const TArray<FString>& Argv); void TryCallHandler(TArrayView<const FString> Argv);
// ----- TCP server ----- // ----- TCP server -----
FSocket* ListenSocket = nullptr; FSocket* ListenSocket = nullptr;

View File

@@ -18,9 +18,16 @@ struct FRadialMenuItem
{ {
GENERATED_BODY() GENERATED_BODY()
UPROPERTY(BlueprintReadOnly)
FVector2D Point1 = {0,0}; FVector2D Point1 = {0,0};
UPROPERTY(BlueprintReadOnly)
FVector2D Point2 = {0,0}; FVector2D Point2 = {0,0};
UPROPERTY(BlueprintReadOnly)
FVector2D Point3 = {0,0}; FVector2D Point3 = {0,0};
UPROPERTY(BlueprintReadOnly)
bool RightSide = false; bool RightSide = false;
}; };