Added MultiAction, ChangeValueDisplay<wifi_auth_type_t>, TextWithValueHelper

This commit is contained in:
2021-12-29 20:29:12 +01:00
parent 87b2d2b42a
commit a29efa4e47
7 changed files with 162 additions and 9 deletions
+2 -8
View File
@@ -2,11 +2,10 @@
// system includes
#include <string>
// 3rdparty lib includes
#include <fmt/core.h>
#include <utility>
namespace espgui {
class TextInterface {
public:
virtual std::string text() const = 0;
@@ -73,9 +72,4 @@ public:
}
};
template<const char *Tprefix, typename Taccessor>
struct TextWithValueHelper : public virtual TextInterface
{
std::string text() const override { return fmt::format("{} {}", Tprefix, Taccessor{}.getValue()); }
};
} // namespace espgui