Add Games File
This commit is contained in:
+47
@@ -0,0 +1,47 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "IDetailCustomization.h"
|
||||
#include "Interfaces/IHttpRequest.h"
|
||||
#include "Widgets/Input/SComboBox.h"
|
||||
|
||||
class IPropertyHandle;
|
||||
class UQwenTTSPresetDataAsset;
|
||||
|
||||
struct FQwenTTSPresetChoice
|
||||
{
|
||||
FString Id;
|
||||
FString Label;
|
||||
FString RefText;
|
||||
FString Source;
|
||||
|
||||
FText GetDisplayText() const;
|
||||
};
|
||||
|
||||
class FQwenTTSPresetDetailsCustomization : public IDetailCustomization
|
||||
{
|
||||
public:
|
||||
static TSharedRef<IDetailCustomization> MakeInstance();
|
||||
|
||||
virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
|
||||
|
||||
private:
|
||||
TWeakObjectPtr<UQwenTTSPresetDataAsset> PresetAsset;
|
||||
TSharedPtr<IPropertyHandle> PresetIdHandle;
|
||||
TSharedPtr<IPropertyHandle> SettingsHandle;
|
||||
TArray<TSharedPtr<FQwenTTSPresetChoice>> PresetChoices;
|
||||
TSharedPtr<SComboBox<TSharedPtr<FQwenTTSPresetChoice>>> PresetComboBox;
|
||||
FText StatusText = FText::FromString(TEXT("Not loaded"));
|
||||
|
||||
FReply RefreshPresets();
|
||||
void HandlePresetResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
|
||||
void SetPresetChoicesFromStatusJson(const FString& ResponseText);
|
||||
FString GetStatusUrl() const;
|
||||
TSharedPtr<FQwenTTSPresetChoice> GetSelectedChoice() const;
|
||||
FText GetSelectedPresetText() const;
|
||||
FText GetStatusText() const;
|
||||
void HandleSelectionChanged(TSharedPtr<FQwenTTSPresetChoice> Choice, ESelectInfo::Type SelectInfo);
|
||||
TSharedRef<SWidget> MakePresetComboWidget(TSharedPtr<FQwenTTSPresetChoice> Choice) const;
|
||||
};
|
||||
Reference in New Issue
Block a user