1
0
Fork 0
forked from wry/wry

config: add freestanding get_color and set_color functions

This commit is contained in:
Julian Orth 2024-03-03 15:57:03 +01:00
parent 911591973e
commit 044029fb66

View file

@ -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.