Merge pull request #217 from samisalreadytaken/vscript_vgui-patch

vscript vgui hud viewport parent
This commit is contained in:
Blixibon
2023-10-24 20:13:01 -05:00
committed by GitHub
11 changed files with 375 additions and 118 deletions

View File

@@ -73,6 +73,13 @@ void ImagePanel::OnSizeChanged(int newWide, int newTall)
//-----------------------------------------------------------------------------
void ImagePanel::SetImage(IImage *image)
{
#ifdef MAPBASE
if ( image )
{
image->SetRotation( m_iRotation );
}
#endif
m_pImage = image;
Repaint();
}
@@ -471,3 +478,15 @@ void ImagePanel::SetFrame( int nFrame )
return m_pImage->SetFrame( nFrame );
}
#ifdef MAPBASE
void ImagePanel::SetRotation( int iRotation )
{
m_iRotation = iRotation;
if ( m_pImage )
{
m_pImage->SetRotation( m_iRotation );
}
}
#endif