pub struct Theme {
pub background_color: Color,
pub board_color: [Color; 2],
pub piece_path: [[&'static str; 6]; 2],
pub valid_moves_color: Option<Color>,
pub piece_pinned_color: Option<Color>,
pub piece_pinned_path: Option<&'static str>,
pub theme_icon_path: Option<&'static str>,
pub font_path: &'static str,
pub font_scale: f32,
}Expand description
Describe the theme of the chess game (GUI).
RootPath is resources/ (changed by ggez::ContextBuilder::add_resource_path).
§Examples
use chess::{Theme, THEME_DUST};
const THEME:Theme = Theme {
font_path: "/fonts/font.ttf", // located in resources/fonts/font.ttf
..THEME_DUST
};Fields§
§background_color: Color§board_color: [Color; 2]§piece_path: [[&'static str; 6]; 2]§valid_moves_color: Option<Color>§piece_pinned_color: Option<Color>§piece_pinned_path: Option<&'static str>§theme_icon_path: Option<&'static str>§font_path: &'static str§font_scale: f32Trait Implementations§
impl Copy for Theme
impl StructuralPartialEq for Theme
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnwindSafe for Theme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more