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

Adding changes from cave development

parent fcbb5f2f
Branches
No related tags found
1 merge request!2Backporting many features from the study on top of the Dasher3D-Core
......@@ -253,7 +253,6 @@ int32 SDasherWidget::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGe
break;
case GeometryType::Writing:
WritingObject = static_cast<FWriting*>(GeneralObject.Get());
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))), WritingObject->label, Font, ESlateDrawEffect::None, WritingObject->color);
break;
......@@ -352,7 +351,7 @@ void SDasherWidget::DrawRectangle(Dasher::screenint x1, Dasher::screenint y1, Da
const FVector2D CornerMin = FVector2D(x1 + hThickness, y1 + hThickness);
const FVector2D CornerMax = FVector2D(x2 - hThickness, y2 - hThickness);
const FLinearColor oColor = FLinearColor(outlineColor.Red / 255.0, outlineColor.Green / 255.0, outlineColor.Blue / 255.0, outlineColor.Alpha / 255.0f);
const FLinearColor oColor = FLinearColor(outlineColor.Red / 255.0f, outlineColor.Green / 255.0f, outlineColor.Blue / 255.0f, outlineColor.Alpha / 255.0f);
BackBuffer->Add(MakeUnique<FPolyLine>(TArray({ FVector2D(CornerMin.X, CornerMin.Y - hThickness),FVector2D(CornerMin.X, CornerMax.Y + hThickness) }), static_cast<float>(iThickness), oColor, false));
BackBuffer->Add(MakeUnique<FPolyLine>(TArray({ FVector2D(CornerMin.X - hThickness, CornerMax.Y),FVector2D(CornerMax.X + hThickness, CornerMax.Y) }), static_cast<float>(iThickness), oColor, false));
BackBuffer->Add(MakeUnique<FPolyLine>(TArray({ FVector2D(CornerMax.X, CornerMax.Y + hThickness),FVector2D(CornerMax.X, CornerMin.Y - hThickness) }), static_cast<float>(iThickness), oColor, false));
......@@ -361,7 +360,7 @@ void SDasherWidget::DrawRectangle(Dasher::screenint x1, Dasher::screenint y1, Da
}
void SDasherWidget::DrawString(CDasherScreen::Label* lab, screenint x1, screenint y1, unsigned int iSize, const Dasher::ColorPalette::Color& color) {
BackBuffer->Add(MakeUnique<FWriting>(UTF8_TO_TCHAR(lab->m_strText.c_str()), FVector2D(x1, y1), static_cast<int>(iSize), FLinearColor(color.Red / 255.0, color.Green / 255.0, color.Blue / 255.0, color.Alpha / 255.0f)));
BackBuffer->Add(MakeUnique<FWriting>(UTF8_TO_TCHAR(lab->m_strText.c_str()), FVector2D(x1, y1), static_cast<int>(iSize), FLinearColor(color.Red / 255.0f, color.Green / 255.0f, color.Blue / 255.0f, color.Alpha / 255.0f)));
}
void SDasherWidget::Polyline(CDasherScreen::point* points, int number, int iwidth, const Dasher::ColorPalette::Color& color) {
......@@ -371,7 +370,7 @@ void SDasherWidget::Polyline(CDasherScreen::point* points, int number, int iwidt
PointArray.Add(Point);
}
BackBuffer->Add(MakeUnique<FPolyLine>(PointArray, static_cast<float>(iwidth), FLinearColor(color.Red / 255.0, color.Green / 255.0, color.Blue / 255.0, color.Alpha / 255.0f), true));
BackBuffer->Add(MakeUnique<FPolyLine>(PointArray, static_cast<float>(iwidth), FLinearColor(color.Red / 255.0f, color.Green / 255.0f, color.Blue / 255.0f, color.Alpha / 255.0f), true));
}
//techincally polygons are just multiple polylines. Dasher doesn't actually draw polygons in our case.
......@@ -383,7 +382,7 @@ void SDasherWidget::Polygon(CDasherScreen::point* points, int number, const Dash
}
PointArray.Add(FVector2D(points[0].x, points[0].y));
BackBuffer->Add(MakeUnique<FPolyLine>(PointArray, static_cast<float>(iwidth), FLinearColor(outlinecolor.Red / 255.0, outlinecolor.Green / 255.0, outlinecolor.Blue / 255.0, outlinecolor.Alpha / 255.0), true));
BackBuffer->Add(MakeUnique<FPolyLine>(PointArray, static_cast<float>(iwidth), FLinearColor(outlinecolor.Red / 255.0f, outlinecolor.Green / 255.0f, outlinecolor.Blue / 255.0f, outlinecolor.Alpha / 255.0f), true));
}
//We pass through the contents of the dasher buffer
......
......@@ -14,12 +14,10 @@ project("DasherLib")
# If using visual studio, make sure to select the release configuration if it is not your default
############################################################################################################
############################################################################################################
# Set this to your libc++ path included with Unreal
############################################################################################################
set(LIBC_PATH "/home/ue4/UnrealEngine/Engine/Source/ThirdParty/Unix/LibCxx/")
set(LIBC_PATH "/work/vrdemo/unreal_engines/5.3.2/Engine/Source/ThirdParty/Unix/LibCxx/")
if (UNIX)
############################################################################################################
......
Subproject commit bf390871a24adb1b274e30bfd463cdbfddc3dbd0
Subproject commit 015b8c82fab747de4ff98de27ac177fcac6ddbfc
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment