Add most of a "CloseButton" widget
I'm trying out a new scope strategy. The CloseButton exists as a real struct with the `Component` trait. There's a bundle spawning utility function and several observer systems. The observer systems have been added directly to the app, which I *believe* means they won't be duplicated the way the Big Red Button's observers will.
This commit is contained in:
@@ -17,6 +17,17 @@ pub struct UiTheme {
|
||||
// pressed
|
||||
pub brb_pressed_bg: Color,
|
||||
pub brb_pressed_border: Color,
|
||||
|
||||
// Colors for low-priority buttons
|
||||
// normal
|
||||
pub quiet_bg: Color,
|
||||
pub quiet_border: Color,
|
||||
// hover
|
||||
pub quiet_hover_bg: Color,
|
||||
pub quiet_hover_border: Color,
|
||||
// pressed
|
||||
pub quiet_pressed_bg: Color,
|
||||
pub quiet_pressed_border: Color,
|
||||
}
|
||||
|
||||
impl FromWorld for UiTheme {
|
||||
@@ -28,6 +39,13 @@ impl FromWorld for UiTheme {
|
||||
brb_hover_border: RED.into(),
|
||||
brb_pressed_bg: GREEN.into(),
|
||||
brb_pressed_border: DARK_GREEN.into(),
|
||||
|
||||
quiet_bg: GRAY.into(),
|
||||
quiet_border: DARK_GRAY.into(),
|
||||
quiet_hover_bg: DARK_GRAY.into(),
|
||||
quiet_hover_border: LIGHT_GRAY.into(),
|
||||
quiet_pressed_bg: LIGHT_GRAY.into(),
|
||||
quiet_pressed_border: GRAY.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user