Add new SliderValue GUI widget

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Ic5d44314f501341140dd7059d1cb753341f5844c
This commit is contained in:
Vojtech Bocek
2013-04-01 22:11:33 +02:00
committed by Dees_Troy
parent 2673cec07a
commit 85932344cd
22 changed files with 990 additions and 1031 deletions
+27
View File
@@ -540,6 +540,33 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
DataManager::SetValue(varName, value);
return 0;
}
if (arg.find("*") != string::npos)
{
string varName = arg.substr(0, arg.find('*'));
string multiply_by_str = gui_parse_text(arg.substr(arg.find('*') + 1, string::npos));
int multiply_by = atoi(multiply_by_str.c_str());
int value;
DataManager::GetValue(varName, value);
DataManager::SetValue(varName, value*multiply_by);
return 0;
}
if (arg.find("/") != string::npos)
{
string varName = arg.substr(0, arg.find('/'));
string divide_by_str = gui_parse_text(arg.substr(arg.find('/') + 1, string::npos));
int divide_by = atoi(divide_by_str.c_str());
int value;
if(divide_by != 0)
{
DataManager::GetValue(varName, value);
DataManager::SetValue(varName, value/divide_by);
}
return 0;
}
LOGERR("Unable to perform compute '%s'\n", arg.c_str());
return -1;
}
if (function == "setguitimezone")