ui_toast.h 586 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. *** :: UI Toast ::
  3. ***
  4. *** UI Notification
  5. ***
  6. **/
  7. #ifndef ui_toast_h
  8. #define ui_toast_h
  9. #include "cengine.h"
  10. #include "ui/ui_text.h"
  11. #include "ui/ui_rectangle.h"
  12. typedef struct {
  13. ui_text* label;
  14. float opacity;
  15. bool active;
  16. } ui_toast;
  17. void ui_toast_popup(char* fmt, ...);
  18. ui_toast* ui_toast_new();
  19. void ui_toast_delete(ui_toast* t);
  20. void ui_toast_set_label(ui_toast* t, char* label);
  21. void ui_toast_set_font(ui_toast* t, asset_hndl f);
  22. void ui_toast_event(ui_toast* t, SDL_Event e);
  23. void ui_toast_update(ui_toast* t);
  24. void ui_toast_render(ui_toast* t);
  25. #endif