// Oleg Petruny proprietary.

#include "JournalWidget.h"

#include "Blueprint/WidgetTree.h"
#include "Components/TextBlock.h"
#include "Components/VerticalBox.h"

void UJournalWidget::Update(TArray<FText> items)
{
    text->ClearChildren();
    for(auto& item : items)
    {
        auto obj = WidgetTree->ConstructWidget<UTextBlock>(textStyleClass);
        obj->SetVisibility(ESlateVisibility::Visible);
        obj->SetText(item);
        text->AddChild(obj);
    }
}
