Make basic iced window
This commit is contained in:
parent
8d511bb894
commit
f5e12466ac
31
src/main.rs
31
src/main.rs
|
@ -1,3 +1,30 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
use iced::{widget::text, Element, Result, Sandbox, Settings};
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Message {}
|
||||
|
||||
struct Application;
|
||||
|
||||
impl Sandbox for Application {
|
||||
type Message = Message;
|
||||
|
||||
fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
|
||||
fn title(&self) -> String {
|
||||
String::from("Thief Book Manager")
|
||||
}
|
||||
|
||||
fn update(&mut self, message: Message) {
|
||||
match message {}
|
||||
}
|
||||
|
||||
fn view(&self) -> Element<'_, Message> {
|
||||
text("Hello, world!").into()
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result {
|
||||
Application::run(Settings::default())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue