#[non_exhaustive]pub struct SourceLang {
pub code: LangCode,
pub name: String,
pub wide_font: Option<String>,
pub wide_punctuation: bool,
}Expand description
The language the game is written in: its screen text is in its folder
(<code>/ui.ron), and its data and dialogue in the game’s own files.
Every pack is checked against it, and every lookup ends with it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: LangCodeIts tag, the name of its folder.
name: StringIts own name for itself, which a language menu shows.
wide_font: Option<String>The font atlas’s wide set it draws from first, as a pack’s
LangInfo::wide_font names one: None for none of its own.
wide_punctuation: boolWhether WIDE_PUNCTUATION is wide
in it, as a pack’s LangInfo::wide_punctuation says; narrow
(false) by default.
Implementations§
Source§impl SourceLang
impl SourceLang
Sourcepub fn new(code: LangCode, name: impl Into<String>) -> Self
pub fn new(code: LangCode, name: impl Into<String>) -> Self
The source language code, named name in itself, with no wide set
of its own and its punctuation narrow.
Sourcepub fn with_wide_font(self, set: impl Into<String>) -> Self
pub fn with_wide_font(self, set: impl Into<String>) -> Self
This language, drawing from the font atlas’s wide set set first
(wide_font).
Sourcepub fn with_wide_punctuation(self, on: bool) -> Self
pub fn with_wide_punctuation(self, on: bool) -> Self
This language, its punctuation wide (on) or narrow
(wide_punctuation).
Sourcepub fn widths(&self, base: &CellWidths) -> CellWidths
pub fn widths(&self, base: &CellWidths) -> CellWidths
The width table of this language over base, the atlas’s
(CellWidths::of), as LangInfo::widths makes a pack’s.
Trait Implementations§
Source§impl Clone for SourceLang
impl Clone for SourceLang
Source§fn clone(&self) -> SourceLang
fn clone(&self) -> SourceLang
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more