aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Button.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 20:39:40 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 20:39:40 +0100
commite055b5c972d248820e844a6353d63a26ccc1e1f3 (patch)
treeaca13e01908129d4998ca90119b501ab87f14dbc /src/crepe/api/Button.h
parent50bf1a39668075f206b247cc091a1c542f49a01e (diff)
added max buttons
Diffstat (limited to 'src/crepe/api/Button.h')
-rw-r--r--src/crepe/api/Button.h8
1 files changed, 8 insertions, 0 deletions
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