mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Ports rust-g -> rustlibs: toast (#29379)
* moves rustg_toast to rustlibs_toast * Build Rust library * Build Rust library * Update rust/Cargo.toml Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com> * Build Rust library * throw out old binaries --------- Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
co-authored by
AffectedArc07
paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
parent
0b254678a0
commit
4882ffe053
@@ -9,4 +9,5 @@ mod rustlibs_json;
|
||||
mod rustlibs_logging;
|
||||
mod rustlibs_noisegen;
|
||||
mod rustlibs_redispubsub;
|
||||
mod rustlibs_toast;
|
||||
mod rustlibs_toml;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
use byondapi::value::ByondValue;
|
||||
#[cfg(target_os = "windows")]
|
||||
use notify_rust::Notification;
|
||||
|
||||
#[byondapi::bind]
|
||||
fn create_toast(_title: ByondValue, _text: ByondValue) -> eyre::Result<ByondValue> {
|
||||
#[cfg(target_os = "windows")]
|
||||
Notification::new()
|
||||
.summary(&_title.get_string()?)
|
||||
.body(&_text.get_string()?)
|
||||
.show()
|
||||
.ok();
|
||||
Ok(ByondValue::null())
|
||||
}
|
||||
Reference in New Issue
Block a user