mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
Add proportionality support for GameUI panels (#35)
* Add proportionality support for GameUI panels * Add Android platform define * Fix button wrong state on fast clicking Co-authored-by: JusicP <slender87844@gmail.com>
This commit is contained in:
+10
-10
@@ -161,16 +161,6 @@ public:
|
||||
|
||||
SetPaintBackgroundEnabled( false );
|
||||
|
||||
// the image has the same name as the config file
|
||||
char szMaterial[ MAX_PATH ];
|
||||
Q_snprintf( szMaterial, sizeof(szMaterial), "chapters/%s", chapterConfigFile );
|
||||
char *ext = strstr( szMaterial, "." );
|
||||
if ( ext )
|
||||
{
|
||||
*ext = 0;
|
||||
}
|
||||
m_pLevelPic->SetImage( szMaterial );
|
||||
|
||||
KeyValues *pKeys = NULL;
|
||||
if ( GameUI().IsConsoleUI() )
|
||||
{
|
||||
@@ -178,6 +168,16 @@ public:
|
||||
}
|
||||
LoadControlSettings( "Resource/NewGameChapterPanel.res", NULL, pKeys );
|
||||
|
||||
// the image has the same name as the config file
|
||||
char szMaterial[MAX_PATH];
|
||||
Q_snprintf(szMaterial, sizeof(szMaterial), "chapters/%s", chapterConfigFile);
|
||||
char* ext = strstr(szMaterial, ".");
|
||||
if (ext)
|
||||
{
|
||||
*ext = 0;
|
||||
}
|
||||
m_pLevelPic->SetImage(szMaterial);
|
||||
|
||||
int px, py;
|
||||
m_pLevelPicBorder->GetPos( px, py );
|
||||
SetSize( m_pLevelPicBorder->GetWide(), py + m_pLevelPicBorder->GetTall() );
|
||||
|
||||
Reference in New Issue
Block a user