This commit is contained in:
Birunthan Mohanathas 2012-07-03 16:29:25 +03:00
parent 63a5f4be38
commit 0706bf3a6e
2 changed files with 6 additions and 23 deletions

View File

@ -328,9 +328,9 @@ void CMeterString::ReadOptions(CConfigParser& parser, const WCHAR* section)
m_Color = parser.ReadColor(section, L"FontColor", Color::Black);
m_EffectColor = parser.ReadColor(section, L"FontEffectColor", Color::Black);
m_Prefix = parser.ReadString(section, L"Prefix", L"");
m_Postfix = parser.ReadString(section, L"Postfix", L"");
m_Text = parser.ReadString(section, L"Text", L"");
m_Text = parser.ReadString(section, L"Prefix", L"");
m_Text += parser.ReadString(section, L"Text", L"");
m_Text += parser.ReadString(section, L"Postfix", L"");
m_Percentual = 0!=parser.ReadInt(section, L"Percentual", 0);
m_ClipString = 0!=parser.ReadInt(section, L"ClipString", 0);
@ -507,26 +507,11 @@ bool CMeterString::Update()
stringValues.push_back((*iter)->GetStringValue(m_AutoScale, m_Scale, decimals, m_Percentual));
}
// Create the text
m_String = m_Prefix;
if (m_Text.empty())
m_String = m_Text;
if (!stringValues.empty())
{
if (!stringValues.empty())
{
m_String += stringValues[0];
}
ReplaceMeasures(stringValues, m_String);
}
else if (!stringValues.empty())
{
std::wstring tmpText = m_Text;
ReplaceMeasures(stringValues, tmpText);
m_String += tmpText;
}
else
{
m_String += m_Text;
}
if (!m_Postfix.empty()) m_String += m_Postfix;
switch (m_Case)
{

View File

@ -75,8 +75,6 @@ private:
Gdiplus::Color m_Color;
Gdiplus::Color m_EffectColor;
std::wstring m_Postfix;
std::wstring m_Prefix;
std::wstring m_Text;
std::wstring m_FontFace;
AUTOSCALE m_AutoScale;