Skip to content
Snippets Groups Projects
Commit 2d2757e8 authored by Sebastian Pape's avatar Sebastian Pape
Browse files

Fixing font coloring

parent 77c505a4
No related branches found
No related tags found
1 merge request!1Getting the project running
...@@ -180,7 +180,7 @@ int32 SDasherWidget::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGe ...@@ -180,7 +180,7 @@ int32 SDasherWidget::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGe
Text = FString(UTF8_TO_TCHAR(WritingObject->label->m_strText.c_str())); Text = FString(UTF8_TO_TCHAR(WritingObject->label->m_strText.c_str()));
Font = FCoreStyle::GetDefaultFontStyle("Roboto", WritingObject->size, FFontOutlineSettings::NoOutline); //get the font Font = FCoreStyle::GetDefaultFontStyle("Roboto", WritingObject->size, FFontOutlineSettings::NoOutline); //get the font
FSlateDrawElement::MakeText(OutDrawElements, LayerId++, AllottedGeometry.ToPaintGeometry(FSlateLayoutTransform(1, FVector2D(WritingObject->pos.X, WritingObject->pos.Y))), Text , Font, ESlateDrawEffect::None, FLinearColor::Black); //Set the text colour to black for better contrast FSlateDrawElement::MakeText(OutDrawElements, LayerId++, AllottedGeometry.ToPaintGeometry(FSlateLayoutTransform(1, FVector2D(WritingObject->pos.X, WritingObject->pos.Y))), Text , Font, ESlateDrawEffect::None, WritingObject->color);
break; break;
case PolyLine: case PolyLine:
LineObject = static_cast<FPolyLine*>(GeneralObject.Get()); LineObject = static_cast<FPolyLine*>(GeneralObject.Get());
...@@ -256,7 +256,7 @@ void SDasherWidget::DrawString(CDasherScreen::Label* lab, screenint x1, screenin ...@@ -256,7 +256,7 @@ void SDasherWidget::DrawString(CDasherScreen::Label* lab, screenint x1, screenin
TextColor = FLinearColor(ColorPalette->Colors[colour].Red / 255.0, ColorPalette->Colors[colour].Green / 255.0, ColorPalette->Colors[colour].Blue / 255.0); TextColor = FLinearColor(ColorPalette->Colors[colour].Red / 255.0, ColorPalette->Colors[colour].Green / 255.0, ColorPalette->Colors[colour].Blue / 255.0);
} }
else { else {
TextColor = FLinearColor::Blue; TextColor = FLinearColor::Black;
} }
BackBuffer->Add(MakeUnique<FWriting>(lab, Pos, static_cast<int>(iSize), TextColor)); BackBuffer->Add(MakeUnique<FWriting>(lab, Pos, static_cast<int>(iSize), TextColor));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment