refactor: major refactor of internal data handling

What started off as an inquisitive look at how the gui drawing blocks get the data they require in order to draw to the screen, ended up as a realisation  that it could be achieved in a better manner. Basically just use x.get(y), instead of using x[y] all over the place
This commit is contained in:
Jack Wills
2023-01-28 20:44:09 +00:00
parent 1025579138
commit b4488e4bdb
6 changed files with 251 additions and 236 deletions
+1
View File
@@ -242,6 +242,7 @@ impl GuiState {
}
/// Check if the current gui_status contains any of the given status'
/// Don't really like this methodology for gui state, needs a re-think
pub fn status_contains(&self, status: &[Status]) -> bool {
status.iter().any(|i| self.status.contains(i))
}