(Feat) Add Animation Fps Charater

This commit is contained in:
2026-08-13 22:07:08 +02:00
parent 176beab9fc
commit cca54a5e0d
157 changed files with 850 additions and 148 deletions
@@ -0,0 +1,41 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "CraftingIngredientRowWidget.h"
#include "Components/Image.h"
#include "Components/TextBlock.h"
#include "ItemDataAsset.h"
void UCraftingIngredientRowWidget::SetIngredient(const FCraftIngredientStatus& Status)
{
if (IngredientIcon)
{
UTexture2D* Icon = Status.Item ? Status.Item->Icon : nullptr;
if (Icon)
{
IngredientIcon->SetBrushFromTexture(Icon);
IngredientIcon->SetVisibility(ESlateVisibility::HitTestInvisible);
}
else
{
// Sans ca, un objet sans icone afficherait le carre blanc du brush
// par defaut au milieu de la liste.
IngredientIcon->SetVisibility(ESlateVisibility::Hidden);
}
}
if (IngredientNameText)
{
IngredientNameText->SetText(Status.Item ? Status.Item->DisplayName : FText::GetEmpty());
}
if (IngredientCountText)
{
IngredientCountText->SetText(FText::Format(CountFormat,
FText::AsNumber(Status.OwnedQuantity),
FText::AsNumber(Status.RequiredQuantity)));
IngredientCountText->SetColorAndOpacity(FSlateColor(Status.IsSatisfied() ? EnoughColor : MissingColor));
}
}