record clicks on dialog controls
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "mathutil.hpp"
|
||||
#include "tools/prefs.hpp"
|
||||
#include "tools/cursors.hpp"
|
||||
#include "replay.hpp"
|
||||
|
||||
void cControl::setText(std::string l){
|
||||
lbl = l;
|
||||
@@ -347,6 +348,12 @@ bool cControl::haveHandler(eDlogEvt t) const {
|
||||
}
|
||||
|
||||
bool cControl::triggerClickHandler(cDialog& dlg, std::string id, eKeyMod mods){
|
||||
if(recording){
|
||||
std::stringstream sstr;
|
||||
sstr << mods;
|
||||
std::map<std::string, std::string> action_info = {{"id", id}, {"mods", sstr.str()}};
|
||||
record_action("control_click", action_info);
|
||||
}
|
||||
triggerEvent<EVT_CLICK>(dlg, id, mods);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user