diff options
Diffstat (limited to 'attr/ondraw.hpp')
-rw-r--r-- | attr/ondraw.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/attr/ondraw.hpp b/attr/ondraw.hpp new file mode 100644 index 0000000..d0932ef --- /dev/null +++ b/attr/ondraw.hpp @@ -0,0 +1,21 @@ +#ifndef MBUOY_ATTR_ONDRAW_HPP +#define MBUOY_ATTR_ONDRAW_HPP + +#include "position.hpp" +#include "dimensions.hpp" + +namespace mbuoy { + +struct ondraw +{ + void (*func)(const position&, const dimensions&); + + void operator()(const position& pos, const dimensions& dim) const noexcept { + func(pos, dim); + } +}; + +} // namespace mbuoy + +#endif // MBUOY_ATTR_ONDRAW_HPP + |