mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Additional changes to 4bbc372
This commit is contained in:
parent
4dc5fe0b31
commit
1ecf6086bd
@ -447,6 +447,12 @@ bool CMeter::Update()
|
|||||||
*/
|
*/
|
||||||
bool CMeter::BindPrimaryMeasure(CConfigParser& parser, const WCHAR* section, bool optional)
|
bool CMeter::BindPrimaryMeasure(CConfigParser& parser, const WCHAR* section, bool optional)
|
||||||
{
|
{
|
||||||
|
const std::wstring& style = parser.ReadString(section, L"MeterStyle", L"");
|
||||||
|
if (!style.empty())
|
||||||
|
{
|
||||||
|
parser.SetStyleTemplate(style);
|
||||||
|
}
|
||||||
|
|
||||||
const std::wstring& measureName = parser.ReadString(section, L"MeasureName", L"");
|
const std::wstring& measureName = parser.ReadString(section, L"MeasureName", L"");
|
||||||
|
|
||||||
// The meter is not bound to anything
|
// The meter is not bound to anything
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
virtual UINT GetTypeID() = 0;
|
virtual UINT GetTypeID() = 0;
|
||||||
|
|
||||||
void ReadOptions(CConfigParser& parser) { ReadOptions(parser, GetName()); parser.ClearStyleTemplate(); }
|
void ReadOptions(CConfigParser& parser) { ReadOptions(parser, GetName()); parser.ClearStyleTemplate(); }
|
||||||
void BindMeasures(CConfigParser& parser) { BindMeasures(parser, GetName()); }
|
void BindMeasures(CConfigParser& parser) { BindMeasures(parser, GetName()); parser.ClearStyleTemplate(); }
|
||||||
|
|
||||||
virtual void Initialize();
|
virtual void Initialize();
|
||||||
virtual bool Update();
|
virtual bool Update();
|
||||||
|
@ -653,7 +653,7 @@ bool CMeterHistogram::Draw(Graphics& graphics)
|
|||||||
*/
|
*/
|
||||||
void CMeterHistogram::BindMeasures(CConfigParser& parser, const WCHAR* section)
|
void CMeterHistogram::BindMeasures(CConfigParser& parser, const WCHAR* section)
|
||||||
{
|
{
|
||||||
if (BindPrimaryMeasure(parser, section, true))
|
if (BindPrimaryMeasure(parser, section, false))
|
||||||
{
|
{
|
||||||
const std::wstring* secondaryMeasure = &parser.ReadString(section, L"MeasureName2", L"");
|
const std::wstring* secondaryMeasure = &parser.ReadString(section, L"MeasureName2", L"");
|
||||||
if (secondaryMeasure->empty())
|
if (secondaryMeasure->empty())
|
||||||
|
@ -469,7 +469,7 @@ bool CMeterLine::Draw(Graphics& graphics)
|
|||||||
*/
|
*/
|
||||||
void CMeterLine::BindMeasures(CConfigParser& parser, const WCHAR* section)
|
void CMeterLine::BindMeasures(CConfigParser& parser, const WCHAR* section)
|
||||||
{
|
{
|
||||||
if (BindPrimaryMeasure(parser, section, true))
|
if (BindPrimaryMeasure(parser, section, false))
|
||||||
{
|
{
|
||||||
BindSecondaryMeasures(parser, section);
|
BindSecondaryMeasures(parser, section);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user