Merge pull request #118 from mahkoh/jorth/color
config: add freestanding get_color and set_color functions
This commit is contained in:
commit
3582b8f935
1 changed files with 10 additions and 0 deletions
|
|
@ -258,6 +258,16 @@ pub mod colors {
|
|||
/// Default: `#23092c`.
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue