Skip to content

Commit

Permalink
fix: area not beeing interactable (#7)
Browse files Browse the repository at this point in the history
* Fix area not beeing interactable

* Allocate click response

* Update changelog
  • Loading branch information
fluxxcode authored Dec 2, 2024
1 parent f6140c9 commit c3931d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# egui-modal-spinner changelog

## 2024-12-02

### 🐛 Bug Fixes
- Fixed issue with widgets being interactable behind the modal background [#7](https://github.com/fluxxcode/egui-modal-spinner/pull/7)
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ impl ModalSpinner {

let re = egui::Area::new(id)
.movable(false)
.interactable(true)
.fixed_pos(screen_rect.left_top())
.fade_in(self.fade_in)
.show(ctx, |ui| {
Expand All @@ -279,6 +280,8 @@ impl ModalSpinner {
ui.painter()
.rect_filled(screen_rect, egui::Rounding::ZERO, fill_color);

ui.allocate_response(screen_rect.size(), egui::Sense::click());

let child_ui = egui::UiBuilder::new()
.max_rect(screen_rect)
.layout(egui::Layout::top_down(egui::Align::Center));
Expand Down

0 comments on commit c3931d8

Please sign in to comment.