Add a 2d drawer to canvas textures
This commit is contained in:
parent
cd20d707d4
commit
4f0b02b396
11 changed files with 354 additions and 2 deletions
|
|
@ -110,6 +110,21 @@ void SetCameraToTexture(AActor *viewpoint, const FString &texturename, double fo
|
|||
}
|
||||
}
|
||||
|
||||
void SetCanvasToTexture(FCanvas* canvas, const FString& texturename)
|
||||
{
|
||||
FTextureID textureid = TexMan.CheckForTexture(texturename, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
|
||||
if (textureid.isValid())
|
||||
{
|
||||
// Only proceed if the texture actually has a canvas.
|
||||
auto tex = TexMan.GetGameTexture(textureid);
|
||||
if (tex && tex->GetTexture()->isCanvas())
|
||||
{
|
||||
FCanvasTexture* canvasTex = static_cast<FCanvasTexture*>(tex->GetTexture());
|
||||
canvasTex->Drawer = canvas->Drawer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FCanvasTextureInfo :: UpdateAll
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue