summaryrefslogtreecommitdiff
path: root/src/puzzles/puzzle.h
diff options
context:
space:
mode:
authorPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-09-03 19:11:39 +0500
committerPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-09-03 19:11:39 +0500
commitc88bb49416aaeb13c3969727a305bc7ed3263963 (patch)
tree997c136ee0cfc0a5ba6c153c78ab268d0195ac4a /src/puzzles/puzzle.h
parentaaefc10681cc2bcb30268c67de1a4784e0ca891f (diff)
more transitions
Diffstat (limited to 'src/puzzles/puzzle.h')
-rw-r--r--src/puzzles/puzzle.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/puzzles/puzzle.h b/src/puzzles/puzzle.h
index 5af6d6e..b269282 100644
--- a/src/puzzles/puzzle.h
+++ b/src/puzzles/puzzle.h
@@ -116,6 +116,8 @@ typedef struct CollectionElement {
size_t childCount;
/// OnClick callback
void (*callback)(struct CollectionElement *);
+ /// The data that will be passed with the callback
+ void *callbackData;
/// If the element is initialized it has children and an icon loaded into mem
bool IsInitialized;
/// The element has an icon
@@ -127,7 +129,7 @@ typedef struct CollectionElement {
/// Accepts an element which children will be created and a generic callback that
/// will be called when the collection enement is selected.
/// The element passes a selected element as a callback argummment
-void InitializeCollection(CollectionElement *el, void (*callback)(CollectionElement *));
+void InitializeCollection(CollectionElement *el, void (*callback)(CollectionElement *), void *callbackData);
void DrawCollectionElement(CollectionElement *el, CollectionElement *parent, Rectangle rec);
void UpdateCollectionElement(CollectionElement *el);
void DeinitCollectionElement(CollectionElement *el);