Skip to content

Commit

Permalink
begin using iced-multi-window
Browse files Browse the repository at this point in the history
  • Loading branch information
justDeeevin committed Apr 10, 2024
1 parent daca27f commit ac845c6
Show file tree
Hide file tree
Showing 4 changed files with 289 additions and 219 deletions.
53 changes: 35 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ reqwest = { version = "0.11.24", features = ["blocking"] }
display-info = "0.4.8"
geo = "0.28.0"
zip = "0.6.6"
iced-multi-window = { path = "../iced-multi-window" }

[target.'cfg(windows)'.dependencies]
mslnk = "0.1.8"
Expand Down
12 changes: 7 additions & 5 deletions src/nuhxboard.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::{
logic::{code_convert::*, listener},
types::{config::*, settings::*, style::*}, ui::app::DisplayChoice,
types::{config::*, settings::*, style::*},
ui::app::*
};
use async_std::task::sleep;
use display_info::DisplayInfo;
Expand All @@ -14,6 +15,7 @@ use std::{
fs::{self, File},
time::Instant,
};
use iced_multi_window::Draw;

pub struct NuhxBoard {
pub config: Config,
Expand Down Expand Up @@ -788,13 +790,13 @@ impl Application for NuhxBoard {
} else if self.error_windows.contains_key(&window) {
self.draw_error_window(&window)
} else if Some(window) == self.settings_window_id {
self.draw_settings_window()
settings::draw(self)
} else if Some(window) == self.keyboard_properties_window_id {
self.draw_keyboard_properties_window()
keyboard_properties::draw(self)
} else if Some(window) == self.save_keyboard_as_window_id {
self.draw_save_keyboard_as_window()
save_keyboard_as::draw(self)
} else if Some(window) == self.save_style_as_window_id {
self.draw_save_style_as_window()
save_style_as::draw(self)
} else {
unreachable!()
}
Expand Down
Loading

0 comments on commit ac845c6

Please sign in to comment.