Dear ImGui Nim library that draws some nice-looking notifications. (Based upon patrickcjk/imgui-notify)
nimble install imnotify
Note: Please consider using system notifications instead, for example using tinydialogs.
var toaster = initToaster(spacing = 10f) # Spacing between toasts
toaster.addInfo("I'm a notification full of useful information", title = "Hello")
# Inside Dear ImGui main loop
...
toaster.draw()Read the docs for more.
kind: success, error, warning, info or none. It is used to show an icon using ForkAwesome, therefore you need to load an icon font, check out demo.nim.dismissTime: Dismiss toast afternmilliseconds. Pass a negative number to disable automatic dismiss.fadeInOutTime: Fade in out animation duration in milliseconds.padding: Toast padding.opacity: Toast default opacity.rounding: Toast rounding.width: Toast width.separator: Draw a separator between the title and content.rightMargin: Distance between the toast and viewport's right side.closeBtn: Draw a close button.
Note: to modify a toast colors use Header and HeaderHovered before toaster.draw().
For an interactive demo see demo/.
You have to have nimgl and imnotify installed.
git clone https://github.com/Patitotective/ImNotify
cd ImNotify/demo
nim c -r demo
ImNotify.mp4
- GitHub: https://github.com/Patitotective/ImNotify.
- Discord: https://discord.gg/gdcPVjazCG.
- Icon Font: https://forkaweso.me (MIT).
Contact me:
- Discord: Patitotective#0127.
- Twitter: @patitotective.
- Email: cristobalriaga@gmail.com.