Compare commits
2 commits
b5ab422017
...
c618c0e1c1
Author | SHA1 | Date | |
---|---|---|---|
yuni | c618c0e1c1 | ||
yuni | cc34c9b21b |
|
@ -775,6 +775,9 @@ pub fn handle_chat_events(
|
|||
chat.talker.name.clone().unwrap_or("".to_string()),
|
||||
);
|
||||
}
|
||||
hud::LogLevel::Send => {
|
||||
log.send(message.into());
|
||||
}
|
||||
hud::LogLevel::Info => {
|
||||
log.info(message.into());
|
||||
}
|
||||
|
@ -851,6 +854,7 @@ pub fn handle_chat_events(
|
|||
fn handle_reply_keys(
|
||||
keyboard_input: Res<ButtonInput<KeyCode>>,
|
||||
settings: Res<var::Settings>,
|
||||
mut log: ResMut<hud::Log>,
|
||||
q_choices: Query<&Choice>,
|
||||
mut q_chats: Query<&mut Chat>,
|
||||
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||
|
@ -871,6 +875,9 @@ fn handle_reply_keys(
|
|||
if let Ok(mut chat) = q_chats.get_single_mut() {
|
||||
// Advance the chat.
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Click));
|
||||
if choice.text != TEXT_CONTINUE {
|
||||
log.send(choice.text.clone());
|
||||
}
|
||||
chat.timer = time.elapsed_seconds_f64();
|
||||
chat.position = choice.goto.clone();
|
||||
chat.message_open = false;
|
||||
|
|
|
@ -322,7 +322,7 @@ actor 0 59305 0 suitv2
|
|||
id player
|
||||
wants maxvelocity none
|
||||
oxygen 0.008
|
||||
health 0.3
|
||||
health 0.9
|
||||
rotationy 135
|
||||
|
||||
scene 10 -30 20 test
|
||||
|
|
|
@ -228,6 +228,7 @@ pub enum LogLevel {
|
|||
Info,
|
||||
//Debug,
|
||||
Chat,
|
||||
Send,
|
||||
//Ping,
|
||||
}
|
||||
|
||||
|
@ -295,6 +296,10 @@ impl Log {
|
|||
self.add(message, sender, LogLevel::Chat);
|
||||
}
|
||||
|
||||
pub fn send(&mut self, message: String) {
|
||||
self.add(message, "Me".to_string(), LogLevel::Send);
|
||||
}
|
||||
|
||||
pub fn warning(&mut self, message: String) {
|
||||
self.add(message, "WARNING".to_string(), LogLevel::Warning);
|
||||
}
|
||||
|
@ -1040,6 +1045,7 @@ fn update_hud(
|
|||
LogLevel::Achievement => settings.hud_color_console_achievement,
|
||||
LogLevel::Warning => settings.hud_color_console_warn,
|
||||
LogLevel::Info => settings.hud_color_console_system,
|
||||
LogLevel::Send => settings.hud_color_console_send,
|
||||
_ => settings.hud_color_console,
|
||||
};
|
||||
chat.sections[row].style.color.set_alpha(opacity);
|
||||
|
|
|
@ -69,6 +69,7 @@ pub struct Settings {
|
|||
pub hud_color: Color,
|
||||
pub hud_color_fps: Color,
|
||||
pub hud_color_console: Color,
|
||||
pub hud_color_console_send: Color,
|
||||
pub hud_color_console_warn: Color,
|
||||
pub hud_color_console_system: Color,
|
||||
pub hud_color_console_achievement: Color,
|
||||
|
@ -213,6 +214,7 @@ impl Default for Settings {
|
|||
hud_color: Srgba::hex(COLOR_PRIMARY).unwrap().into(),
|
||||
hud_color_fps: Srgba::hex("#181818").unwrap().into(),
|
||||
hud_color_console: Srgba::hex(COLOR_PRIMARY).unwrap().into(),
|
||||
hud_color_console_send: Srgba::hex(COLOR_SECONDARY).unwrap().into(),
|
||||
hud_color_console_achievement: Srgba::hex(COLOR_SUCCESS).unwrap().into(),
|
||||
hud_color_console_warn: Srgba::hex(COLOR_WARNING).unwrap().into(),
|
||||
hud_color_console_system: Srgba::hex(COLOR_SECONDARY).unwrap().into(),
|
||||
|
|
Loading…
Reference in a new issue