actions: Separate data from action string

Modules now no longer need to manually parse the action string and
extract data from it.
This commit is contained in:
patrick96
2020-05-24 00:36:16 +02:00
committed by Patrick Ziegler
parent 8acedeef87
commit bc1b86c584
33 changed files with 124 additions and 142 deletions

View File

@ -88,8 +88,8 @@ namespace modules {
string output{module::get_output()};
if (m_scroll) {
m_builder->action(mousebtn::SCROLL_UP, *this, EVENT_INC);
m_builder->action(mousebtn::SCROLL_DOWN, *this, EVENT_DEC);
m_builder->action(mousebtn::SCROLL_UP, *this, EVENT_INC, "");
m_builder->action(mousebtn::SCROLL_DOWN, *this, EVENT_DEC, "");
}
m_builder->append(std::move(output));
@ -113,7 +113,7 @@ namespace modules {
return true;
}
bool backlight_module::input(string&& cmd) {
bool backlight_module::input(string&& cmd, string&&) {
double value_mod{0.0};
if (cmd == EVENT_INC) {