Feat: make some stuff optional for the CLAP/VST version
This commit is contained in:
@@ -10,7 +10,7 @@ description = "Cagire as a CLAP/VST3 audio plugin"
|
||||
crate-type = ["cdylib", "lib"]
|
||||
|
||||
[dependencies]
|
||||
cagire = { path = "../.." }
|
||||
cagire = { path = "../..", features = ["block-renderer"] }
|
||||
cagire-forth = { path = "../../crates/forth" }
|
||||
cagire-project = { path = "../../crates/project" }
|
||||
cagire-ratatui = { path = "../../crates/ratatui" }
|
||||
|
||||
@@ -17,6 +17,7 @@ use soft_ratatui::embedded_graphics_unicodefonts::{
|
||||
};
|
||||
use soft_ratatui::{EmbeddedGraphics, SoftBackend};
|
||||
|
||||
use cagire::block_renderer::BlockCharBackend;
|
||||
use cagire::app::App;
|
||||
use cagire::engine::{AudioCommand, LinkState, SequencerSnapshot};
|
||||
use cagire::input::{handle_key, handle_mouse, InputContext};
|
||||
@@ -28,7 +29,7 @@ use crate::input_egui::{convert_egui_events, convert_egui_mouse};
|
||||
use crate::params::CagireParams;
|
||||
use crate::PluginBridge;
|
||||
|
||||
type TerminalType = Terminal<RataguiBackend<EmbeddedGraphics>>;
|
||||
type TerminalType = Terminal<RataguiBackend<BlockCharBackend>>;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
enum FontChoice {
|
||||
@@ -106,7 +107,22 @@ fn create_terminal(font: FontChoice) -> TerminalType {
|
||||
FontChoice::Size10x20 => (mono_10x20_atlas(), None, None),
|
||||
};
|
||||
|
||||
let soft = SoftBackend::<EmbeddedGraphics>::new(80, 24, regular, bold, italic);
|
||||
let eg = SoftBackend::<EmbeddedGraphics>::new(80, 24, regular, bold, italic);
|
||||
let soft = SoftBackend {
|
||||
buffer: eg.buffer,
|
||||
cursor: eg.cursor,
|
||||
cursor_pos: eg.cursor_pos,
|
||||
char_width: eg.char_width,
|
||||
char_height: eg.char_height,
|
||||
blink_counter: eg.blink_counter,
|
||||
blinking_fast: eg.blinking_fast,
|
||||
blinking_slow: eg.blinking_slow,
|
||||
rgb_pixmap: eg.rgb_pixmap,
|
||||
always_redraw_list: eg.always_redraw_list,
|
||||
raster_backend: BlockCharBackend {
|
||||
inner: eg.raster_backend,
|
||||
},
|
||||
};
|
||||
Terminal::new(RataguiBackend::new("cagire", soft)).expect("terminal")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user