Feat: no console in bg and plugin fix
Some checks failed
Deploy Website / deploy (push) Failing after 27s

This commit is contained in:
2026-02-26 12:42:22 +01:00
parent b728b38d6e
commit 5b3252cc31
3 changed files with 11 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ use cagire::model::{Dictionary, Rng, Variables};
use cagire::theme;
use cagire::views;
use cagire::input_egui::{convert_egui_events, convert_egui_mouse};
use cagire::input_egui::{convert_egui_events, convert_egui_mouse, EguiMouseState};
use crate::params::CagireParams;
use crate::PluginBridge;
@@ -141,6 +141,7 @@ struct EditorState {
last_frame: Instant,
current_font: FontChoice,
zoom_factor: f32,
egui_mouse: EguiMouseState,
}
// SAFETY: EditorState is only accessed from the GUI thread via RwLock.
@@ -210,6 +211,7 @@ pub fn create_editor(
last_frame: Instant::now(),
current_font: FontChoice::Size8x13,
zoom_factor: 1.0,
egui_mouse: EguiMouseState::default(),
}
});
@@ -248,7 +250,7 @@ pub fn create_editor(
let term = editor.terminal.get_frame().area();
let widget_rect = ctx.content_rect();
for mouse in convert_egui_mouse(ctx, widget_rect, term) {
for mouse in convert_egui_mouse(ctx, widget_rect, term, &mut editor.egui_mouse) {
let mut input_ctx = InputContext {
app: &mut editor.app,
link: &editor.link,

View File

@@ -328,6 +328,11 @@ impl Plugin for CagirePlugin {
AudioCommand::LoadSamples(samples) => {
engine.sample_index.extend(samples);
}
AudioCommand::LoadSoundfont(path) => {
if let Err(e) = engine.load_soundfont(&path) {
eprintln!("Failed to load soundfont: {e}");
}
}
}
}

View File

@@ -1,3 +1,5 @@
#![windows_subsystem = "windows"]
use std::sync::atomic::{AtomicBool, AtomicI64, AtomicU32, AtomicU64, Ordering};
use std::sync::Arc;
use std::time::Duration;