Adds Custom DataAsset UI + Added Request buttons for RaceDatas/TeamList/Rankings request to ApiStatus Tab + Addes Tracked Requests For Rankings + Added Utils Module For Blueprint Utilities Functions
This commit is contained in:
@ -10,14 +10,16 @@
|
||||
*
|
||||
*/
|
||||
class UDTFluxNetworkSubsystem;
|
||||
class UDTFluxCoreSubsystem;
|
||||
class SSuperListView;
|
||||
|
||||
|
||||
class DTFLUXAPISTATUS_API SDTFluxStatusWidget : public SCompoundWidget
|
||||
{
|
||||
public:
|
||||
SLATE_BEGIN_ARGS(SDTFluxStatusWidget)
|
||||
{
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
SLATE_END_ARGS()
|
||||
|
||||
@ -28,9 +30,43 @@ public:
|
||||
void Construct(const FArguments& InArgs);
|
||||
TAttribute<FText> ConnectionActionButtonText;
|
||||
FReply OnConnectionActionButtonClicked();
|
||||
|
||||
|
||||
enum class EComboBoxItemType
|
||||
{
|
||||
Contest,
|
||||
Stage,
|
||||
Split,
|
||||
None
|
||||
};
|
||||
|
||||
struct FComboBoxItem
|
||||
{
|
||||
FString DisplayText;
|
||||
int ContestId = -1;
|
||||
int StageId = -1;
|
||||
int SplitId = -1;
|
||||
EComboBoxItemType Type = EComboBoxItemType::None;
|
||||
|
||||
|
||||
FComboBoxItem(const EComboBoxItemType InType, const FString& InDisplayText, const int InContestId,
|
||||
const int InStageId = -1, const int InSplitId = -1)
|
||||
: DisplayText(InDisplayText), ContestId(InContestId), StageId(InStageId), SplitId(InSplitId), Type(InType)
|
||||
{
|
||||
}
|
||||
|
||||
static TSharedPtr<FComboBoxItem> CreateItem(const EComboBoxItemType& InType, const FString& InDisplayText,
|
||||
const int InContestId, const int InStageId = -1,
|
||||
const int InSplitId = -1)
|
||||
{
|
||||
TSharedPtr<FComboBoxItem> Item = MakeShareable(
|
||||
new FComboBoxItem(InType, InDisplayText, InContestId, InStageId, InSplitId));
|
||||
return Item;
|
||||
}
|
||||
};
|
||||
|
||||
private:
|
||||
UDTFluxNetworkSubsystem* DTFlux = nullptr;
|
||||
UDTFluxNetworkSubsystem* DTFluxNetwork = nullptr;
|
||||
UDTFluxCoreSubsystem* DTFluxCore = nullptr;
|
||||
// // TODO make a struct
|
||||
FText GetWebSocketStatusText() const;
|
||||
FText GetWebConnectActionButtonText() const;
|
||||
@ -39,6 +75,18 @@ private:
|
||||
TSharedPtr<STextBlock> WsStatusText;
|
||||
TSharedPtr<SButton> ConnectionActionButton;
|
||||
|
||||
TSharedPtr<SComboBox<TSharedPtr<FComboBoxItem>>> ContestComboBox;
|
||||
TArray<TSharedPtr<FComboBoxItem>> ContestComboBoxItems;
|
||||
TSharedPtr<FComboBoxItem> SelectedContestComboBoxItem;
|
||||
|
||||
|
||||
|
||||
// Méthodes pour le ComboBox
|
||||
void PopulateComboBoxItems();
|
||||
TSharedRef<SWidget> OnGeneRankingComboWidget(TSharedPtr<FComboBoxItem> InItem);
|
||||
void OnComboContestRankingChanged(TSharedPtr<FComboBoxItem> NewSelection, ESelectInfo::Type SelectInfo);
|
||||
FText GetCurrContestComboBoxValue() const;
|
||||
|
||||
static FSlateColor GetComboItemRankingColor(const TSharedPtr<FComboBoxItem> Item);
|
||||
|
||||
FReply OnRankingButtonClicked() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user