cleanup
This commit is contained in:
parent
ac1d1d9bca
commit
a2b348fc59
|
@ -682,7 +682,7 @@ fn spawn_entities(
|
||||||
actor.insert(PointLightBundle {
|
actor.insert(PointLightBundle {
|
||||||
point_light: PointLight {
|
point_light: PointLight {
|
||||||
intensity: state.light_brightness,
|
intensity: state.light_brightness,
|
||||||
color: color,
|
color,
|
||||||
range: 100.0,
|
range: 100.0,
|
||||||
radius: 100.0,
|
radius: 100.0,
|
||||||
..default()
|
..default()
|
||||||
|
|
10
src/hud.rs
10
src/hud.rs
|
@ -119,15 +119,15 @@ impl Log {
|
||||||
self.add(message, "".to_string(), LogLevel::Notice);
|
self.add(message, "".to_string(), LogLevel::Notice);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add(&mut self, message: String, sender: String, level: LogLevel) {
|
pub fn add(&mut self, text: String, sender: String, level: LogLevel) {
|
||||||
if self.logs.len() == LOG_MAX {
|
if self.logs.len() == LOG_MAX {
|
||||||
self.logs.pop_front();
|
self.logs.pop_front();
|
||||||
}
|
}
|
||||||
if let Ok(epoch) = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH) {
|
if let Ok(epoch) = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH) {
|
||||||
self.logs.push_back(Message {
|
self.logs.push_back(Message {
|
||||||
text: message,
|
text,
|
||||||
sender: sender,
|
sender,
|
||||||
level: level,
|
level,
|
||||||
time: epoch.as_secs(),
|
time: epoch.as_secs(),
|
||||||
});
|
});
|
||||||
self.needs_rerendering = true;
|
self.needs_rerendering = true;
|
||||||
|
@ -377,7 +377,7 @@ fn setup(
|
||||||
left: Val::Vw(50.0),
|
left: Val::Vw(50.0),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
visibility: visibility,
|
visibility,
|
||||||
background_color: Color::rgb(0.4, 0.4, 0.6).into(),
|
background_color: Color::rgb(0.4, 0.4, 0.6).into(),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue