From 10ce9f45b9551dc103272c2b2374db1c1e3b8bcb Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 21 Oct 2024 17:54:56 +0200 Subject: add ControlBooleanCommand --- ControlBooleanCommand.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ControlBooleanCommand.h (limited to 'ControlBooleanCommand.h') diff --git a/ControlBooleanCommand.h b/ControlBooleanCommand.h new file mode 100644 index 0000000..2067e37 --- /dev/null +++ b/ControlBooleanCommand.h @@ -0,0 +1,18 @@ +#pragma once + +#include "Command.h" + +class ControlBooleanCommand : public Command { +public: + ControlBooleanCommand(bool & target); + ControlBooleanCommand(bool & target, bool set); + +public: + virtual void execute(); + +private: + bool toggle = true; + bool value; + bool & target; +}; + -- cgit v1.2.3