use folder manager for load, save and sound
This commit is contained in:
14
src/music.rs
14
src/music.rs
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user