change behavior of autowrite: only write re-write on rising edge
This commit is contained in:
parent
aa982d3798
commit
0aca8969f9
|
@ -110,8 +110,11 @@ void LolAutoAccept::setOnRuneChangeFunc(onruneschange_func on) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LolAutoAccept::setAutoWriteText(bool enabled, const std::string& text) {
|
void LolAutoAccept::setAutoWriteText(bool enabled, const std::string& text) {
|
||||||
|
if ( enabled && !autoWriteTextEnabled ) {
|
||||||
|
// only re-write on rising edge
|
||||||
|
autoWriteTextDone = false;
|
||||||
|
}
|
||||||
autoWriteTextEnabled = enabled;
|
autoWriteTextEnabled = enabled;
|
||||||
autoWriteTextDone = false;
|
|
||||||
autoWriteText = text;
|
autoWriteText = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue