38 template <std::derived_from<Command> Command1,
39 std::derived_from<Command> Command2>
41 std::function<
bool()> condition)
43 std::forward<Command1>(onTrue)),
45 std::forward<Command2>(onFalse)),
56 std::unique_ptr<Command>&& onFalse,
57 std::function<
bool()> condition);
68 void End(
bool interrupted)
override;
79 std::unique_ptr<Command> m_onTrue;
80 std::unique_ptr<Command> m_onFalse;
81 std::function<bool()> m_condition;
82 Command* m_selectedCommand{
nullptr};
83 bool m_runsWhenDisabled =
true;
ConditionalCommand(Command1 &&onTrue, Command2 &&onFalse, std::function< bool()> condition)
Creates a new ConditionalCommand.
Definition ConditionalCommand.h:40
typename std::decay< T >::type decay_t
Definition base.h:311