mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
!Move/!MoveMeter: Added support for formulas [Smurfier]
This commit is contained in:
parent
81540a88d8
commit
cea569c0b6
@ -833,8 +833,14 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const std::vector<std::wstring>& ar
|
||||
break;
|
||||
|
||||
case BANG_MOVE:
|
||||
MoveWindow(_wtoi(args[0].c_str()), _wtoi(args[1].c_str()));
|
||||
{
|
||||
double value;
|
||||
int x = m_Parser.ParseFormula(args[0], &value) ? (int)value : _wtoi(args[0].c_str());
|
||||
int y = m_Parser.ParseFormula(args[1], &value) ? (int)value : _wtoi(args[1].c_str());
|
||||
|
||||
MoveWindow(x, y);
|
||||
break;
|
||||
}
|
||||
|
||||
case BANG_ZPOS:
|
||||
SetWindowZPosition((ZPOSITION)_wtoi(args[0].c_str()));
|
||||
@ -879,8 +885,14 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const std::vector<std::wstring>& ar
|
||||
break;
|
||||
|
||||
case BANG_MOVEMETER:
|
||||
MoveMeter(args[2], _wtoi(args[0].c_str()), _wtoi(args[1].c_str()));
|
||||
{
|
||||
double value;
|
||||
int x = m_Parser.ParseFormula(args[0], &value) ? (int)value : _wtoi(args[0].c_str());
|
||||
int y = m_Parser.ParseFormula(args[1], &value) ? (int)value : _wtoi(args[1].c_str());
|
||||
|
||||
MoveMeter(args[2], x, y);
|
||||
break;
|
||||
}
|
||||
|
||||
case BANG_COMMANDMEASURE:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user