Hud refactor (#7202)

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: Jezithyr <jmaster9999@gmail.com>
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
Co-authored-by: Visne <39844191+Visne@users.noreply.github.com>
Co-authored-by: wrexbe <wrexbe@protonmail.com>
Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
This commit is contained in:
Jezithyr
2022-10-12 01:16:23 -07:00
committed by GitHub
parent d09fbc1849
commit 571dd4e6d5
168 changed files with 6940 additions and 7817 deletions

View File

@@ -1,55 +1,11 @@
using System;
using System.Collections.Generic;
using Content.Client.Chat.UI;
using Content.Shared.Chat;
using Robust.Shared.GameObjects;
using Robust.Shared.Timing;
namespace Content.Client.Chat.Managers
{
public interface IChatManager
{
ChatChannel ChannelFilters { get; }
ChatSelectChannel SelectableChannels { get; }
ChatChannel FilterableChannels { get; }
void Initialize();
void FrameUpdate(FrameEventArgs delta);
void SetChatBox(ChatBox chatBox);
void RemoveSpeechBubble(EntityUid entityUid, SpeechBubble bubble);
/// <summary>
/// Current chat box control. This can be modified, so do not depend on saving a reference to this.
/// </summary>
ChatBox? CurrentChatBox { get; }
IReadOnlyDictionary<EntityUid, List<SpeechBubble>> GetSpeechBubbles();
IReadOnlyDictionary<ChatChannel, int> UnreadMessages { get; }
IReadOnlyList<StoredChatMessage> History { get; }
int MaxMessageLength { get; }
bool IsGhost { get; }
/// <summary>
/// Invoked when CurrentChatBox is resized (including after setting initial default size)
/// </summary>
event Action<ChatResizedEventArgs>? OnChatBoxResized;
event Action<ChatPermissionsUpdatedEventArgs>? ChatPermissionsUpdated;
event Action? UnreadMessageCountsUpdated;
event Action<StoredChatMessage>? MessageAdded;
event Action? FiltersUpdated;
void ClearUnfilteredUnreads();
void ChatBoxOnResized(ChatResizedEventArgs chatResizedEventArgs);
void OnChatBoxTextSubmitted(ChatBox chatBox, ReadOnlyMemory<char> text, ChatSelectChannel channel);
void OnFilterButtonToggled(ChatChannel channel, bool enabled);
}
public struct ChatPermissionsUpdatedEventArgs
{
public ChatSelectChannel OldSelectableChannels;
public void SendMessage(ReadOnlyMemory<char> text, ChatSelectChannel channel);
}
}