Skip to content

Commit

Permalink
just need to do hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Stehfyn committed Sep 13, 2023
1 parent 793f474 commit 3fc0764
Show file tree
Hide file tree
Showing 6 changed files with 380 additions and 85 deletions.
53 changes: 53 additions & 0 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 @@ -26,6 +26,7 @@ serde = { version = "1", features = ["derive"] }
rfd = "0.11"
ehttp = "0.3.0"
rand = "0.8.5"
chrono = "0.4.30"


# native:
Expand Down
9 changes: 7 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl eframe::App for TemplateApp {

ui.scope(|ui| {
#[allow(unused_mut)]
let mut disable_settings_button = false;
let mut disable_settings_button = self.puzzle_panel.is_playing();
#[cfg(target_arch = "wasm32")]
if isIOS() || isMobile() {
if self.about_panel.open || self.gallery_panel.open {
Expand Down Expand Up @@ -319,7 +319,10 @@ impl TemplateApp {
}

fn settings_panel(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) -> Command {
let is_open = self.settings_panel.open || ctx.memory(|mem| mem.everything_is_visible());
let mut is_open = self.settings_panel.open || ctx.memory(|mem| mem.everything_is_visible());
if self.puzzle_panel.is_playing() {
is_open = false;
}
let mut cmd = Command::Nothing;
egui::TopBottomPanel::bottom("settings_panel")
.exact_height(self.settings_panel.calc_panel_ui_height())
Expand Down Expand Up @@ -420,6 +423,8 @@ impl TemplateApp {
.set_gallery_retained_image_count(self.gallery_panel.get_retained_image_count());
self.settings_panel
.set_selected_image_src(self.gallery_panel.get_selected_image_src());
self.puzzle_panel
.set_game_mode(self.settings_panel.get_game_mode());
}

fn calc_top_panel_button_rects(&mut self, ui: &egui::Ui) {
Expand Down
Loading

0 comments on commit 3fc0764

Please sign in to comment.