config: add freestanding get_color and set_color functions
This commit is contained in:
parent
911591973e
commit
044029fb66
1 changed files with 10 additions and 0 deletions
|
|
@ -258,6 +258,16 @@ pub mod colors {
|
||||||
/// Default: `#23092c`.
|
/// Default: `#23092c`.
|
||||||
const 14 => ATTENTION_REQUESTED_BACKGROUND_COLOR,
|
const 14 => ATTENTION_REQUESTED_BACKGROUND_COLOR,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Sets the color of GUI element.
|
||||||
|
pub fn set_color(element: Colorable, color: Color) {
|
||||||
|
get!().set_color(element, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Gets the color of GUI element.
|
||||||
|
pub fn get_color(element: Colorable) -> Color {
|
||||||
|
get!(Color::BLACK).get_color(element)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Elements of the compositor whose size can be changed.
|
/// Elements of the compositor whose size can be changed.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue