mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-12 16:18:03 +00:00
game(client): fix touch drawing again bruh
This commit is contained in:
parent
5a28ccec8c
commit
3daa537791
@ -529,8 +529,8 @@ void CTouchControls::CreateAtlasTexture()
|
|||||||
|
|
||||||
void CTouchControls::Shutdown( )
|
void CTouchControls::Shutdown( )
|
||||||
{
|
{
|
||||||
btns.PurgeAndDeleteElements();
|
|
||||||
textureList.PurgeAndDeleteElements();
|
textureList.PurgeAndDeleteElements();
|
||||||
|
btns.PurgeAndDeleteElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTouchControls::RemoveButtons()
|
void CTouchControls::RemoveButtons()
|
||||||
@ -642,7 +642,7 @@ void CTouchControls::Paint( )
|
|||||||
{
|
{
|
||||||
CTouchButton *btn = *it;
|
CTouchButton *btn = *it;
|
||||||
|
|
||||||
if( btn->type != touch_move && btn->type != touch_look && !(btn->flags & TOUCH_FL_HIDE) )
|
if( btn->texture != NULL && !(btn->flags & TOUCH_FL_HIDE) )
|
||||||
meshCount++;
|
meshCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -652,7 +652,7 @@ void CTouchControls::Paint( )
|
|||||||
{
|
{
|
||||||
CTouchButton *btn = *it;
|
CTouchButton *btn = *it;
|
||||||
|
|
||||||
if( btn->type != touch_move && btn->type != touch_look && !(btn->flags & TOUCH_FL_HIDE) )
|
if( btn->texture != NULL && !(btn->flags & TOUCH_FL_HIDE) )
|
||||||
{
|
{
|
||||||
CTouchTexture *t = btn->texture;
|
CTouchTexture *t = btn->texture;
|
||||||
|
|
||||||
@ -717,6 +717,7 @@ void CTouchControls::AddButton( const char *name, const char *texturefile, const
|
|||||||
|
|
||||||
if( btn->texturefile[0] == 0 )
|
if( btn->texturefile[0] == 0 )
|
||||||
{
|
{
|
||||||
|
btn->texture = NULL;
|
||||||
btns.AddToTail(btn);
|
btns.AddToTail(btn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -732,6 +733,7 @@ void CTouchControls::AddButton( const char *name, const char *texturefile, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
CTouchTexture *texture = new CTouchTexture;
|
CTouchTexture *texture = new CTouchTexture;
|
||||||
|
btn->texture = texture;
|
||||||
Q_strncpy( texture->szName, btn->texturefile, sizeof(btn->texturefile) );
|
Q_strncpy( texture->szName, btn->texturefile, sizeof(btn->texturefile) );
|
||||||
textureList.AddToTail(texture);
|
textureList.AddToTail(texture);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user