Overhaul of manual-generation code

This commit is contained in:
2026-04-13 21:33:02 -04:00
parent 1db2705877
commit 34011e43d5
8 changed files with 235 additions and 264 deletions

View File

@@ -12,6 +12,9 @@ class UWing_Documentation_Manual : public UWingHandler
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, meta=(Optional, Description="If specified, print only this section of the manual"))
FString Section;
virtual void Register() override
{
UWingServer::AddHandler(this,
@@ -19,6 +22,23 @@ public:
}
virtual void Handle() override
{
WingManual::PrintManual({WingManual::Section::All}, nullptr, false);
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("ERROR: Unknown manual section '%s'\nAvailable sections: "), *Section);
WingManual::PrintSectionNames(WingManual::GetSections());
}
}
}
};