mirror of
https://github.com/Dummi26/musicdb.git
synced 2026-08-01 13:30:13 +02:00
chore(client): update speedy2d and toml dependency
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,2 @@
|
|||||||
*/Cargo.lock
|
|
||||||
*/target
|
*/target
|
||||||
TODO.txt
|
TODO.txt
|
||||||
|
|||||||
1378
musicdb-client/Cargo.lock
generated
1378
musicdb-client/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -10,8 +10,8 @@ musicdb-lib = { path = "../musicdb-lib", default-features = false }
|
|||||||
clap = { version = "4.6.5", features = ["derive"] }
|
clap = { version = "4.6.5", features = ["derive"] }
|
||||||
directories = "6.0.0"
|
directories = "6.0.0"
|
||||||
regex = "1.13.1"
|
regex = "1.13.1"
|
||||||
speedy2d = { version = "2.1.0", optional = true }
|
speedy2d = { version = "3.1.0", optional = true }
|
||||||
toml = "0.9.5"
|
toml = "1.1.4"
|
||||||
# musicdb-mers = { version = "0.1.0", path = "../musicdb-mers", optional = true }
|
# musicdb-mers = { version = "0.1.0", path = "../musicdb-mers", optional = true }
|
||||||
uianimator = "0.1.1"
|
uianimator = "0.1.1"
|
||||||
|
|
||||||
|
|||||||
@@ -3,22 +3,23 @@ use std::{
|
|||||||
collections::{BTreeMap, HashMap},
|
collections::{BTreeMap, HashMap},
|
||||||
io::Cursor,
|
io::Cursor,
|
||||||
net::TcpStream,
|
net::TcpStream,
|
||||||
sync::{mpsc::Sender, Arc, Mutex},
|
sync::{Arc, Mutex, mpsc::Sender},
|
||||||
thread::JoinHandle,
|
thread::JoinHandle,
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
use musicdb_lib::{
|
use musicdb_lib::{
|
||||||
data::{
|
data::{
|
||||||
|
AlbumId, ArtistId, CoverId, SongId,
|
||||||
database::{ClientIo, Database},
|
database::{ClientIo, Database},
|
||||||
queue::Queue,
|
queue::Queue,
|
||||||
song::Song,
|
song::Song,
|
||||||
AlbumId, ArtistId, CoverId, SongId,
|
|
||||||
},
|
},
|
||||||
load::ToFromBytes,
|
load::ToFromBytes,
|
||||||
server::{get, Action},
|
server::{Action, get},
|
||||||
};
|
};
|
||||||
use speedy2d::{
|
use speedy2d::{
|
||||||
|
Graphics2D,
|
||||||
color::Color,
|
color::Color,
|
||||||
dimen::{UVec2, Vec2},
|
dimen::{UVec2, Vec2},
|
||||||
font::Font,
|
font::Font,
|
||||||
@@ -28,7 +29,6 @@ use speedy2d::{
|
|||||||
KeyScancode, ModifiersState, MouseButton, MouseScrollDistance, UserEventSender,
|
KeyScancode, ModifiersState, MouseButton, MouseScrollDistance, UserEventSender,
|
||||||
VirtualKeyCode, WindowCreationOptions, WindowHandler, WindowHelper,
|
VirtualKeyCode, WindowCreationOptions, WindowHandler, WindowHelper,
|
||||||
},
|
},
|
||||||
Graphics2D,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "merscfg")]
|
#[cfg(feature = "merscfg")]
|
||||||
@@ -775,7 +775,7 @@ pub(crate) trait GuiElemInternal: GuiElem {
|
|||||||
v.config_mut().mouse_down.2 = true;
|
v.config_mut().mouse_down.2 = true;
|
||||||
v.config_mut().mouse_pressed.2 = true;
|
v.config_mut().mouse_pressed.2 = true;
|
||||||
}
|
}
|
||||||
MouseButton::Other(_) => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
Some(v.mouse_down(e, button))
|
Some(v.mouse_down(e, button))
|
||||||
} else {
|
} else {
|
||||||
@@ -820,7 +820,7 @@ pub(crate) trait GuiElemInternal: GuiElem {
|
|||||||
v.config_mut().mouse_down.2 = false;
|
v.config_mut().mouse_down.2 = false;
|
||||||
v.config_mut().mouse_pressed.2 = false;
|
v.config_mut().mouse_pressed.2 = false;
|
||||||
}
|
}
|
||||||
MouseButton::Other(_) => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
vec.extend(v.mouse_up(e, button));
|
vec.extend(v.mouse_up(e, button));
|
||||||
}
|
}
|
||||||
@@ -1791,7 +1791,9 @@ impl WindowHandler<GuiEvent> for Gui {
|
|||||||
MersCfg::run(&mut gc, self, |m| &m.func_library_updated);
|
MersCfg::run(&mut gc, self, |m| &m.func_library_updated);
|
||||||
self.gui_config = Some(gc);
|
self.gui_config = Some(gc);
|
||||||
} else {
|
} else {
|
||||||
eprintln!("WARN: Skipping call to merscfg's library_updated because gui_config is not available");
|
eprintln!(
|
||||||
|
"WARN: Skipping call to merscfg's library_updated because gui_config is not available"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
self.gui._recursive_all(true, &mut |e| e.updated_library());
|
self.gui._recursive_all(true, &mut |e| e.updated_library());
|
||||||
helper.request_redraw();
|
helper.request_redraw();
|
||||||
@@ -1802,7 +1804,9 @@ impl WindowHandler<GuiEvent> for Gui {
|
|||||||
MersCfg::run(&mut gc, self, |m| &m.func_queue_updated);
|
MersCfg::run(&mut gc, self, |m| &m.func_queue_updated);
|
||||||
self.gui_config = Some(gc);
|
self.gui_config = Some(gc);
|
||||||
} else {
|
} else {
|
||||||
eprintln!("WARN: Skipping call to merscfg's queue_updated because gui_config is not available");
|
eprintln!(
|
||||||
|
"WARN: Skipping call to merscfg's queue_updated because gui_config is not available"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
self.gui._recursive_all(true, &mut |e| e.updated_queue());
|
self.gui._recursive_all(true, &mut |e| e.updated_queue());
|
||||||
helper.request_redraw();
|
helper.request_redraw();
|
||||||
|
|||||||
1
musicdb-lib/.gitignore
vendored
1
musicdb-lib/.gitignore
vendored
@@ -1,2 +1 @@
|
|||||||
/target
|
/target
|
||||||
/Cargo.lock
|
|
||||||
|
|||||||
Reference in New Issue
Block a user