Skip to content

Commit

Permalink
Copy line label text in CGraphStats
Browse files Browse the repository at this point in the history
  • Loading branch information
Necktrox committed Dec 18, 2017
1 parent fc8b1e5 commit d02e9df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Client/core/CGraphStats.cpp
Expand Up @@ -20,7 +20,7 @@ namespace
std::vector < TIMEUS > dataHistory;
int iDataPos;
SColor color;
const char* szName;
std::string strName;
};
}

Expand Down Expand Up @@ -163,7 +163,7 @@ void CGraphStats::AddTimingPoint( const char* szName )
memset( &pLine->dataHistory[ 0 ], 0, pLine->dataHistory.size() );
pLine->iDataPos = 0;
pLine->prevData = 0;
pLine->szName = szName;
pLine->strName = szName;

// Random color based on line name
MD5 md5;
Expand Down Expand Up @@ -241,6 +241,6 @@ void CGraphStats::Draw ( void )

float fX = uiOriginX + uiSizeX + 2;
float fY = uiOriginY - line.dataHistory[ line.iDataPos ] * fLineScale - fHalfLineHeight;
pGraphics->DrawStringQueued( fX, fY, fX, fY, line.color, line.szName, 1.0f, 1.0f, DT_NOCLIP, nullptr, true );
pGraphics->DrawStringQueued( fX, fY, fX, fY, line.color, line.strName.c_str(), 1.0f, 1.0f, DT_NOCLIP, nullptr, true );
}
}

0 comments on commit d02e9df

Please sign in to comment.