mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-05 10:10:42 +03:00
Fix image rotation in vgui::ImagePanel
This commit is contained in:
parent
2d183a8e2a
commit
3f2f562a1e
@ -61,7 +61,11 @@ public:
|
|||||||
int GetNumFrames();
|
int GetNumFrames();
|
||||||
void SetFrame( int nFrame );
|
void SetFrame( int nFrame );
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
void SetRotation( int iRotation );
|
||||||
|
#else
|
||||||
void SetRotation( int iRotation ) { m_iRotation = iRotation; }
|
void SetRotation( int iRotation ) { m_iRotation = iRotation; }
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void PaintBackground();
|
virtual void PaintBackground();
|
||||||
|
@ -73,6 +73,13 @@ void ImagePanel::OnSizeChanged(int newWide, int newTall)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void ImagePanel::SetImage(IImage *image)
|
void ImagePanel::SetImage(IImage *image)
|
||||||
{
|
{
|
||||||
|
#ifdef MAPBASE
|
||||||
|
if ( image )
|
||||||
|
{
|
||||||
|
image->SetRotation( m_iRotation );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
m_pImage = image;
|
m_pImage = image;
|
||||||
Repaint();
|
Repaint();
|
||||||
}
|
}
|
||||||
@ -471,3 +478,15 @@ void ImagePanel::SetFrame( int nFrame )
|
|||||||
|
|
||||||
return m_pImage->SetFrame( 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