diff options
Diffstat (limited to 'src/puzzles/puzzle.h')
| -rw-r--r-- | src/puzzles/puzzle.h | 4 |
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); |
