aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/strategy_cursor_hud.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/fparkan-game/src/strategy_cursor_hud.rs')
-rw-r--r--apps/fparkan-game/src/strategy_cursor_hud.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/fparkan-game/src/strategy_cursor_hud.rs b/apps/fparkan-game/src/strategy_cursor_hud.rs
index d64217a5..1f13ba84 100644
--- a/apps/fparkan-game/src/strategy_cursor_hud.rs
+++ b/apps/fparkan-game/src/strategy_cursor_hud.rs
@@ -7,7 +7,7 @@ use std::path::Path;
use winit::window::Window;
pub(super) struct StrategyCursorHud {
- strips: [CursorDraw; 3],
+ strips: [CursorDraw; StrategyCursor::ALL.len()],
visible: bool,
}
@@ -22,7 +22,7 @@ struct CursorDraw {
impl StrategyCursorHud {
pub(super) fn load(root: &Path, preview: &mut StaticPreviewScene) -> Result<Self, String> {
- let [arrow, place, wrong_place] = strategy_cursor::load(&DirectoryVfs::new(root))?;
+ let [arrow, place, wrong_place, guard] = strategy_cursor::load(&DirectoryVfs::new(root))?;
let mut load = |strip: CursorStrip| {
let size = [
(strip.image.width / PHASES) as f32,
@@ -44,12 +44,12 @@ impl StrategyCursorHud {
})
};
Ok(Self {
- strips: [load(arrow)?, load(place)?, load(wrong_place)?],
+ strips: [load(arrow)?, load(place)?, load(wrong_place)?, load(guard)?],
visible: false,
})
}
- pub(super) fn ranges(&self) -> [usize; 3] {
+ pub(super) fn ranges(&self) -> [usize; StrategyCursor::ALL.len()] {
std::array::from_fn(|i| self.strips[i].range.range_index)
}