No description
Find a file
2022-09-24 11:23:55 -05:00
.github/workflows - Added readme 2022-08-06 14:09:26 -05:00
demo Fixed toast colors stuff 2022-08-15 22:39:22 -05:00
src Fixed toast colors stuff 2022-08-15 22:39:22 -05:00
.gitignore Organized directories structure a bit 2022-08-03 21:19:26 -05:00
imnotify.nimble Fixed docs task 2022-08-06 14:12:37 -05:00
LICENSE Initial commit 2022-08-02 21:59:55 -05:00
README.md - Updated discord invite link 2022-09-24 11:23:55 -05:00

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 after n milliseconds. 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

https://user-images.githubusercontent.com/79225325/184793063-42c0a056-5ab4-4e9f-955c-ffc40ef1133d.mp4

About

Contact me: