Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
ImNotify.mp4

About

Contact me:

About

Dear ImGui notifications Nim library.

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages