# Popout
_Small popup library_
## Introduction
This is a small library designed to do one thing: create modal popup windows.
It was designed to be used for applications that have no persistant UI, but
occasionally need to display a popup box to the user.
This crate is powered by [egui] and uses a custom backend built on wgpu and
winit (based on [this](https://github.com/kaphula/winit-egui-wgpu-template)).
## Examples
Check out the examples folder for more, but for a basic hello world:
```no_run
use popout::{Dialog, LogicalSize};
fn main() {
Dialog::new()
.with_line("Hello, World")
.with_button("Close")
.with_size(LogicalSize::new(100, 50))
.show()
.unwrap();
}
```
This will display a dialog box to the user that contains the text "Hello, World" with a "Close" button beneath it.
It is modal, so execution of `main` will stop on `show` until the window is closed.
## Compatibility
This library is NOT designed to be used when you have another UI library
already in use. The winit event loop can only be created ONCE and this library
WILL create it on usage of any of its features. It is not intended that this
library be used alongside any other UI libraries, if you have a persistant UI
already then use that library's built-in popup support instead.
[egui]: https://github.com/emilk/egui