pub struct SocialChatState {
pub log: Vec<ChatLogEntry>,
pub input_focused: bool,
pub buffer: String,
pub thread: ChatThreadKind,
pub peer_label: String,
pub log_hidden: bool,
pub pending_trade: Option<PendingTradeRequest>,
pub picking_stone: bool,
pub stone_pick_index: usize,
pub speaking_bubbles: Vec<SpeakingBubble>,
pub audio_cues: VecDeque<AudioCue>,
}Fields§
§log: Vec<ChatLogEntry>§input_focused: boolKeyboard focus on the chat input (sidebar) — not a popup.
buffer: String§thread: ChatThreadKind§peer_label: String§pending_trade: Option<PendingTradeRequest>Peer asked to trade — show inline accept in CHAT.
picking_stone: boolPicking a whisper-stone contact inside the chat column (g).
stone_pick_index: usize§speaking_bubbles: Vec<SpeakingBubble>Active “…” bubbles above speakers.
audio_cues: VecDeque<AudioCue>Soft tones for the gfx client to drain/play.
Implementations§
Source§impl SocialChatState
impl SocialChatState
pub const MAX_LOG: usize = 200
pub const MAX_BUF: usize = 200
pub fn push(&mut self, entry: ChatLogEntry)
pub fn push_system(&mut self, text: impl Into<String>)
pub fn push_cue(&mut self, cue: AudioCue)
pub fn drain_audio_cues(&mut self) -> Vec<AudioCue>
Sourcepub fn note_speech(&mut self, msg: &ChatMessage, self_id: EntityId, now_ms: u64)
pub fn note_speech(&mut self, msg: &ChatMessage, self_id: EntityId, now_ms: u64)
Record a speech bubble + optional tone for an inbound chat line.
pub fn prune_bubbles(&mut self, now_ms: u64)
Sourcepub fn focus_nearby(&mut self)
pub fn focus_nearby(&mut self)
Focus chat for nearby speech (t).
Sourcepub fn focus_whisper(&mut self, peer: EntityId, label: &str)
pub fn focus_whisper(&mut self, peer: EntityId, label: &str)
Focus chat whispering a nearby player (f → Whisper).
pub fn focus_stone(&mut self, peer: EntityId, label: &str)
pub fn unfocus(&mut self)
Sourcepub fn cancel_whisper_out_of_range(&mut self) -> bool
pub fn cancel_whisper_out_of_range(&mut self) -> bool
Drop directed whisper when the peer is out of interact range (or gone). Returns true if whisper mode was cancelled.
pub fn prompt_prefix(&self) -> &'static str
Sourcepub fn composer_open(&self) -> bool
pub fn composer_open(&self) -> bool
Legacy alias used by older call sites.
pub fn open_nearby(&mut self)
pub fn open_direct(&mut self, peer: EntityId, label: &str, whisper: bool)
pub fn open_stone(&mut self, peer: EntityId, label: &str)
pub fn close_composer(&mut self)
pub fn toggle_mode_speak_whisper(&mut self)
Trait Implementations§
Source§impl Clone for SocialChatState
impl Clone for SocialChatState
Source§fn clone(&self) -> SocialChatState
fn clone(&self) -> SocialChatState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SocialChatState
impl Debug for SocialChatState
Auto Trait Implementations§
impl Freeze for SocialChatState
impl RefUnwindSafe for SocialChatState
impl Send for SocialChatState
impl Sync for SocialChatState
impl Unpin for SocialChatState
impl UnsafeUnpin for SocialChatState
impl UnwindSafe for SocialChatState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more