Get SpriteConsole's sprite sheet when rendering sprite
@@ -165,7 +165,8 @@ pub(crate) fn render_consoles() -> BResult<()> {
backing.gl_draw(font, shader)?;
}
ConsoleBacking::Sprite { backing } => {
- backing.gl_draw(bi.sprite_sheets[0].backing.as_ref().unwrap(), shader)?;
+ let sprite_sheet = cons.console.as_any().downcast_ref::<SpriteConsole>().unwrap().sprite_sheet;
+ backing.gl_draw(bi.sprite_sheets[sprite_sheet].backing.as_ref().unwrap(), shader)?;
}
}
}
