init mod menu + bem class + button presets

This commit is contained in:
thecozies
2024-09-13 10:13:52 -05:00
committed by Mr-Wiseguy
parent b67da848f3
commit a05ac15dcd
16 changed files with 264 additions and 9 deletions
+33
View File
@@ -0,0 +1,33 @@
#ifndef RECOMPUI_ELEMENTS_BEM
#define RECOMPUI_ELEMENTS_BEM
#include <string>
namespace recompui {
// BEM base class
class BEM {
public:
std::string block;
BEM(const std::string &block) : block(block) {}
virtual ~BEM() = default;
const std::string get_block() const {
return block;
}
const std::string el(const std::string &element) const {
return block + "__" + element;
}
const BEM bem_el(const std::string &element) const {
return BEM(el(element));
}
const std::string mod(const std::string &modifier) const {
return block + "--" + modifier;
}
};
} // namespace recompui
#endif