aboutsummaryrefslogtreecommitdiff
path: root/src/useropts.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-12-25 00:56:44 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-12-25 00:56:44 +0100
commit7f2f9b03debc7fc16f9614df7cb6fa4c0999d128 (patch)
treee5e9d59d4b37fb8e650038ae4b22ef23942db6a4 /src/useropts.rs
parent97f2678563e6ca997ea33d7befe38ab2acfa01a9 (diff)
downloadkondou-7f2f9b03debc7fc16f9614df7cb6fa4c0999d128.tar.gz
kondou-7f2f9b03debc7fc16f9614df7cb6fa4c0999d128.tar.bz2
kondou-7f2f9b03debc7fc16f9614df7cb6fa4c0999d128.zip
add more user configurable options
Diffstat (limited to 'src/useropts.rs')
-rw-r--r--src/useropts.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/useropts.rs b/src/useropts.rs
index e6de8de..2e98926 100644
--- a/src/useropts.rs
+++ b/src/useropts.rs
@@ -71,14 +71,20 @@ macro_rules! maybe_take_from {
/// `image::Rgba` for `background_color`).
#[derive(Debug, Serialize, Deserialize)]
pub struct UserOptions {
+ pub skill_size: Option<u32>,
+ pub traitline_brightness: Option<i32>,
+ pub traitline_use_gradient: Option<bool>,
+ pub traitline_gradient_size: Option<u32>,
pub traitline_x_offset: Option<u32>,
pub trait_size: Option<u32>,
pub line_color: Option<[u8; 4]>,
pub line_height: Option<u32>,
+ pub font_path: Option<String>,
+ pub text_color: Option<[u8; 4]>,
pub text_size: Option<u32>,
pub background_color: Option<[u8; 4]>,
- pub font_path: Option<String>,
pub render_specialization_names: Option<bool>,
+ pub skill_offset: Option<u32>,
pub skill_alignment: Option<Alignment>,
}
@@ -96,6 +102,10 @@ impl UserOptions {
result.line_color = Rgba(data);
}
+ if let Some(data) = self.text_color {
+ result.text_color = Rgba(data);
+ }
+
if let Some(path) = self.font_path {
let data = fs::read(path)?;
let font = Font::from_bytes(data)?;
@@ -104,11 +114,16 @@ impl UserOptions {
maybe_take_from! {
from: self, to: result,
+ skill_size,
+ traitline_brightness,
+ traitline_use_gradient,
+ traitline_gradient_size,
traitline_x_offset,
trait_size,
line_height,
text_size,
render_specialization_names,
+ skill_offset,
skill_alignment,
}