mirror of
https://github.com/Patitotective/ImNotify
synced 2026-01-15 05:01:42 +00:00
No description
| .github/workflows | ||
| demo | ||
| src | ||
| .gitignore | ||
| imnotify.nimble | ||
| LICENSE | ||
| README.md | ||
ImNotify
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.
Basic
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.
Toast Properties
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().
Demo
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
About
- 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.