From e17f5417f26387f4074006cdc84c32cdde80f55e Mon Sep 17 00:00:00 2001 From: jyelon Date: Sat, 16 May 2026 01:49:26 -0400 Subject: [PATCH] Real progress on radial menus --- AGENTS.md | 9 ++++- Content/Luprex/lxPlayerController.uasset | 4 +- Content/Widgets/WB_Crosshair.uasset | 4 +- Content/Widgets/WB_Hotkeys.uasset | 4 +- Content/Widgets/WB_Menu.uasset | 3 ++ Content/Widgets/WB_Menu_Item.uasset | 4 +- .../UEWingman/Handlers/Documentation_Manual.h | 40 +++++-------------- .../Handlers/Documentation_Section.h | 39 ++++++++++++++++++ .../Source/UEWingman/Private/WingManual.cpp | 9 +++-- .../Source/UEWingman/Private/WingServer.cpp | 18 ++++++--- .../Source/UEWingman/Public/WingServer.h | 2 +- Source/Integration/RadialMenu.h | 7 ++++ 12 files changed, 93 insertions(+), 50 deletions(-) create mode 100644 Content/Widgets/WB_Menu.uasset create mode 100644 Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Section.h diff --git a/AGENTS.md b/AGENTS.md index f1e323c2..20acb153 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,9 +25,16 @@ - `Docs/` — Documentation. - `Config/` — Unreal config files - `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 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 +## Using ue-wingman + +- Drive it from bash using: ue-wingman ... +- ue-wingman Documentation_Manual +- ue-wingman Documentation_Commands +- ue-wingman Documentation_Command + ## Coding Conventions - Prefer early returns and `continue` to reduce nesting (never-nester style). diff --git a/Content/Luprex/lxPlayerController.uasset b/Content/Luprex/lxPlayerController.uasset index d5668e35..97b9b8b8 100644 --- a/Content/Luprex/lxPlayerController.uasset +++ b/Content/Luprex/lxPlayerController.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79fd5a76e5c2f989fb41ccd8a44d3e7f491151b4537bc4909f3d80804ea764c1 -size 165477 +oid sha256:bd5a35ff0e198aab059399dcd30e5690121e6015e698e766973241aec81ec209 +size 165165 diff --git a/Content/Widgets/WB_Crosshair.uasset b/Content/Widgets/WB_Crosshair.uasset index ab4e1d97..55b21f75 100644 --- a/Content/Widgets/WB_Crosshair.uasset +++ b/Content/Widgets/WB_Crosshair.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebf07775928343c1a455ea387c8b2a8fa48f2fa8977f1756f7cbeadc408d290e -size 70492 +oid sha256:51b886623cd35728a93c0ef05cf9aed953a95b1be18c5c25e52b273953ce6697 +size 70472 diff --git a/Content/Widgets/WB_Hotkeys.uasset b/Content/Widgets/WB_Hotkeys.uasset index fc3ecc3d..96269f22 100644 --- a/Content/Widgets/WB_Hotkeys.uasset +++ b/Content/Widgets/WB_Hotkeys.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44c375d755465c9ca6a741bcdcfb88db842c4525c4c5e38442c4eed208e7fa4c -size 292603 +oid sha256:6dedb64171d43ffe71a1935fb18fc44127a4404dd3f77bad897158f514d23ac2 +size 292218 diff --git a/Content/Widgets/WB_Menu.uasset b/Content/Widgets/WB_Menu.uasset new file mode 100644 index 00000000..59f19145 --- /dev/null +++ b/Content/Widgets/WB_Menu.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81e29facf48d989417b63089bed44466b257e3abd65d070628fc1d01c5248fb9 +size 246315 diff --git a/Content/Widgets/WB_Menu_Item.uasset b/Content/Widgets/WB_Menu_Item.uasset index 299d68be..cc036174 100644 --- a/Content/Widgets/WB_Menu_Item.uasset +++ b/Content/Widgets/WB_Menu_Item.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d05c0fe160bba07ae62fa218b35285fe04ba8ad23f536157babc4748bb179c3 -size 58565 +oid sha256:12fcddbda10c43d75ffa1e69ef965e788e73601151ed8beb68bf8153a485185a +size 49715 diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Manual.h b/Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Manual.h index ceb7b6e2..de01a1f2 100644 --- a/Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Manual.h +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Manual.h @@ -12,41 +12,21 @@ class UWing_Documentation_Manual : public UWingHandler GENERATED_BODY() public: - UPROPERTY(EditAnywhere, meta=(Description="section of the manual")) - 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()); + UWingServer::AddHandler(this, TEXT("Print the entire manual.")); } virtual void Handle() override { - TSet Sections = WingManual::GetSections(); - if (Section.IsEmpty()) - { - UWingManualSections::FetcherPaths(); - UWingManualSections::ExpressingTypes(); - UWingManualSections::VariableDeclarations(); - UWingManualSections::EscapeSequencesInFNames(); - UWingManualSections::MaterialEditing(); - 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); - } - } + UWingManualSections::FetcherPaths(); + UWingManualSections::ExpressingTypes(); + UWingManualSections::VariableDeclarations(); + UWingManualSections::EscapeSequencesInFNames(); + UWingManualSections::MaterialEditing(); + UWingManualSections::NodeContextMenus(); + UWingManualSections::VariableGettersAndSetters(); + UWingManualSections::BestPerformance(); + UWingManualSections::ImportantCommands(); } }; diff --git a/Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Section.h b/Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Section.h new file mode 100644 index 00000000..a301f186 --- /dev/null +++ b/Plugins/UEWingman/Source/UEWingman/Handlers/Documentation_Section.h @@ -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); + } + } +}; diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp index 4e4bf303..213bb08a 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingManual.cpp @@ -221,10 +221,11 @@ void UWingManualSections::ImportantCommands() WingOut::Stdout.Print(TEXT( "\n IMPORTANT COMMANDS:" "\n" - "\n Documentation_Manual: print manual sections" - "\n Documentation_Commands: A concise list of all ue-wingman commands" - "\n Documentation_Command: Detailed documentation for a single ue-wingman command" - "\n Documentation_CreateAssets: Additional commands that create new assets" + "\n Documentation_Manual: print the entire manual" + "\n Documentation_Section: print a single section of the manual" + "\n Documentation_Commands: print concise list of all ue-wingman commands" + "\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 Graph_Dump: a fairly detailed listing of any Graph" "\n Details_Dump: Dump the details panel for a given object" diff --git a/Plugins/UEWingman/Source/UEWingman/Private/WingServer.cpp b/Plugins/UEWingman/Source/UEWingman/Private/WingServer.cpp index 4f78d8aa..b91bb957 100644 --- a/Plugins/UEWingman/Source/UEWingman/Private/WingServer.cpp +++ b/Plugins/UEWingman/Source/UEWingman/Private/WingServer.cpp @@ -223,15 +223,21 @@ FString UWingServer::PostCallHandler() return Result; } -void UWingServer::TryCallHandler(const TArray& Argv) +void UWingServer::TryCallHandler(TArrayView Argv) { - if (Argv.Num() < 1) + FString Command = "Documentation_Manual"; + if (Argv.Num() > 0) { - WingOut::Stdout.Print(TEXT("Missing command\n")); - return; + Command = Argv[0]; + 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. FWingHandlerConfig* Found = FindHandler(Command); @@ -250,7 +256,7 @@ void UWingServer::TryCallHandler(const TArray& Argv) // Populate the handler object with argv parameters. TArray Props = FWingProperty::GetVisible(Handler, true); - if (!FWingProperty::PopulateFromArgv(Props, MakeArrayView(Argv).RightChop(1), WingOut::Stdout)) + if (!FWingProperty::PopulateFromArgv(Props, Argv, WingOut::Stdout)) { UWingServer::SuggestHandlerHelp(); return; diff --git a/Plugins/UEWingman/Source/UEWingman/Public/WingServer.h b/Plugins/UEWingman/Source/UEWingman/Public/WingServer.h index d1cc7963..7453971b 100644 --- a/Plugins/UEWingman/Source/UEWingman/Public/WingServer.h +++ b/Plugins/UEWingman/Source/UEWingman/Public/WingServer.h @@ -80,7 +80,7 @@ private: TArray HandleRequest(const TArray& RequestBytes); void PreCallHandler(); FString PostCallHandler(); - void TryCallHandler(const TArray& Argv); + void TryCallHandler(TArrayView Argv); // ----- TCP server ----- FSocket* ListenSocket = nullptr; diff --git a/Source/Integration/RadialMenu.h b/Source/Integration/RadialMenu.h index 0969d244..8da8a1b0 100644 --- a/Source/Integration/RadialMenu.h +++ b/Source/Integration/RadialMenu.h @@ -18,9 +18,16 @@ struct FRadialMenuItem { GENERATED_BODY() + UPROPERTY(BlueprintReadOnly) FVector2D Point1 = {0,0}; + + UPROPERTY(BlueprintReadOnly) FVector2D Point2 = {0,0}; + + UPROPERTY(BlueprintReadOnly) FVector2D Point3 = {0,0}; + + UPROPERTY(BlueprintReadOnly) bool RightSide = false; };