From e055b5c972d248820e844a6353d63a26ccc1e1f3 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Tue, 17 Dec 2024 20:39:40 +0100 Subject: added max buttons --- src/crepe/api/Button.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/crepe/api/Button.h') diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h index b5ef605..0f446c9 100644 --- a/src/crepe/api/Button.h +++ b/src/crepe/api/Button.h @@ -29,6 +29,14 @@ public: * \param offset The offset relative this GameObjects Transform */ Button(game_object_id_t id, const vec2 & dimensions, const vec2 & offset); + /** + * \brief Get the maximum number of instances for this component + * + * Since the button Event transfers the GameObject Metadata it will be the same for each button so only one button is allowed per GameObject + * + * \return The maximum number of instances for this component + */ + virtual int get_instances_max() const { return 1; } private: //! friend relation hover variable -- cgit v1.2.3