mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 06:07:56 +03:00
Fix image rotation in vgui::ImagePanel
This commit is contained in:
parent
2d183a8e2a
commit
3f2f562a1e
@ -61,7 +61,11 @@ public:
|
||||
int GetNumFrames();
|
||||
void SetFrame( int nFrame );
|
||||
|
||||
#ifdef MAPBASE
|
||||
void SetRotation( int iRotation );
|
||||
#else
|
||||
void SetRotation( int iRotation ) { m_iRotation = iRotation; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void PaintBackground();
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user