use folder manager for load, save and sound

This commit is contained in:
2025-08-19 17:45:42 +02:00
parent b258d86e47
commit e2902f91e3
9 changed files with 743 additions and 161 deletions

View File

@@ -3,16 +3,16 @@ use crate::polygon_draw::*;
use crate::utils::string_to_polygon;
use serde::{Deserialize, Serialize};
use kira::{sound::static_sound::StaticSoundData, AudioManager};
use kira::{AudioManager, sound::static_sound::StaticSoundData};
use iced::event::Status;
use iced::mouse::Cursor;
use iced::widget::canvas::{Event, Geometry};
use iced::{keyboard, Vector};
use iced::{
mouse::{self, ScrollDelta},
Size,
mouse::{self, ScrollDelta},
};
use iced::{Vector, keyboard};
use iced::widget::canvas;
use iced::widget::canvas::Stroke;
@@ -83,9 +83,9 @@ impl Music {
}
}
pub fn update_frame(&mut self) {
pub fn update_frame(&mut self, path_of_project: &str) {
for (_, p) in &mut self.poly_frame {
p.update();
p.update(path_of_project);
}
}
@@ -174,8 +174,8 @@ impl Music {
pub fn add_polygon(&mut self, delta: f32, polygon_name: String) {
let current_frame = self.find_poly_frame(delta);
let mut poly = string_to_polygon(polygon_name);
poly.update();
let poly = string_to_polygon(polygon_name);
//poly.update();
current_frame.polygons.push(poly);
}