added multiselect to the client's library

This commit is contained in:
Mark
2023-10-04 16:16:05 +02:00
parent 9c340aa913
commit 6bab2bc075
5 changed files with 614 additions and 160 deletions

View File

@@ -436,6 +436,7 @@ pub enum Dragging {
Album(AlbumId),
Song(SongId),
Queue(Queue),
Queues(Vec<Queue>),
}
/// GuiElems have access to this within draw.
@@ -733,7 +734,7 @@ pub fn adjust_pos(outer: &Rectangle, rel_pos: &Vec2) -> Vec2 {
}
impl Gui {
fn exec_gui_action(&mut self, action: GuiAction) {
pub fn exec_gui_action(&mut self, action: GuiAction) {
match action {
GuiAction::Build(f) => {
let actions = f(&mut *self.database.lock().unwrap());
@@ -891,6 +892,11 @@ impl WindowHandler<GuiEvent> for Gui {
25.0,
Color::from_int_rgba(100, 0, 255, 100),
),
Dragging::Queues(_) => graphics.draw_circle(
self.mouse_pos,
25.0,
Color::from_int_rgba(100, 0, 255, 100),
),
}
}
}