prepare Outputs type
This commit is contained in:
+6
-6
@@ -48,9 +48,9 @@ impl Display for CardType {
|
||||
}
|
||||
|
||||
pub type PrimaryColor = Rgb565;
|
||||
impl Into<PrimaryColor> for CardType {
|
||||
fn into(self) -> PrimaryColor {
|
||||
match self {
|
||||
impl From<CardType> for PrimaryColor {
|
||||
fn from(val: CardType) -> Self {
|
||||
match val {
|
||||
CardType::Default => Rgb888::new(0xD8, 0x68, 0x30).into(),
|
||||
CardType::Blueprint => Rgb888::new(0x6D, 0x81, 0xFF).into(),
|
||||
CardType::CYBER => Rgb888::new(0xFF, 0xFF, 0x04).into(),
|
||||
@@ -64,9 +64,9 @@ impl Into<PrimaryColor> for CardType {
|
||||
}
|
||||
|
||||
pub type Palette = [Rgb565; 16];
|
||||
impl Into<Palette> for CardType {
|
||||
fn into(self) -> Palette {
|
||||
match self {
|
||||
impl From<CardType> for Palette {
|
||||
fn from(val: CardType) -> Self {
|
||||
match val {
|
||||
CardType::Default => [
|
||||
Rgb888::new(31, 23, 35).into(),
|
||||
Rgb888::new(60, 47, 82).into(),
|
||||
|
||||
Reference in New Issue
Block a user