graphics: more figments updates
This commit is contained in:
@@ -9,12 +9,12 @@ use log::*;
|
||||
use crate::{animation::Animation, events::{Personality, Prediction}, graphics::{display::DisplayControls, oled_ui::{OledUniforms, Screen}}};
|
||||
|
||||
#[cfg(feature="oled")]
|
||||
pub type OledUiSurfacePool = BufferedSurfacePool<OledUniforms, Matrix2DSpace, BinaryColor>;
|
||||
pub type OledUiSurfacePool = figments::surface::BufferedSurfacePool<OledUniforms, Matrix2DSpace, BinaryColor>;
|
||||
|
||||
#[cfg(not(feature="oled"))]
|
||||
pub type OledUiSurfacePool = NullBufferPool<OledUniforms, Matrix2DSpace, BinaryColor>;
|
||||
pub type OledUiSurfacePool = figments::surface::NullBufferPool<OledUniforms, Matrix2DSpace, BinaryColor>;
|
||||
|
||||
type OledSurface = <OledUiSurfacePool as Surfaces<Matrix2DSpace>>::Surface;
|
||||
type OledSurface = <OledUiSurfacePool as Surfaces>::Surface;
|
||||
|
||||
pub type LockedUniforms = Arc<Mutex<CriticalSectionRawMutex, OledUniforms>>;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct SafetyUi<S: Surface> {
|
||||
}
|
||||
|
||||
impl<S: Debug + Surface<Uniforms = Uniforms, CoordinateSpace = SegmentSpace, Pixel = Rgba<u8>>> SafetyUi<S> {
|
||||
pub fn new<SS: Surfaces<SegmentSpace, Surface = S>>(surfaces: &mut SS, display: DisplayControls) -> Self where SS::Error: Debug {
|
||||
pub fn new<SS: Surfaces<Surface = S>>(surfaces: &mut SS, display: DisplayControls) -> Self where SS::Error: Debug {
|
||||
let ret = Self {
|
||||
overlay: SurfaceBuilder::build(surfaces)
|
||||
.rect(Rectangle::everything())
|
||||
|
||||
@@ -23,7 +23,7 @@ pub struct Ui<S: Surface> {
|
||||
}
|
||||
|
||||
impl<S: Debug + Surface<Uniforms = Uniforms, CoordinateSpace = SegmentSpace, Pixel = Rgba<u8>>> Ui<S> {
|
||||
pub fn new<SS: Surfaces<SegmentSpace, Surface = S>>(surfaces: &mut SS) -> Self where SS::Error: Debug {
|
||||
pub fn new<SS: Surfaces<Surface = S>>(surfaces: &mut SS) -> Self where SS::Error: Debug {
|
||||
Self {
|
||||
background: SurfaceBuilder::build(surfaces)
|
||||
.rect(Rectangle::everything())
|
||||
|
||||
Reference in New Issue
Block a user