Improve hand mode panels and recording
This commit is contained in:
25
src/app.rs
25
src/app.rs
@@ -230,9 +230,6 @@ impl EskinDesktopApp {
|
||||
self.latest_matrix_rows = sample.rows;
|
||||
self.latest_matrix_cols = sample.cols;
|
||||
|
||||
// Feed data to recorder
|
||||
self.recorder.add_frame(&sample.matrix);
|
||||
|
||||
self.latest_spatial_force = self.force_estimator.analyze(&sample.matrix);
|
||||
|
||||
// Keep JE-Skin's summary path separate from the optional spatial-force vector.
|
||||
@@ -367,11 +364,18 @@ impl EskinDesktopApp {
|
||||
|
||||
fn draw_floating_panels(&mut self, ctx: &egui::Context) {
|
||||
// draw_scene_panel(ctx, &mut self.scene_panel);
|
||||
if self.config_state.mode == SerialMode::Hand && self.stats_panel.visible {
|
||||
self.config_panel.visible = false;
|
||||
self.export_panel.visible = false;
|
||||
self.matrix_config_panel.visible = false;
|
||||
}
|
||||
|
||||
if let Some(next_mode) = draw_config_panel(
|
||||
ctx,
|
||||
&mut self.config_panel,
|
||||
&mut self.config_state,
|
||||
&self.connection,
|
||||
&self.recorder,
|
||||
) {
|
||||
self.switch_mode(next_mode);
|
||||
}
|
||||
@@ -430,7 +434,20 @@ impl EskinDesktopApp {
|
||||
panel_restore_item(ui, "配置", &mut self.config_panel);
|
||||
panel_restore_item(ui, "录制", &mut self.export_panel);
|
||||
panel_restore_item(ui, "矩阵", &mut self.matrix_config_panel);
|
||||
panel_restore_item(ui, "统计", &mut self.stats_panel);
|
||||
if self.stats_panel.visible {
|
||||
if ui
|
||||
.add_sized(
|
||||
egui::vec2(ui.available_width(), 0.0),
|
||||
egui::Button::new("隐藏 统计"),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
self.stats_panel.visible = false;
|
||||
close_menu = true;
|
||||
}
|
||||
} else {
|
||||
panel_restore_item(ui, "统计", &mut self.stats_panel);
|
||||
}
|
||||
if ui
|
||||
.add_sized(
|
||||
egui::vec2(ui.available_width(), 0.0),
|
||||
|
||||
Reference in New Issue
Block a user