@@ -39,6 +39,7 @@
|
||||
<CheckBox Name="ViewportLowResCheckBox" Text="{Loc 'ui-options-vp-low-res'}" />
|
||||
<CheckBox Name="ParallaxLowQualityCheckBox" Text="{Loc 'ui-options-parallax-low-quality'}" />
|
||||
<CheckBox Name="FpsCounterCheckBox" Text="{Loc 'ui-options-fps-counter'}" />
|
||||
<CheckBox Name="LogInChatCheckBox" Text="Логировать действия в чат" />
|
||||
</BoxContainer>
|
||||
<controls:StripeBack HasBottomEdge="False" HasMargins="False">
|
||||
<Button Name="ApplyButton"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.HUD;
|
||||
using Content.Shared.White;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface;
|
||||
@@ -71,6 +73,7 @@ namespace Content.Client.Options.UI.Tabs
|
||||
ViewportLowResCheckBox.OnToggled += OnCheckBoxToggled;
|
||||
ParallaxLowQualityCheckBox.OnToggled += OnCheckBoxToggled;
|
||||
FpsCounterCheckBox.OnToggled += OnCheckBoxToggled;
|
||||
LogInChatCheckBox.OnToggled += OnCheckBoxToggled;
|
||||
ApplyButton.OnPressed += OnApplyButtonPressed;
|
||||
VSyncCheckBox.Pressed = _cfg.GetCVar(CVars.DisplayVSync);
|
||||
FullscreenCheckBox.Pressed = ConfigIsFullscreen;
|
||||
@@ -82,6 +85,7 @@ namespace Content.Client.Options.UI.Tabs
|
||||
ViewportLowResCheckBox.Pressed = !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
||||
ParallaxLowQualityCheckBox.Pressed = _cfg.GetCVar(CCVars.ParallaxLowQuality);
|
||||
FpsCounterCheckBox.Pressed = _cfg.GetCVar(CCVars.HudFpsCounterVisible);
|
||||
LogInChatCheckBox.Pressed = _cfg.GetCVar(WhiteCVars.LogInChat);
|
||||
ViewportWidthSlider.Value = _cfg.GetCVar(CCVars.ViewportWidth);
|
||||
|
||||
_cfg.OnValueChanged(CCVars.ViewportMinimumWidth, _ => UpdateViewportWidthRange());
|
||||
@@ -114,6 +118,7 @@ namespace Content.Client.Options.UI.Tabs
|
||||
_cfg.SetCVar(CCVars.ViewportScaleRender, !ViewportLowResCheckBox.Pressed);
|
||||
_cfg.SetCVar(CCVars.ParallaxLowQuality, ParallaxLowQualityCheckBox.Pressed);
|
||||
_cfg.SetCVar(CCVars.HudFpsCounterVisible, FpsCounterCheckBox.Pressed);
|
||||
_cfg.SetCVar(WhiteCVars.LogInChat, LogInChatCheckBox.Pressed);
|
||||
_cfg.SetCVar(CCVars.ViewportWidth, (int) ViewportWidthSlider.Value);
|
||||
|
||||
_cfg.SaveToFile();
|
||||
@@ -143,6 +148,7 @@ namespace Content.Client.Options.UI.Tabs
|
||||
var isVPResSame = ViewportLowResCheckBox.Pressed == !_cfg.GetCVar(CCVars.ViewportScaleRender);
|
||||
var isPLQSame = ParallaxLowQualityCheckBox.Pressed == _cfg.GetCVar(CCVars.ParallaxLowQuality);
|
||||
var isFpsCounterVisibleSame = FpsCounterCheckBox.Pressed == _cfg.GetCVar(CCVars.HudFpsCounterVisible);
|
||||
var isLogInChatSame = LogInChatCheckBox.Pressed == _cfg.GetCVar(WhiteCVars.LogInChat);
|
||||
var isWidthSame = (int) ViewportWidthSlider.Value == _cfg.GetCVar(CCVars.ViewportWidth);
|
||||
|
||||
ApplyButton.Disabled = isVSyncSame &&
|
||||
@@ -155,7 +161,8 @@ namespace Content.Client.Options.UI.Tabs
|
||||
isVPResSame &&
|
||||
isPLQSame &&
|
||||
isFpsCounterVisibleSame &&
|
||||
isWidthSame;
|
||||
isWidthSame &&
|
||||
isLogInChatSame;
|
||||
}
|
||||
|
||||
private bool ConfigIsFullscreen =>
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using System.Numerics;
|
||||
using Content.Client.Examine;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Player;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using System.Linq;
|
||||
using Content.Client.Chat.Managers;
|
||||
using Content.Shared.Chat;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.White;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.Player;
|
||||
@@ -27,6 +30,7 @@ namespace Content.Client.Popups
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
|
||||
[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
|
||||
[Dependency] private readonly IChatManager _chatManager = default!;
|
||||
|
||||
public IReadOnlyList<WorldPopupLabel> WorldLabels => _aliveWorldLabels;
|
||||
public IReadOnlyList<CursorPopupLabel> CursorLabels => _aliveCursorLabels;
|
||||
@@ -38,6 +42,8 @@ namespace Content.Client.Popups
|
||||
public const float MaximumPopupLifetime = 5f;
|
||||
public const float PopupLifetimePerCharacter = 0.04f;
|
||||
|
||||
private bool isLogging;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeNetworkEvent<PopupCursorEvent>(OnPopupCursorEvent);
|
||||
@@ -46,6 +52,9 @@ namespace Content.Client.Popups
|
||||
SubscribeNetworkEvent<RoundRestartCleanupEvent>(OnRoundRestart);
|
||||
_overlay
|
||||
.AddOverlay(new PopupOverlay(_configManager, EntityManager, _playerManager, _prototype, _resource, _uiManager, this));
|
||||
|
||||
isLogging = _configManager.GetCVar(WhiteCVars.LogInChat);
|
||||
_configManager.OnValueChanged(WhiteCVars.LogInChat, (log) => { isLogging = log; });
|
||||
}
|
||||
|
||||
public override void Shutdown()
|
||||
@@ -72,6 +81,11 @@ namespace Content.Client.Popups
|
||||
};
|
||||
|
||||
_aliveWorldLabels.Add(label);
|
||||
|
||||
if (isLogging)
|
||||
{
|
||||
_chatManager.SendMessage($"notice {message}", ChatSelectChannel.Console);
|
||||
}
|
||||
}
|
||||
|
||||
#region Abstract Method Implementations
|
||||
|
||||
@@ -41,7 +41,7 @@ public sealed partial class TapeCreatorMenu : DefaultWindow
|
||||
_huetaSystem = _entityManager.System<CheZaHuetaSystem>();
|
||||
_popupSystem = _entityManager.System<SharedPopupSystem>();
|
||||
|
||||
_cfg.OnValueChanged(WhiteCVars.MaxJukeboxSongSizeInMB, x => _maxFileSize = x, true);
|
||||
_cfg.OnValueChanged(WhiteCVars.MaxJukeboxSongSizeInMb, x => _maxFileSize = x, true);
|
||||
|
||||
_component = component;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user