Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Updated to egui 0.26.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrueger committed Feb 9, 2024
1 parent cbcec5e commit 3e4d6f6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ license = "Apache-2.0"
repository = "https://github.com/mkrueger/icy_term"

[dependencies]
egui = "0.25.0"
eframe = { version = "0.25.0", default-features = false, features = [
egui = "0.26.0"
eframe = { version = "0.26.0", default-features = false, features = [
"accesskit", # Make egui comptaible with screen readers. NOTE: adds a lot of dependencies.
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
] }
egui_extras = { version="0.25.0", features = ["all_loaders"] }
egui_glow = "0.25.0"
egui-modal = "0.3.1"
egui-bind = "0.10.0"
egui_file = "0.14.0"
egui_extras = { version="0.26.0", features = ["all_loaders"] }
egui_glow = "0.26.0"
egui-modal = "0.3.3"
egui-bind = "0.11.0"
egui_file = "0.15.0"
glow = "0.13.0"
dark-light = "1.0.0"
serde = "1.0.185"
Expand Down
10 changes: 7 additions & 3 deletions src/ui/terminal_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,12 @@ impl MainWindow {
use_terminal_height: true,
..Default::default()
};
let (response, calc) = icy_engine_egui::show_terminal_area(ui, self.buffer_view.clone(), opt);
let mut response = response.context_menu(|ui| terminal_context_menu(ui, self));
let (mut response, calc) = icy_engine_egui::show_terminal_area(ui, self.buffer_view.clone(), opt);
let inner_response = response.context_menu(|ui| terminal_context_menu(ui, self));
if let Some(inner_response) = inner_response {
response = inner_response.response;
}

if matches!(self.get_mode(), MainWindowMode::ShowTerminal) && ui.is_enabled() && !self.show_find_dialog {
let events = ui.input(|i| i.events.clone());
for e in events {
Expand All @@ -261,7 +265,6 @@ impl MainWindow {
for c in text.chars() {
self.output_char(c);
}
response.mark_changed();
}

egui::Event::PointerButton {
Expand Down Expand Up @@ -404,6 +407,7 @@ impl MainWindow {
}
}
response.request_focus();

ui.input_mut(|i| i.consume_key(modifiers, key));
break;
}
Expand Down

0 comments on commit 3e4d6f6

Please sign in to comment.