$darkmode
Temporary on-screen notification system for user actions. More...
#include "ui.h"Go to the source code of this file.
Data Structures | |
| struct | ActionNotification |
| Represents a single active notification. More... | |
| struct | ActionNotifier |
| Manager for action notifications. More... | |
Macros | |
| #define | MAX_ACTION_NOTIFICATIONS 5 |
| Maximum number of concurrent notifications. More... | |
| #define | MAX_ACTION_TEXT_LENGTH 128 |
| Maximum length of a notification message. More... | |
| #define | NOTIF_DUR_SHORT 1.0F |
| Short notification duration (seconds). More... | |
| #define | NOTIF_DUR_NORMAL 1.5F |
| Normal notification duration (seconds). More... | |
| #define | NOTIF_DUR_LONG 2.0F |
| Long notification duration (seconds). More... | |
Functions | |
| void | action_notifier_init (ActionNotifier *notifier) |
| Initializes the notifier. More... | |
| void | action_notifier_push (ActionNotifier *notifier, const char *text, float duration) |
| Adds a new notification message. More... | |
| void | action_notifier_update (ActionNotifier *notifier, float delta_time) |
| Updates notification timers. More... | |
| void | action_notifier_draw (ActionNotifier *notifier, UIContext *ui_ctx, int screen_width, int screen_height) |
| Renders active notifications to the screen. More... | |
Temporary on-screen notification system for user actions.
| #define MAX_ACTION_NOTIFICATIONS 5 |
Maximum number of concurrent notifications.
| #define MAX_ACTION_TEXT_LENGTH 128 |
Maximum length of a notification message.
| #define NOTIF_DUR_LONG 2.0F |
Long notification duration (seconds).
| #define NOTIF_DUR_NORMAL 1.5F |
Normal notification duration (seconds).
| #define NOTIF_DUR_SHORT 1.0F |
Short notification duration (seconds).
| void action_notifier_draw | ( | ActionNotifier * | notifier, |
| UIContext * | ui_ctx, | ||
| int | screen_width, | ||
| int | screen_height | ||
| ) |
Renders active notifications to the screen.
| notifier | Pointer to the notifier. |
| ui_ctx | UIContext to use for drawing. |
| screen_width | Current window width. |
| screen_height | Current window height. |
| void action_notifier_init | ( | ActionNotifier * | notifier | ) |
Initializes the notifier.
| notifier | Pointer to the notifier struct. |
| void action_notifier_push | ( | ActionNotifier * | notifier, |
| const char * | text, | ||
| float | duration | ||
| ) |
Adds a new notification message.
| notifier | Pointer to the notifier. |
| text | The message to display. |
| duration | Duration in seconds. |
| void action_notifier_update | ( | ActionNotifier * | notifier, |
| float | delta_time | ||
| ) |
Updates notification timers.
| notifier | Pointer to the notifier. |
| delta_time | Delta time since last update (seconds). |