Implement window::close action and remove should_exit
This commit is contained in:
parent
0591798db7
commit
b5ab50b2a8
5 changed files with 21 additions and 15 deletions
|
|
@ -4,6 +4,11 @@ use iced_native::window;
|
|||
|
||||
pub use window::{Event, Mode};
|
||||
|
||||
/// Closes the current window and exits the application.
|
||||
pub fn close<Message>() -> Command<Message> {
|
||||
Command::single(command::Action::Window(window::Action::Close))
|
||||
}
|
||||
|
||||
/// Begins dragging the window while the left mouse button is held.
|
||||
pub fn drag<Message>() -> Command<Message> {
|
||||
Command::single(command::Action::Window(window::Action::Drag))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue