From 1cc6e51838fcd5fc986dbb3e13bbb85f11a348be Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 24 Jan 2022 17:52:47 +0800 Subject: ... --- include/cru/ui/style/Condition.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/cru/ui/style') diff --git a/include/cru/ui/style/Condition.hpp b/include/cru/ui/style/Condition.hpp index d5cf16f2..89da81f6 100644 --- a/include/cru/ui/style/Condition.hpp +++ b/include/cru/ui/style/Condition.hpp @@ -48,6 +48,11 @@ class CompoundCondition : public Condition { class AndCondition : public CompoundCondition { public: + static ClonablePtr Create( + std::vector> conditions) { + return ClonablePtr(new AndCondition(std::move(conditions))); + } + using CompoundCondition::CompoundCondition; bool Judge(controls::Control* control) const override; @@ -57,6 +62,11 @@ class AndCondition : public CompoundCondition { class OrCondition : public CompoundCondition { public: + static ClonablePtr Create( + std::vector> conditions) { + return ClonablePtr(new OrCondition(std::move(conditions))); + } + using CompoundCondition::CompoundCondition; bool Judge(controls::Control* control) const override; -- cgit v1.2.3