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: Colorboard_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 strfont_scale: f32Trait Implementations
sourceimpl PartialEq<Theme> for Theme
impl PartialEq<Theme> for Theme
impl Copy for Theme
impl StructuralPartialEq for Theme
Auto Trait Implementations
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnwindSafe for Theme
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more