logs + events refactor
This commit is contained in:
parent
4f899d329e
commit
c10eda695a
7 changed files with 85 additions and 4 deletions
|
|
@ -32,3 +32,12 @@ pub fn log_display() -> TextBuilder {
|
|||
|
||||
return buf;
|
||||
}
|
||||
|
||||
pub fn clone_log() -> Vec<Vec<crate::gamelog::LogFragment>> {
|
||||
return LOG.lock().unwrap().clone();
|
||||
}
|
||||
|
||||
pub fn restore_log(log: &mut Vec<Vec<crate::gamelog::LogFragment>>) {
|
||||
LOG.lock().unwrap().clear();
|
||||
LOG.lock().unwrap().append(log);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue