mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-05 02:06:53 +08:00
Merge branch '4.0' into 4.1-beta
This commit is contained in:
commit
5ff511d6fb
@ -45,12 +45,17 @@
|
|||||||
|
|
||||||
using namespace spine;
|
using namespace spine;
|
||||||
|
|
||||||
|
static int brushNameId = 0;
|
||||||
|
|
||||||
// Workaround for https://github.com/EsotericSoftware/spine-runtimes/issues/1458
|
// Workaround for https://github.com/EsotericSoftware/spine-runtimes/issues/1458
|
||||||
// See issue comments for more information.
|
// See issue comments for more information.
|
||||||
struct SpineSlateMaterialBrush : public FSlateBrush {
|
struct SpineSlateMaterialBrush : public FSlateBrush {
|
||||||
SpineSlateMaterialBrush(class UMaterialInterface &InMaterial, const FVector2D &InImageSize)
|
SpineSlateMaterialBrush(class UMaterialInterface &InMaterial, const FVector2D &InImageSize)
|
||||||
: FSlateBrush(ESlateBrushDrawType::Image, FName(TEXT("None")), FMargin(0), ESlateBrushTileType::NoTile, ESlateBrushImageType::FullColor, InImageSize, FLinearColor::White, &InMaterial) {
|
: FSlateBrush(ESlateBrushDrawType::Image, FName(TEXT("None")), FMargin(0), ESlateBrushTileType::NoTile, ESlateBrushImageType::FullColor, InImageSize, FLinearColor::White, &InMaterial) {
|
||||||
ResourceName = FName(*InMaterial.GetFullName());
|
// Workaround for https://github.com/EsotericSoftware/spine-runtimes/issues/2006
|
||||||
|
FString brushName = TEXT("spineslatebrush");
|
||||||
|
brushName.AppendInt(brushNameId++);
|
||||||
|
ResourceName = FName(brushName);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user