diff --git a/sp/src/public/vgui_controls/ImagePanel.h b/sp/src/public/vgui_controls/ImagePanel.h index bba8f88b..f4f5ce85 100644 --- a/sp/src/public/vgui_controls/ImagePanel.h +++ b/sp/src/public/vgui_controls/ImagePanel.h @@ -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(); diff --git a/sp/src/vgui2/vgui_controls/ImagePanel.cpp b/sp/src/vgui2/vgui_controls/ImagePanel.cpp index 1a77bd2a..e045666e 100644 --- a/sp/src/vgui2/vgui_controls/ImagePanel.cpp +++ b/sp/src/vgui2/vgui_controls/ImagePanel.cpp @@ -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