Merge branch 'master' into 2020-03-03-g-g-g-g-g-g-g-g-ghooooosts
@@ -6,6 +6,7 @@ using Content.Client.Interfaces.Parallax;
|
|||||||
using Content.Client.Parallax;
|
using Content.Client.Parallax;
|
||||||
using Content.Client.Sandbox;
|
using Content.Client.Sandbox;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -27,6 +28,7 @@ namespace Content.Client
|
|||||||
IoCManager.Register<IModuleManager, ClientModuleManager>();
|
IoCManager.Register<IModuleManager, ClientModuleManager>();
|
||||||
IoCManager.Register<IClientPreferencesManager, ClientPreferencesManager>();
|
IoCManager.Register<IClientPreferencesManager, ClientPreferencesManager>();
|
||||||
IoCManager.Register<IItemSlotManager, ItemSlotManager>();
|
IoCManager.Register<IItemSlotManager, ItemSlotManager>();
|
||||||
|
IoCManager.Register<IStylesheetManager, StylesheetManager>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Content.Client.Parallax;
|
|||||||
using Content.Client.Sandbox;
|
using Content.Client.Sandbox;
|
||||||
using Content.Client.State;
|
using Content.Client.State;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Shared.GameObjects.Components;
|
using Content.Shared.GameObjects.Components;
|
||||||
using Content.Shared.GameObjects.Components.Cargo;
|
using Content.Shared.GameObjects.Components.Cargo;
|
||||||
using Content.Shared.GameObjects.Components.Chemistry;
|
using Content.Shared.GameObjects.Components.Chemistry;
|
||||||
@@ -17,7 +18,7 @@ using Content.Shared.GameObjects.Components.VendingMachines;
|
|||||||
using Robust.Client.Interfaces;
|
using Robust.Client.Interfaces;
|
||||||
using Robust.Client.Interfaces.Graphics.Overlays;
|
using Robust.Client.Interfaces.Graphics.Overlays;
|
||||||
using Robust.Client.Interfaces.Input;
|
using Robust.Client.Interfaces.Input;
|
||||||
using Robust.Client.Interfaces.UserInterface;
|
using Robust.Client.Interfaces.State;
|
||||||
using Robust.Client.Player;
|
using Robust.Client.Player;
|
||||||
using Robust.Shared.ContentPack;
|
using Robust.Shared.ContentPack;
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
@@ -35,6 +36,8 @@ namespace Content.Client
|
|||||||
[Dependency] private readonly IPlayerManager _playerManager;
|
[Dependency] private readonly IPlayerManager _playerManager;
|
||||||
[Dependency] private readonly IBaseClient _baseClient;
|
[Dependency] private readonly IBaseClient _baseClient;
|
||||||
[Dependency] private readonly IEscapeMenuOwner _escapeMenuOwner;
|
[Dependency] private readonly IEscapeMenuOwner _escapeMenuOwner;
|
||||||
|
[Dependency] private readonly IGameController _gameController;
|
||||||
|
[Dependency] private readonly IStateManager _stateManager;
|
||||||
#pragma warning restore 649
|
#pragma warning restore 649
|
||||||
|
|
||||||
public override void Init()
|
public override void Init()
|
||||||
@@ -167,10 +170,7 @@ namespace Content.Client
|
|||||||
|
|
||||||
IoCManager.Resolve<IParallaxManager>().LoadParallax();
|
IoCManager.Resolve<IParallaxManager>().LoadParallax();
|
||||||
IoCManager.Resolve<IBaseClient>().PlayerJoinedServer += SubscribePlayerAttachmentEvents;
|
IoCManager.Resolve<IBaseClient>().PlayerJoinedServer += SubscribePlayerAttachmentEvents;
|
||||||
|
IoCManager.Resolve<IStylesheetManager>().Initialize();
|
||||||
var stylesheet = new NanoStyle();
|
|
||||||
|
|
||||||
IoCManager.Resolve<IUserInterfaceManager>().Stylesheet = stylesheet.Stylesheet;
|
|
||||||
|
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
@@ -225,6 +225,16 @@ namespace Content.Client
|
|||||||
IoCManager.Resolve<ISandboxManager>().Initialize();
|
IoCManager.Resolve<ISandboxManager>().Initialize();
|
||||||
IoCManager.Resolve<IClientPreferencesManager>().Initialize();
|
IoCManager.Resolve<IClientPreferencesManager>().Initialize();
|
||||||
IoCManager.Resolve<IItemSlotManager>().Initialize();
|
IoCManager.Resolve<IItemSlotManager>().Initialize();
|
||||||
|
|
||||||
|
// Fire off into state dependent on launcher or not.
|
||||||
|
if (_gameController.LaunchState.FromLauncher)
|
||||||
|
{
|
||||||
|
_stateManager.RequestStateChange<LauncherConnecting>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_stateManager.RequestStateChange<MainScreen>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
|
public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ using Robust.Client.Interfaces.Input;
|
|||||||
using Robust.Client.Interfaces.Placement;
|
using Robust.Client.Interfaces.Placement;
|
||||||
using Robust.Client.Interfaces.ResourceManagement;
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
using Robust.Client.Interfaces.State;
|
using Robust.Client.Interfaces.State;
|
||||||
using Robust.Client.State.States;
|
|
||||||
using Robust.Shared.Input;
|
using Robust.Shared.Input;
|
||||||
using Robust.Shared.Interfaces.Configuration;
|
using Robust.Shared.Interfaces.Configuration;
|
||||||
using Robust.Shared.Interfaces.Map;
|
using Robust.Shared.Interfaces.Map;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Content.Client.GameObjects.Components.Mobs;
|
using Content.Client.GameObjects.Components.Mobs;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Robust.Client.Interfaces.GameObjects.Components;
|
using Robust.Client.Interfaces.GameObjects.Components;
|
||||||
using Robust.Client.Interfaces.ResourceManagement;
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
@@ -68,7 +69,7 @@ namespace Content.Client.GameObjects.Components.Actor
|
|||||||
(SubText = new Label
|
(SubText = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsVertical = SizeFlags.None,
|
SizeFlagsVertical = SizeFlags.None,
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelSubText}
|
StyleClasses = {StyleNano.StyleClassLabelSubText}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Content.Shared.GameObjects.Components.Chemistry;
|
using Content.Shared.GameObjects.Components.Chemistry;
|
||||||
@@ -49,7 +50,7 @@ namespace Content.Client.GameObjects.Components.Chemistry
|
|||||||
public StatusControl(InjectorComponent parent)
|
public StatusControl(InjectorComponent parent)
|
||||||
{
|
{
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
_label = new RichTextLabel { StyleClasses = { NanoStyle.StyleClassItemStatus } };
|
_label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } };
|
||||||
AddChild(_label);
|
AddChild(_label);
|
||||||
|
|
||||||
parent._uiUpdateNeeded = true;
|
parent._uiUpdateNeeded = true;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Shared.Chemistry;
|
using Content.Shared.Chemistry;
|
||||||
using Content.Shared.GameObjects.Components.Chemistry;
|
using Content.Shared.GameObjects.Components.Chemistry;
|
||||||
using Robust.Client.Graphics.Drawing;
|
using Robust.Client.Graphics.Drawing;
|
||||||
@@ -218,7 +219,7 @@ namespace Content.Client.GameObjects.Components.Chemistry
|
|||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = $"{state.BeakerCurrentVolume}/{state.BeakerMaxVolume}",
|
Text = $"{state.BeakerCurrentVolume}/{state.BeakerMaxVolume}",
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelSecondaryColor}
|
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -247,12 +248,12 @@ namespace Content.Client.GameObjects.Components.Chemistry
|
|||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = $"{name}: ",
|
Text = $"{name}: ",
|
||||||
StyleClasses = {NanoStyle.StyleClassPowerStateGood}
|
StyleClasses = {StyleNano.StyleClassPowerStateGood}
|
||||||
},
|
},
|
||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = $"{reagent.Quantity}u",
|
Text = $"{reagent.Quantity}u",
|
||||||
StyleClasses = {NanoStyle.StyleClassPowerStateGood}
|
StyleClasses = {StyleNano.StyleClassPowerStateGood}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -267,7 +268,7 @@ namespace Content.Client.GameObjects.Components.Chemistry
|
|||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = $"{reagent.Quantity}u",
|
Text = $"{reagent.Quantity}u",
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelSecondaryColor}
|
StyleClasses = {StyleNano.StyleClassLabelSecondaryColor}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Shared.GameObjects.Components.Instruments;
|
using Content.Shared.GameObjects.Components.Instruments;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Client.Audio.Midi;
|
using Robust.Client.Audio.Midi;
|
||||||
using Robust.Shared.Audio.Midi;
|
using Robust.Shared.Audio.Midi;
|
||||||
@@ -28,6 +29,7 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
[Dependency] private readonly IGameTiming _timing;
|
[Dependency] private readonly IGameTiming _timing;
|
||||||
#pragma warning restore 649
|
#pragma warning restore 649
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
private IMidiRenderer _renderer;
|
private IMidiRenderer _renderer;
|
||||||
private int _instrumentProgram = 1;
|
private int _instrumentProgram = 1;
|
||||||
|
|
||||||
@@ -42,8 +44,14 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public bool LoopMidi
|
public bool LoopMidi
|
||||||
{
|
{
|
||||||
get => _renderer.LoopMidi;
|
get => _renderer?.LoopMidi ?? false;
|
||||||
set => _renderer.LoopMidi = value;
|
set
|
||||||
|
{
|
||||||
|
if (_renderer != null)
|
||||||
|
{
|
||||||
|
_renderer.LoopMidi = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -53,9 +61,13 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
public int InstrumentProgram
|
public int InstrumentProgram
|
||||||
{
|
{
|
||||||
get => _instrumentProgram;
|
get => _instrumentProgram;
|
||||||
set {
|
set
|
||||||
|
{
|
||||||
_instrumentProgram = value;
|
_instrumentProgram = value;
|
||||||
_renderer.MidiProgram = _instrumentProgram;
|
if (_renderer != null)
|
||||||
|
{
|
||||||
|
_renderer.MidiProgram = _instrumentProgram;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,22 +75,26 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
/// Whether there's a midi song being played or not.
|
/// Whether there's a midi song being played or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public bool IsMidiOpen => _renderer.Status == MidiRendererStatus.File;
|
public bool IsMidiOpen => _renderer?.Status == MidiRendererStatus.File;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the midi renderer is listening for midi input or not.
|
/// Whether the midi renderer is listening for midi input or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
public bool IsInputOpen => _renderer.Status == MidiRendererStatus.Input;
|
public bool IsInputOpen => _renderer?.Status == MidiRendererStatus.Input;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
_renderer = _midiManager.GetNewRenderer();
|
_renderer = _midiManager.GetNewRenderer();
|
||||||
_renderer.MidiProgram = _instrumentProgram;
|
|
||||||
_renderer.TrackingEntity = Owner;
|
if (_renderer != null)
|
||||||
_renderer.OnMidiPlayerFinished += () => { OnMidiPlaybackEnded?.Invoke(); };
|
{
|
||||||
|
_renderer.MidiProgram = _instrumentProgram;
|
||||||
|
_renderer.TrackingEntity = Owner;
|
||||||
|
_renderer.OnMidiPlayerFinished += () => { OnMidiPlaybackEnded?.Invoke(); };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Shutdown()
|
protected override void Shutdown()
|
||||||
@@ -93,9 +109,16 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
serializer.DataField(ref _instrumentProgram, "program", 1);
|
serializer.DataField(ref _instrumentProgram, "program", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
|
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null,
|
||||||
|
IComponent component = null)
|
||||||
{
|
{
|
||||||
base.HandleMessage(message, netChannel, component);
|
base.HandleMessage(message, netChannel, component);
|
||||||
|
|
||||||
|
if (_renderer == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case InstrumentMidiEventMessage midiEventMessage:
|
case InstrumentMidiEventMessage midiEventMessage:
|
||||||
@@ -107,8 +130,8 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
|
|
||||||
case InstrumentStopMidiMessage _:
|
case InstrumentStopMidiMessage _:
|
||||||
_renderer.StopAllNotes();
|
_renderer.StopAllNotes();
|
||||||
if(IsInputOpen) CloseInput();
|
if (IsInputOpen) CloseInput();
|
||||||
if(IsMidiOpen) CloseMidi();
|
if (IsMidiOpen) CloseMidi();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +139,7 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
/// <inheritdoc cref="MidiRenderer.OpenInput"/>
|
/// <inheritdoc cref="MidiRenderer.OpenInput"/>
|
||||||
public bool OpenInput()
|
public bool OpenInput()
|
||||||
{
|
{
|
||||||
if (_renderer.OpenInput())
|
if (_renderer != null && _renderer.OpenInput())
|
||||||
{
|
{
|
||||||
_renderer.OnMidiEvent += RendererOnMidiEvent;
|
_renderer.OnMidiEvent += RendererOnMidiEvent;
|
||||||
return true;
|
return true;
|
||||||
@@ -128,28 +151,37 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
/// <inheritdoc cref="MidiRenderer.CloseInput"/>
|
/// <inheritdoc cref="MidiRenderer.CloseInput"/>
|
||||||
public bool CloseInput()
|
public bool CloseInput()
|
||||||
{
|
{
|
||||||
if (!_renderer.CloseInput()) return false;
|
if (_renderer == null || !_renderer.CloseInput())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_renderer.OnMidiEvent -= RendererOnMidiEvent;
|
_renderer.OnMidiEvent -= RendererOnMidiEvent;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="MidiRenderer.OpenMidi(string)"/>
|
/// <inheritdoc cref="MidiRenderer.OpenMidi(string)"/>
|
||||||
public bool OpenMidi(string filename)
|
public bool OpenMidi(string filename)
|
||||||
{
|
{
|
||||||
if (!_renderer.OpenMidi(filename)) return false;
|
if (_renderer == null || !_renderer.OpenMidi(filename))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_renderer.OnMidiEvent += RendererOnMidiEvent;
|
_renderer.OnMidiEvent += RendererOnMidiEvent;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="MidiRenderer.CloseMidi"/>
|
/// <inheritdoc cref="MidiRenderer.CloseMidi"/>
|
||||||
public bool CloseMidi()
|
public bool CloseMidi()
|
||||||
{
|
{
|
||||||
if (!_renderer.CloseMidi()) return false;
|
if (_renderer == null || !_renderer.CloseMidi())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_renderer.OnMidiEvent -= RendererOnMidiEvent;
|
_renderer.OnMidiEvent -= RendererOnMidiEvent;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Shared.Preferences.Appearance;
|
using Content.Shared.Preferences.Appearance;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Client.GameObjects.Components.UserInterface;
|
using Robust.Client.GameObjects.Components.UserInterface;
|
||||||
@@ -126,9 +127,9 @@ namespace Content.Client.GameObjects.Components
|
|||||||
var vBox = new VBoxContainer();
|
var vBox = new VBoxContainer();
|
||||||
AddChild(vBox);
|
AddChild(vBox);
|
||||||
|
|
||||||
vBox.AddChild(_colorSliderR = new ColorSlider(NanoStyle.StyleClassSliderRed));
|
vBox.AddChild(_colorSliderR = new ColorSlider(StyleNano.StyleClassSliderRed));
|
||||||
vBox.AddChild(_colorSliderG = new ColorSlider(NanoStyle.StyleClassSliderGreen));
|
vBox.AddChild(_colorSliderG = new ColorSlider(StyleNano.StyleClassSliderGreen));
|
||||||
vBox.AddChild(_colorSliderB = new ColorSlider(NanoStyle.StyleClassSliderBlue));
|
vBox.AddChild(_colorSliderB = new ColorSlider(StyleNano.StyleClassSliderBlue));
|
||||||
|
|
||||||
Action colorValueChanged = ColorValueChanged;
|
Action colorValueChanged = ColorValueChanged;
|
||||||
_colorSliderR.OnValueChanged += colorValueChanged;
|
_colorSliderR.OnValueChanged += colorValueChanged;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Shared.GameObjects.Components.Power;
|
using Content.Shared.GameObjects.Components.Power;
|
||||||
using Robust.Client.GameObjects.Components.UserInterface;
|
using Robust.Client.GameObjects.Components.UserInterface;
|
||||||
using Robust.Client.Graphics.Drawing;
|
using Robust.Client.Graphics.Drawing;
|
||||||
@@ -47,15 +48,15 @@ namespace Content.Client.GameObjects.Components.Power
|
|||||||
{
|
{
|
||||||
case ApcExternalPowerState.None:
|
case ApcExternalPowerState.None:
|
||||||
_externalPowerStateLabel.Text = "None";
|
_externalPowerStateLabel.Text = "None";
|
||||||
_externalPowerStateLabel.SetOnlyStyleClass(NanoStyle.StyleClassPowerStateNone);
|
_externalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateNone);
|
||||||
break;
|
break;
|
||||||
case ApcExternalPowerState.Low:
|
case ApcExternalPowerState.Low:
|
||||||
_externalPowerStateLabel.Text = "Low";
|
_externalPowerStateLabel.Text = "Low";
|
||||||
_externalPowerStateLabel.SetOnlyStyleClass(NanoStyle.StyleClassPowerStateLow);
|
_externalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateLow);
|
||||||
break;
|
break;
|
||||||
case ApcExternalPowerState.Good:
|
case ApcExternalPowerState.Good:
|
||||||
_externalPowerStateLabel.Text = "Good";
|
_externalPowerStateLabel.Text = "Good";
|
||||||
_externalPowerStateLabel.SetOnlyStyleClass(NanoStyle.StyleClassPowerStateGood);
|
_externalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
@@ -140,7 +141,7 @@ namespace Content.Client.GameObjects.Components.Power
|
|||||||
var externalStatus = new HBoxContainer();
|
var externalStatus = new HBoxContainer();
|
||||||
var externalStatusLabel = new Label {Text = "External Power: "};
|
var externalStatusLabel = new Label {Text = "External Power: "};
|
||||||
ExternalPowerStateLabel = new Label {Text = "Good"};
|
ExternalPowerStateLabel = new Label {Text = "Good"};
|
||||||
ExternalPowerStateLabel.SetOnlyStyleClass(NanoStyle.StyleClassPowerStateGood);
|
ExternalPowerStateLabel.SetOnlyStyleClass(StyleNano.StyleClassPowerStateGood);
|
||||||
externalStatus.AddChild(externalStatusLabel);
|
externalStatus.AddChild(externalStatusLabel);
|
||||||
externalStatus.AddChild(ExternalPowerStateLabel);
|
externalStatus.AddChild(ExternalPowerStateLabel);
|
||||||
rows.AddChild(externalStatus);
|
rows.AddChild(externalStatus);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Content.Shared.GameObjects.Components;
|
using Content.Shared.GameObjects.Components;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
@@ -38,7 +39,7 @@ namespace Content.Client.GameObjects.Components
|
|||||||
public StatusControl(StackComponent parent)
|
public StatusControl(StackComponent parent)
|
||||||
{
|
{
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
_label = new RichTextLabel {StyleClasses = {NanoStyle.StyleClassItemStatus}};
|
_label = new RichTextLabel {StyleClasses = {StyleNano.StyleClassItemStatus}};
|
||||||
AddChild(_label);
|
AddChild(_label);
|
||||||
|
|
||||||
parent._uiUpdateNeeded = true;
|
parent._uiUpdateNeeded = true;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Client.Animations;
|
using Content.Client.Animations;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
using Content.Shared.GameObjects.Components.Weapons.Ranged;
|
using Content.Shared.GameObjects.Components.Weapons.Ranged;
|
||||||
@@ -174,7 +175,7 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged
|
|||||||
(_noMagazineLabel = new Label
|
(_noMagazineLabel = new Label
|
||||||
{
|
{
|
||||||
Text = "No Magazine!",
|
Text = "No Magazine!",
|
||||||
StyleClasses = {NanoStyle.StyleClassItemStatus}
|
StyleClasses = {StyleNano.StyleClassItemStatus}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
using Content.Shared.GameObjects.Components;
|
using Content.Shared.GameObjects.Components;
|
||||||
@@ -46,7 +47,7 @@ namespace Content.Client.GameObjects.Components
|
|||||||
public StatusControl(WelderComponent parent)
|
public StatusControl(WelderComponent parent)
|
||||||
{
|
{
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
_label = new RichTextLabel {StyleClasses = {NanoStyle.StyleClassItemStatus}};
|
_label = new RichTextLabel {StyleClasses = {StyleNano.StyleClassItemStatus}};
|
||||||
AddChild(_label);
|
AddChild(_label);
|
||||||
|
|
||||||
parent._uiUpdateNeeded = true;
|
parent._uiUpdateNeeded = true;
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
using Content.Client.GameObjects.Components.Instruments;
|
using Content.Client.GameObjects.Components.Instruments;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Robust.Client.Audio.Midi;
|
using Robust.Client.Audio.Midi;
|
||||||
|
using Robust.Client.Graphics.Drawing;
|
||||||
using Robust.Client.Interfaces.UserInterface;
|
using Robust.Client.Interfaces.UserInterface;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
|
||||||
@@ -27,7 +30,7 @@ namespace Content.Client.Instruments
|
|||||||
public InstrumentMenu(InstrumentBoundUserInterface owner)
|
public InstrumentMenu(InstrumentBoundUserInterface owner)
|
||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
Title = "Instrument";
|
Title = Loc.GetString("Instrument");
|
||||||
|
|
||||||
_owner = owner;
|
_owner = owner;
|
||||||
|
|
||||||
@@ -55,7 +58,7 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
midiInputButton = new Button()
|
midiInputButton = new Button()
|
||||||
{
|
{
|
||||||
Text = "MIDI Input",
|
Text = Loc.GetString("MIDI Input"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
@@ -73,7 +76,7 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
var midiFileButton = new Button()
|
var midiFileButton = new Button()
|
||||||
{
|
{
|
||||||
Text = "Open File",
|
Text = Loc.GetString("Play MIDI File"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
@@ -91,7 +94,7 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
midiLoopButton = new Button()
|
midiLoopButton = new Button()
|
||||||
{
|
{
|
||||||
Text = "Loop",
|
Text = Loc.GetString("Loop"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
@@ -110,7 +113,7 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
midiStopButton = new Button()
|
midiStopButton = new Button()
|
||||||
{
|
{
|
||||||
Text = "Stop",
|
Text = Loc.GetString("Stop"),
|
||||||
TextAlign = Label.AlignMode.Center,
|
TextAlign = Label.AlignMode.Center,
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
SizeFlagsStretchRatio = 1,
|
SizeFlagsStretchRatio = 1,
|
||||||
@@ -132,6 +135,26 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
margin.AddChild(vBox);
|
margin.AddChild(vBox);
|
||||||
|
|
||||||
|
if (!_midiManager.IsAvailable)
|
||||||
|
{
|
||||||
|
margin.AddChild(new PanelContainer
|
||||||
|
{
|
||||||
|
MouseFilter = MouseFilterMode.Stop,
|
||||||
|
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Black.WithAlpha(0.90f)},
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new Label
|
||||||
|
{
|
||||||
|
Align = Label.AlignMode.Center,
|
||||||
|
SizeFlagsVertical = SizeFlags.ShrinkCenter,
|
||||||
|
SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
|
||||||
|
StyleClasses = {StyleNano.StyleClassLabelBig},
|
||||||
|
Text = Loc.GetString("MIDI support is currently\nnot available on your platform.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Contents.AddChild(margin);
|
Contents.AddChild(margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +171,8 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
private async void MidiFileButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
|
private async void MidiFileButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
|
||||||
{
|
{
|
||||||
var filename = await _fileDialogManager.OpenFile();
|
var filters = new FileDialogFilters(new FileDialogFilters.Group("mid", "midi"));
|
||||||
|
var filename = await _fileDialogManager.OpenFile(filters);
|
||||||
|
|
||||||
if (filename == null) return;
|
if (filename == null) return;
|
||||||
|
|
||||||
@@ -160,7 +184,7 @@ namespace Content.Client.Instruments
|
|||||||
|
|
||||||
if (!_owner.Instrument.OpenMidi(filename)) return;
|
if (!_owner.Instrument.OpenMidi(filename)) return;
|
||||||
MidiPlaybackSetButtonsDisabled(false);
|
MidiPlaybackSetButtonsDisabled(false);
|
||||||
if(midiInputButton.Pressed)
|
if (midiInputButton.Pressed)
|
||||||
midiInputButton.Pressed = false;
|
midiInputButton.Pressed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
230
Content.Client/State/LauncherConnecting.cs
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
using Content.Client.UserInterface.Controls;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
|
using Content.Client.Utility;
|
||||||
|
using Robust.Client.Graphics.Drawing;
|
||||||
|
using Robust.Client.Interfaces;
|
||||||
|
using Robust.Client.Interfaces.UserInterface;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
using Robust.Shared.Interfaces.Network;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
|
using static Content.Client.StaticIoC;
|
||||||
|
|
||||||
|
namespace Content.Client.State
|
||||||
|
{
|
||||||
|
public class LauncherConnecting : Robust.Client.State.State
|
||||||
|
{
|
||||||
|
#pragma warning disable 649
|
||||||
|
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager;
|
||||||
|
[Dependency] private readonly IStylesheetManager _stylesheetManager;
|
||||||
|
[Dependency] private readonly IClientNetManager _clientNetManager;
|
||||||
|
[Dependency] private readonly IGameController _gameController;
|
||||||
|
#pragma warning restore 649
|
||||||
|
|
||||||
|
private Control _control;
|
||||||
|
private Label _connectStatus;
|
||||||
|
|
||||||
|
public override void Startup()
|
||||||
|
{
|
||||||
|
var panelTex = ResC.GetTexture("/Nano/button.svg.96dpi.png");
|
||||||
|
var back = new StyleBoxTexture
|
||||||
|
{
|
||||||
|
Texture = panelTex,
|
||||||
|
Modulate = new Color(32, 32, 48),
|
||||||
|
};
|
||||||
|
back.SetPatchMargin(StyleBox.Margin.All, 10);
|
||||||
|
|
||||||
|
Button exitButton;
|
||||||
|
Label connectFailReason;
|
||||||
|
Control connectingStatus;
|
||||||
|
|
||||||
|
var address = _gameController.LaunchState.Ss14Address ?? _gameController.LaunchState.ConnectAddress;
|
||||||
|
|
||||||
|
_control = new Control
|
||||||
|
{
|
||||||
|
Stylesheet = _stylesheetManager.SheetSpace,
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new PanelContainer
|
||||||
|
{
|
||||||
|
PanelOverride = back
|
||||||
|
},
|
||||||
|
new VBoxContainer
|
||||||
|
{
|
||||||
|
SeparationOverride = 0,
|
||||||
|
CustomMinimumSize = (300, 200),
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new HBoxContainer
|
||||||
|
{
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new MarginContainer
|
||||||
|
{
|
||||||
|
MarginLeftOverride = 8,
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new Label
|
||||||
|
{
|
||||||
|
Text = Loc.GetString("Space Station 14"),
|
||||||
|
StyleClasses = {StyleBase.StyleClassLabelHeading},
|
||||||
|
VAlign = Label.VAlignMode.Center
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
(exitButton = new Button
|
||||||
|
{
|
||||||
|
Text = Loc.GetString("Exit"),
|
||||||
|
SizeFlagsHorizontal = Control.SizeFlags.ShrinkEnd | Control.SizeFlags.Expand
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Line
|
||||||
|
new HighDivider(),
|
||||||
|
|
||||||
|
new MarginContainer
|
||||||
|
{
|
||||||
|
SizeFlagsVertical = Control.SizeFlags.FillExpand,
|
||||||
|
MarginLeftOverride = 4,
|
||||||
|
MarginRightOverride = 4,
|
||||||
|
MarginTopOverride = 4,
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new VBoxContainer
|
||||||
|
{
|
||||||
|
SeparationOverride = 0,
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new Control
|
||||||
|
{
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
(connectingStatus = new VBoxContainer
|
||||||
|
{
|
||||||
|
SeparationOverride = 0,
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new Label
|
||||||
|
{
|
||||||
|
Text = Loc.GetString("Connecting to server..."),
|
||||||
|
Align = Label.AlignMode.Center,
|
||||||
|
},
|
||||||
|
|
||||||
|
(_connectStatus = new Label
|
||||||
|
{
|
||||||
|
StyleClasses = {StyleBase.StyleClassLabelSubText},
|
||||||
|
Align = Label.AlignMode.Center,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
(connectFailReason = new Label
|
||||||
|
{
|
||||||
|
Align = Label.AlignMode.Center
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Padding.
|
||||||
|
new Control {CustomMinimumSize = (0, 8)},
|
||||||
|
|
||||||
|
new Label
|
||||||
|
{
|
||||||
|
Text = address,
|
||||||
|
StyleClasses = {StyleBase.StyleClassLabelSubText},
|
||||||
|
SizeFlagsHorizontal = Control.SizeFlags.ShrinkCenter,
|
||||||
|
SizeFlagsVertical =
|
||||||
|
Control.SizeFlags.ShrinkEnd | Control.SizeFlags.Expand,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Line
|
||||||
|
new PanelContainer
|
||||||
|
{
|
||||||
|
PanelOverride = new StyleBoxFlat
|
||||||
|
{
|
||||||
|
BackgroundColor = Color.FromHex("#444"),
|
||||||
|
ContentMarginTopOverride = 2
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
new MarginContainer
|
||||||
|
{
|
||||||
|
MarginLeftOverride = 12,
|
||||||
|
MarginRightOverride = 4,
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new HBoxContainer
|
||||||
|
{
|
||||||
|
SizeFlagsVertical = Control.SizeFlags.ShrinkEnd,
|
||||||
|
Children =
|
||||||
|
{
|
||||||
|
new Label
|
||||||
|
{
|
||||||
|
Text = Loc.GetString("Don't die!"),
|
||||||
|
StyleClasses = {StyleBase.StyleClassLabelSubText}
|
||||||
|
},
|
||||||
|
new Label
|
||||||
|
{
|
||||||
|
Text = "ver 0.1",
|
||||||
|
SizeFlagsHorizontal =
|
||||||
|
Control.SizeFlags.Expand | Control.SizeFlags.ShrinkEnd,
|
||||||
|
StyleClasses = {StyleBase.StyleClassLabelSubText}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_userInterfaceManager.StateRoot.AddChild(_control);
|
||||||
|
|
||||||
|
LayoutContainer.SetAnchorPreset(_control, LayoutContainer.LayoutPreset.Center);
|
||||||
|
LayoutContainer.SetGrowHorizontal(_control, LayoutContainer.GrowDirection.Both);
|
||||||
|
LayoutContainer.SetGrowVertical(_control, LayoutContainer.GrowDirection.Both);
|
||||||
|
|
||||||
|
exitButton.OnPressed += args =>
|
||||||
|
{
|
||||||
|
_gameController.Shutdown("Exit button pressed");
|
||||||
|
};
|
||||||
|
|
||||||
|
_clientNetManager.ConnectFailed += (sender, args) =>
|
||||||
|
{
|
||||||
|
connectFailReason.Text = Loc.GetString("Failed to connect to server:\n{0}", args.Reason);
|
||||||
|
connectingStatus.Visible = false;
|
||||||
|
connectFailReason.Visible = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
_clientNetManager.ClientConnectStateChanged += ConnectStateChanged;
|
||||||
|
|
||||||
|
ConnectStateChanged(_clientNetManager.ClientConnectState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ConnectStateChanged(ClientConnectionState state)
|
||||||
|
{
|
||||||
|
_connectStatus.Text = Loc.GetString(state switch
|
||||||
|
{
|
||||||
|
ClientConnectionState.NotConnecting => "Not connecting?",
|
||||||
|
ClientConnectionState.ResolvingHost => "Resolving server address...",
|
||||||
|
ClientConnectionState.EstablishingConnection => "Establishing initial connection...",
|
||||||
|
ClientConnectionState.Handshake => "Doing handshake...",
|
||||||
|
ClientConnectionState.Connected => "Synchronizing game state...",
|
||||||
|
_ => state.ToString()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Shutdown()
|
||||||
|
{
|
||||||
|
_control.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
329
Content.Client/State/MainMenu.cs
Normal file
@@ -0,0 +1,329 @@
|
|||||||
|
using System;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using Robust.Client;
|
||||||
|
using Robust.Client.Interfaces;
|
||||||
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
|
using Robust.Client.Interfaces.UserInterface;
|
||||||
|
using Robust.Client.ResourceManagement;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
|
using Robust.Shared.Interfaces.Configuration;
|
||||||
|
using Robust.Shared.Interfaces.Network;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Log;
|
||||||
|
using Robust.Shared.Network;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
|
namespace Content.Client.State
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Main menu screen that is the first screen to be displayed when the game starts.
|
||||||
|
/// </summary>
|
||||||
|
// Instantiated dynamically through the StateManager, Dependencies will be resolved.
|
||||||
|
public class MainScreen : Robust.Client.State.State
|
||||||
|
{
|
||||||
|
private const string PublicServerAddress = "server.spacestation14.io";
|
||||||
|
|
||||||
|
#pragma warning disable 649
|
||||||
|
[Dependency] private readonly IBaseClient _client;
|
||||||
|
[Dependency] private readonly IClientNetManager _netManager;
|
||||||
|
[Dependency] private readonly IConfigurationManager _configurationManager;
|
||||||
|
[Dependency] private readonly IGameController _controllerProxy;
|
||||||
|
[Dependency] private readonly ILocalizationManager _loc;
|
||||||
|
[Dependency] private readonly IResourceCache _resourceCache;
|
||||||
|
[Dependency] private readonly IUserInterfaceManager userInterfaceManager;
|
||||||
|
#pragma warning restore 649
|
||||||
|
|
||||||
|
private MainMenuControl _mainMenuControl;
|
||||||
|
private OptionsMenu OptionsMenu;
|
||||||
|
private bool _isConnecting;
|
||||||
|
|
||||||
|
// ReSharper disable once InconsistentNaming
|
||||||
|
private static readonly Regex IPv6Regex = new Regex(@"\[(.*:.*:.*)](?::(\d+))?");
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void Startup()
|
||||||
|
{
|
||||||
|
_mainMenuControl = new MainMenuControl(_resourceCache, _configurationManager);
|
||||||
|
userInterfaceManager.StateRoot.AddChild(_mainMenuControl);
|
||||||
|
|
||||||
|
_mainMenuControl.QuitButton.OnPressed += QuitButtonPressed;
|
||||||
|
_mainMenuControl.OptionsButton.OnPressed += OptionsButtonPressed;
|
||||||
|
_mainMenuControl.DirectConnectButton.OnPressed += DirectConnectButtonPressed;
|
||||||
|
_mainMenuControl.JoinPublicServerButton.OnPressed += JoinPublicServerButtonPressed;
|
||||||
|
_mainMenuControl.AddressBox.OnTextEntered += AddressBoxEntered;
|
||||||
|
|
||||||
|
_client.RunLevelChanged += RunLevelChanged;
|
||||||
|
|
||||||
|
OptionsMenu = new OptionsMenu(_configurationManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void Shutdown()
|
||||||
|
{
|
||||||
|
_client.RunLevelChanged -= RunLevelChanged;
|
||||||
|
_netManager.ConnectFailed -= _onConnectFailed;
|
||||||
|
|
||||||
|
_mainMenuControl.Dispose();
|
||||||
|
OptionsMenu.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void QuitButtonPressed(BaseButton.ButtonEventArgs args)
|
||||||
|
{
|
||||||
|
_controllerProxy.Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OptionsButtonPressed(BaseButton.ButtonEventArgs args)
|
||||||
|
{
|
||||||
|
OptionsMenu.OpenCentered();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DirectConnectButtonPressed(BaseButton.ButtonEventArgs args)
|
||||||
|
{
|
||||||
|
var input = _mainMenuControl.AddressBox;
|
||||||
|
TryConnect(input.Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void JoinPublicServerButtonPressed(BaseButton.ButtonEventArgs args)
|
||||||
|
{
|
||||||
|
TryConnect(PublicServerAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddressBoxEntered(LineEdit.LineEditEventArgs args)
|
||||||
|
{
|
||||||
|
if (_isConnecting)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TryConnect(args.Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TryConnect(string address)
|
||||||
|
{
|
||||||
|
var inputName = _mainMenuControl.UserNameBox.Text.Trim();
|
||||||
|
var (nameValid, invalidReason) = UsernameHelpers.IsNameValid(inputName);
|
||||||
|
if (!nameValid)
|
||||||
|
{
|
||||||
|
invalidReason = _loc.GetString(invalidReason);
|
||||||
|
userInterfaceManager.Popup(
|
||||||
|
_loc.GetString("Invalid username:\n{0}", invalidReason),
|
||||||
|
_loc.GetString("Invalid Username"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var configName = _configurationManager.GetCVar<string>("player.name");
|
||||||
|
if (_mainMenuControl.UserNameBox.Text != configName)
|
||||||
|
{
|
||||||
|
_configurationManager.SetCVar("player.name", inputName);
|
||||||
|
_configurationManager.SaveToFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
_setConnectingState(true);
|
||||||
|
_netManager.ConnectFailed += _onConnectFailed;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ParseAddress(address, out var ip, out var port);
|
||||||
|
_client.ConnectToServer(ip, port);
|
||||||
|
}
|
||||||
|
catch (ArgumentException e)
|
||||||
|
{
|
||||||
|
userInterfaceManager.Popup($"Unable to connect: {e.Message}", "Connection error.");
|
||||||
|
Logger.Warning(e.ToString());
|
||||||
|
_netManager.ConnectFailed -= _onConnectFailed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RunLevelChanged(object obj, RunLevelChangedEventArgs args)
|
||||||
|
{
|
||||||
|
if (args.NewLevel == ClientRunLevel.Initialize)
|
||||||
|
{
|
||||||
|
_setConnectingState(false);
|
||||||
|
_netManager.ConnectFailed -= _onConnectFailed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ParseAddress(string address, out string ip, out ushort port)
|
||||||
|
{
|
||||||
|
var match6 = IPv6Regex.Match(address);
|
||||||
|
if (match6 != Match.Empty)
|
||||||
|
{
|
||||||
|
ip = match6.Groups[1].Value;
|
||||||
|
if (!match6.Groups[2].Success)
|
||||||
|
{
|
||||||
|
port = _client.DefaultPort;
|
||||||
|
}
|
||||||
|
else if (!ushort.TryParse(match6.Groups[2].Value, out port))
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Not a valid port.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// See if the IP includes a port.
|
||||||
|
var split = address.Split(':');
|
||||||
|
ip = address;
|
||||||
|
port = _client.DefaultPort;
|
||||||
|
if (split.Length > 2)
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Not a valid Address.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// IP:port format.
|
||||||
|
if (split.Length == 2)
|
||||||
|
{
|
||||||
|
ip = split[0];
|
||||||
|
if (!ushort.TryParse(split[1], out port))
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Not a valid port.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _onConnectFailed(object _, NetConnectFailArgs args)
|
||||||
|
{
|
||||||
|
userInterfaceManager.Popup($"Failed to connect:\n{args.Reason}");
|
||||||
|
_netManager.ConnectFailed -= _onConnectFailed;
|
||||||
|
_setConnectingState(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _setConnectingState(bool state)
|
||||||
|
{
|
||||||
|
_isConnecting = state;
|
||||||
|
_mainMenuControl.DirectConnectButton.Disabled = state;
|
||||||
|
#if FULL_RELEASE
|
||||||
|
_mainMenuControl.JoinPublicServerButton.Disabled = state;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class MainMenuControl : Control
|
||||||
|
{
|
||||||
|
private readonly IResourceCache _resourceCache;
|
||||||
|
private readonly IConfigurationManager _configurationManager;
|
||||||
|
|
||||||
|
public LineEdit UserNameBox { get; private set; }
|
||||||
|
public Button JoinPublicServerButton { get; private set; }
|
||||||
|
public LineEdit AddressBox { get; private set; }
|
||||||
|
public Button DirectConnectButton { get; private set; }
|
||||||
|
public Button OptionsButton { get; private set; }
|
||||||
|
public Button QuitButton { get; private set; }
|
||||||
|
public Label VersionLabel { get; private set; }
|
||||||
|
|
||||||
|
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
|
||||||
|
{
|
||||||
|
_resourceCache = resCache;
|
||||||
|
_configurationManager = configMan;
|
||||||
|
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PerformLayout()
|
||||||
|
{
|
||||||
|
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
||||||
|
|
||||||
|
var layout = new LayoutContainer();
|
||||||
|
AddChild(layout);
|
||||||
|
|
||||||
|
var vBox = new VBoxContainer
|
||||||
|
{
|
||||||
|
StyleIdentifier = "mainMenuVBox"
|
||||||
|
};
|
||||||
|
|
||||||
|
layout.AddChild(vBox);
|
||||||
|
LayoutContainer.SetAnchorPreset(vBox, LayoutContainer.LayoutPreset.TopRight);
|
||||||
|
LayoutContainer.SetMarginRight(vBox, -25);
|
||||||
|
LayoutContainer.SetMarginTop(vBox, 30);
|
||||||
|
LayoutContainer.SetGrowHorizontal(vBox, LayoutContainer.GrowDirection.Begin);
|
||||||
|
|
||||||
|
var logoTexture = _resourceCache.GetResource<TextureResource>("/Textures/Logo/logo.png");
|
||||||
|
var logo = new TextureRect
|
||||||
|
{
|
||||||
|
Texture = logoTexture,
|
||||||
|
Stretch = TextureRect.StretchMode.KeepCentered,
|
||||||
|
};
|
||||||
|
vBox.AddChild(logo);
|
||||||
|
|
||||||
|
var userNameHBox = new HBoxContainer {SeparationOverride = 4};
|
||||||
|
vBox.AddChild(userNameHBox);
|
||||||
|
userNameHBox.AddChild(new Label {Text = "Username:"});
|
||||||
|
|
||||||
|
var currentUserName = _configurationManager.GetCVar<string>("player.name");
|
||||||
|
UserNameBox = new LineEdit
|
||||||
|
{
|
||||||
|
Text = currentUserName, PlaceHolder = "Username",
|
||||||
|
SizeFlagsHorizontal = SizeFlags.FillExpand
|
||||||
|
};
|
||||||
|
|
||||||
|
userNameHBox.AddChild(UserNameBox);
|
||||||
|
|
||||||
|
JoinPublicServerButton = new Button
|
||||||
|
{
|
||||||
|
Text = "Join Public Server",
|
||||||
|
StyleIdentifier = "mainMenu",
|
||||||
|
TextAlign = Label.AlignMode.Center,
|
||||||
|
#if !FULL_RELEASE
|
||||||
|
Disabled = true,
|
||||||
|
ToolTip = "Cannot connect to public server with a debug build."
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
vBox.AddChild(JoinPublicServerButton);
|
||||||
|
|
||||||
|
// Separator.
|
||||||
|
vBox.AddChild(new Control {CustomMinimumSize = (0, 2)});
|
||||||
|
|
||||||
|
AddressBox = new LineEdit
|
||||||
|
{
|
||||||
|
Text = "localhost",
|
||||||
|
PlaceHolder = "server address:port",
|
||||||
|
SizeFlagsHorizontal = SizeFlags.FillExpand
|
||||||
|
};
|
||||||
|
|
||||||
|
vBox.AddChild(AddressBox);
|
||||||
|
|
||||||
|
DirectConnectButton = new Button
|
||||||
|
{
|
||||||
|
Text = "Direct Connect",
|
||||||
|
TextAlign = Label.AlignMode.Center,
|
||||||
|
StyleIdentifier = "mainMenu",
|
||||||
|
};
|
||||||
|
|
||||||
|
vBox.AddChild(DirectConnectButton);
|
||||||
|
|
||||||
|
// Separator.
|
||||||
|
vBox.AddChild(new Control {CustomMinimumSize = (0, 2)});
|
||||||
|
|
||||||
|
OptionsButton = new Button
|
||||||
|
{
|
||||||
|
Text = "Options",
|
||||||
|
TextAlign = Label.AlignMode.Center,
|
||||||
|
StyleIdentifier = "mainMenu",
|
||||||
|
};
|
||||||
|
|
||||||
|
vBox.AddChild(OptionsButton);
|
||||||
|
|
||||||
|
QuitButton = new Button
|
||||||
|
{
|
||||||
|
Text = "Quit",
|
||||||
|
TextAlign = Label.AlignMode.Center,
|
||||||
|
StyleIdentifier = "mainMenu",
|
||||||
|
};
|
||||||
|
|
||||||
|
vBox.AddChild(QuitButton);
|
||||||
|
|
||||||
|
VersionLabel = new Label
|
||||||
|
{
|
||||||
|
Text = $"v0.1"
|
||||||
|
};
|
||||||
|
|
||||||
|
LayoutContainer.SetAnchorPreset(VersionLabel, LayoutContainer.LayoutPreset.BottomRight);
|
||||||
|
LayoutContainer.SetGrowHorizontal(VersionLabel, LayoutContainer.GrowDirection.Begin);
|
||||||
|
LayoutContainer.SetGrowVertical(VersionLabel, LayoutContainer.GrowDirection.Begin);
|
||||||
|
layout.AddChild(VersionLabel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ using Robust.Shared.Localization;
|
|||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
|
|
||||||
namespace Content.Client.UserInterface.Cargo
|
namespace Content.Client.UserInterface.Cargo
|
||||||
{
|
{
|
||||||
@@ -57,7 +58,7 @@ namespace Content.Client.UserInterface.Cargo
|
|||||||
var accountName = new HBoxContainer();
|
var accountName = new HBoxContainer();
|
||||||
var accountNameLabel = new Label {
|
var accountNameLabel = new Label {
|
||||||
Text = _loc.GetString("Account Name: "),
|
Text = _loc.GetString("Account Name: "),
|
||||||
StyleClasses = { NanoStyle.StyleClassLabelKeyText }
|
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||||
};
|
};
|
||||||
_accountNameLabel = new Label {
|
_accountNameLabel = new Label {
|
||||||
Text = "None" //Owner.Bank.Account.Name
|
Text = "None" //Owner.Bank.Account.Name
|
||||||
@@ -70,7 +71,7 @@ namespace Content.Client.UserInterface.Cargo
|
|||||||
var pointsLabel = new Label
|
var pointsLabel = new Label
|
||||||
{
|
{
|
||||||
Text = _loc.GetString("Points: "),
|
Text = _loc.GetString("Points: "),
|
||||||
StyleClasses = { NanoStyle.StyleClassLabelKeyText }
|
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||||
};
|
};
|
||||||
_pointsLabel = new Label
|
_pointsLabel = new Label
|
||||||
{
|
{
|
||||||
@@ -84,7 +85,7 @@ namespace Content.Client.UserInterface.Cargo
|
|||||||
var shuttleStatusLabel = new Label
|
var shuttleStatusLabel = new Label
|
||||||
{
|
{
|
||||||
Text = _loc.GetString("Shuttle Status: "),
|
Text = _loc.GetString("Shuttle Status: "),
|
||||||
StyleClasses = { NanoStyle.StyleClassLabelKeyText }
|
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||||
};
|
};
|
||||||
_shuttleStatusLabel = new Label
|
_shuttleStatusLabel = new Label
|
||||||
{
|
{
|
||||||
@@ -410,13 +411,13 @@ namespace Content.Client.UserInterface.Cargo
|
|||||||
ProductName = new Label
|
ProductName = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
StyleClasses = { NanoStyle.StyleClassLabelSubText },
|
StyleClasses = { StyleNano.StyleClassLabelSubText },
|
||||||
ClipText = true
|
ClipText = true
|
||||||
};
|
};
|
||||||
Description = new Label
|
Description = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
StyleClasses = { NanoStyle.StyleClassLabelSubText },
|
StyleClasses = { StyleNano.StyleClassLabelSubText },
|
||||||
ClipText = true
|
ClipText = true
|
||||||
};
|
};
|
||||||
vBox.AddChild(ProductName);
|
vBox.AddChild(ProductName);
|
||||||
@@ -426,14 +427,14 @@ namespace Content.Client.UserInterface.Cargo
|
|||||||
Approve = new Button
|
Approve = new Button
|
||||||
{
|
{
|
||||||
Text = "Approve",
|
Text = "Approve",
|
||||||
StyleClasses = { NanoStyle.StyleClassLabelSubText }
|
StyleClasses = { StyleNano.StyleClassLabelSubText }
|
||||||
};
|
};
|
||||||
hBox.AddChild(Approve);
|
hBox.AddChild(Approve);
|
||||||
|
|
||||||
Cancel = new Button
|
Cancel = new Button
|
||||||
{
|
{
|
||||||
Text = "Cancel",
|
Text = "Cancel",
|
||||||
StyleClasses = { NanoStyle.StyleClassLabelSubText }
|
StyleClasses = { StyleNano.StyleClassLabelSubText }
|
||||||
};
|
};
|
||||||
hBox.AddChild(Cancel);
|
hBox.AddChild(Cancel);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.GameObjects.Components.Mobs;
|
using Content.Client.GameObjects.Components.Mobs;
|
||||||
using Content.Client.Interfaces;
|
using Content.Client.Interfaces;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Content.Shared.Jobs;
|
using Content.Shared.Jobs;
|
||||||
using Content.Shared.Preferences;
|
using Content.Shared.Preferences;
|
||||||
@@ -67,7 +68,7 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkEnd,
|
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkEnd,
|
||||||
Text = Loc.GetString("Save and close"),
|
Text = Loc.GetString("Save and close"),
|
||||||
StyleClasses = {NanoStyle.StyleClassButtonBig}
|
StyleClasses = {StyleNano.StyleClassButtonBig}
|
||||||
};
|
};
|
||||||
|
|
||||||
var topHBox = new HBoxContainer
|
var topHBox = new HBoxContainer
|
||||||
@@ -83,7 +84,7 @@ namespace Content.Client.UserInterface
|
|||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Character Setup"),
|
Text = Loc.GetString("Character Setup"),
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelHeadingBigger},
|
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
||||||
VAlign = Label.VAlignMode.Center,
|
VAlign = Label.VAlignMode.Center,
|
||||||
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkCenter
|
SizeFlagsHorizontal = SizeFlags.Expand | SizeFlags.ShrinkCenter
|
||||||
}
|
}
|
||||||
@@ -99,7 +100,7 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
PanelOverride = new StyleBoxFlat
|
PanelOverride = new StyleBoxFlat
|
||||||
{
|
{
|
||||||
BackgroundColor = NanoStyle.NanoGold,
|
BackgroundColor = StyleNano.NanoGold,
|
||||||
ContentMarginTopOverride = 2
|
ContentMarginTopOverride = 2
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -146,7 +147,7 @@ namespace Content.Client.UserInterface
|
|||||||
|
|
||||||
hBox.AddChild(new PanelContainer
|
hBox.AddChild(new PanelContainer
|
||||||
{
|
{
|
||||||
PanelOverride = new StyleBoxFlat {BackgroundColor = NanoStyle.NanoGold},
|
PanelOverride = new StyleBoxFlat {BackgroundColor = StyleNano.NanoGold},
|
||||||
CustomMinimumSize = (2, 0)
|
CustomMinimumSize = (2, 0)
|
||||||
});
|
});
|
||||||
_humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager);
|
_humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager);
|
||||||
|
|||||||
14
Content.Client/UserInterface/Controls/HighDivider.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
|
||||||
|
namespace Content.Client.UserInterface.Controls
|
||||||
|
{
|
||||||
|
public sealed class HighDivider : Control
|
||||||
|
{
|
||||||
|
public HighDivider()
|
||||||
|
{
|
||||||
|
Children.Add(new PanelContainer {StyleClasses = {StyleBase.ClassHighDivider}});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.GameObjects.Components;
|
using Content.Client.GameObjects.Components;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Robust.Client.Graphics.Drawing;
|
using Robust.Client.Graphics.Drawing;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
@@ -57,7 +58,7 @@ namespace Content.Client.UserInterface
|
|||||||
(_itemNameLabel = new Label
|
(_itemNameLabel = new Label
|
||||||
{
|
{
|
||||||
ClipText = true,
|
ClipText = true,
|
||||||
StyleClasses = {NanoStyle.StyleClassItemStatus}
|
StyleClasses = {StyleNano.StyleClassItemStatus}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Content.Client.Chat;
|
using Content.Client.Chat;
|
||||||
using Content.Client.Interfaces;
|
using Content.Client.Interfaces;
|
||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Robust.Client.Graphics.Drawing;
|
using Robust.Client.Graphics.Drawing;
|
||||||
using Robust.Client.Interfaces.ResourceManagement;
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
@@ -69,7 +70,7 @@ namespace Content.Client.UserInterface
|
|||||||
new Label
|
new Label
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Lobby"),
|
Text = Loc.GetString("Lobby"),
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelHeadingBigger},
|
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
||||||
/*MarginBottom = 40,
|
/*MarginBottom = 40,
|
||||||
MarginLeft = 8,*/
|
MarginLeft = 8,*/
|
||||||
VAlign = Label.VAlignMode.Center
|
VAlign = Label.VAlignMode.Center
|
||||||
@@ -78,7 +79,7 @@ namespace Content.Client.UserInterface
|
|||||||
},
|
},
|
||||||
(ServerName = new Label
|
(ServerName = new Label
|
||||||
{
|
{
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelHeadingBigger},
|
StyleClasses = {StyleNano.StyleClassLabelHeadingBigger},
|
||||||
/*MarginBottom = 40,
|
/*MarginBottom = 40,
|
||||||
GrowHorizontal = GrowDirection.Both,*/
|
GrowHorizontal = GrowDirection.Both,*/
|
||||||
VAlign = Label.VAlignMode.Center,
|
VAlign = Label.VAlignMode.Center,
|
||||||
@@ -88,7 +89,7 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
|
SizeFlagsHorizontal = SizeFlags.ShrinkEnd,
|
||||||
Text = Loc.GetString("Leave"),
|
Text = Loc.GetString("Leave"),
|
||||||
StyleClasses = {NanoStyle.StyleClassButtonBig},
|
StyleClasses = {StyleNano.StyleClassButtonBig},
|
||||||
//GrowHorizontal = GrowDirection.Begin
|
//GrowHorizontal = GrowDirection.Begin
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -100,7 +101,7 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
PanelOverride = new StyleBoxFlat
|
PanelOverride = new StyleBoxFlat
|
||||||
{
|
{
|
||||||
BackgroundColor = NanoStyle.NanoGold,
|
BackgroundColor = StyleNano.NanoGold,
|
||||||
ContentMarginTopOverride = 2
|
ContentMarginTopOverride = 2
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -146,20 +147,20 @@ namespace Content.Client.UserInterface
|
|||||||
(ObserveButton = new Button
|
(ObserveButton = new Button
|
||||||
{
|
{
|
||||||
Text = Loc.GetString("Observe"),
|
Text = Loc.GetString("Observe"),
|
||||||
StyleClasses = {NanoStyle.StyleClassButtonBig}
|
StyleClasses = {StyleNano.StyleClassButtonBig}
|
||||||
}),
|
}),
|
||||||
(StartTime = new Label
|
(StartTime = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
Align = Label.AlignMode.Right,
|
Align = Label.AlignMode.Right,
|
||||||
FontColorOverride = Color.DarkGray,
|
FontColorOverride = Color.DarkGray,
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelBig}
|
StyleClasses = {StyleNano.StyleClassLabelBig}
|
||||||
}),
|
}),
|
||||||
(ReadyButton = new Button
|
(ReadyButton = new Button
|
||||||
{
|
{
|
||||||
ToggleMode = true,
|
ToggleMode = true,
|
||||||
Text = Loc.GetString("Ready Up"),
|
Text = Loc.GetString("Ready Up"),
|
||||||
StyleClasses = {NanoStyle.StyleClassButtonBig}
|
StyleClasses = {StyleNano.StyleClassButtonBig}
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,7 +189,7 @@ namespace Content.Client.UserInterface
|
|||||||
|
|
||||||
hBox.AddChild(new PanelContainer
|
hBox.AddChild(new PanelContainer
|
||||||
{
|
{
|
||||||
PanelOverride = new StyleBoxFlat {BackgroundColor = NanoStyle.NanoGold}, CustomMinimumSize = (2, 0)
|
PanelOverride = new StyleBoxFlat {BackgroundColor = StyleNano.NanoGold}, CustomMinimumSize = (2, 0)
|
||||||
});
|
});
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Content.Client.UserInterface.Stylesheets;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
Children = {(_label = new Label
|
Children = {(_label = new Label
|
||||||
{
|
{
|
||||||
StyleClasses = {NanoStyle.StyleClassLabelHeading}
|
StyleClasses = {StyleNano.StyleClassLabelHeading}
|
||||||
})}
|
})}
|
||||||
};
|
};
|
||||||
AddChild(_panel);
|
AddChild(_panel);
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Robust.Client.UserInterface;
|
||||||
|
|
||||||
|
namespace Content.Client.UserInterface.Stylesheets
|
||||||
|
{
|
||||||
|
public interface IStylesheetManager
|
||||||
|
{
|
||||||
|
Stylesheet SheetNano { get; }
|
||||||
|
Stylesheet SheetSpace { get; }
|
||||||
|
|
||||||
|
void Initialize();
|
||||||
|
}
|
||||||
|
}
|
||||||
47
Content.Client/UserInterface/Stylesheets/StyleBase.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
using Content.Client.Utility;
|
||||||
|
using Robust.Client.Graphics.Drawing;
|
||||||
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
|
||||||
|
namespace Content.Client.UserInterface.Stylesheets
|
||||||
|
{
|
||||||
|
public abstract class StyleBase
|
||||||
|
{
|
||||||
|
public const string ClassHighDivider = "HighDivider";
|
||||||
|
public const string StyleClassLabelHeading = "LabelHeading";
|
||||||
|
public const string StyleClassLabelSubText = "LabelSubText";
|
||||||
|
|
||||||
|
public abstract Stylesheet Stylesheet { get; }
|
||||||
|
|
||||||
|
protected StyleRule[] BaseRules { get; }
|
||||||
|
|
||||||
|
protected StyleBoxTexture BaseButton { get; }
|
||||||
|
|
||||||
|
protected StyleBase(IResourceCache resCache)
|
||||||
|
{
|
||||||
|
var notoSans12 = resCache.GetFont("/Nano/NotoSans/NotoSans-Regular.ttf", 12);
|
||||||
|
|
||||||
|
// Button styles.
|
||||||
|
var buttonTex = resCache.GetTexture("/Nano/button.svg.96dpi.png");
|
||||||
|
BaseButton = new StyleBoxTexture
|
||||||
|
{
|
||||||
|
Texture = buttonTex,
|
||||||
|
};
|
||||||
|
BaseButton.SetPatchMargin(StyleBox.Margin.All, 10);
|
||||||
|
BaseButton.SetPadding(StyleBox.Margin.All, 1);
|
||||||
|
BaseButton.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
||||||
|
BaseButton.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
|
||||||
|
|
||||||
|
BaseRules = new[]
|
||||||
|
{
|
||||||
|
// Default font.
|
||||||
|
new StyleRule(
|
||||||
|
new SelectorElement(null, null, null, null),
|
||||||
|
new[]
|
||||||
|
{
|
||||||
|
new StyleProperty("font", notoSans12),
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,29 +1,29 @@
|
|||||||
using Content.Client.GameObjects.EntitySystems;
|
using System.Linq;
|
||||||
|
using Content.Client.GameObjects.EntitySystems;
|
||||||
using Content.Client.Utility;
|
using Content.Client.Utility;
|
||||||
using Robust.Client.Graphics.Drawing;
|
using Robust.Client.Graphics.Drawing;
|
||||||
using Robust.Client.Interfaces.ResourceManagement;
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Shared.IoC;
|
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
|
||||||
namespace Content.Client.UserInterface
|
namespace Content.Client.UserInterface.Stylesheets
|
||||||
{
|
{
|
||||||
public sealed class NanoStyle
|
public sealed class StyleNano : StyleBase
|
||||||
{
|
{
|
||||||
public const string StyleClassSliderRed = "Red";
|
public const string StyleClassSliderRed = "Red";
|
||||||
public const string StyleClassSliderGreen = "Green";
|
public const string StyleClassSliderGreen = "Green";
|
||||||
public const string StyleClassSliderBlue = "Blue";
|
public const string StyleClassSliderBlue = "Blue";
|
||||||
|
|
||||||
public const string StyleClassLabelHeading = "LabelHeading";
|
|
||||||
public const string StyleClassLabelHeadingBigger = "LabelHeadingBigger";
|
public const string StyleClassLabelHeadingBigger = "LabelHeadingBigger";
|
||||||
public const string StyleClassLabelSubText = "LabelSubText";
|
|
||||||
public const string StyleClassLabelKeyText = "LabelKeyText";
|
public const string StyleClassLabelKeyText = "LabelKeyText";
|
||||||
public const string StyleClassLabelSecondaryColor = "LabelSecondaryColor";
|
public const string StyleClassLabelSecondaryColor = "LabelSecondaryColor";
|
||||||
public const string StyleClassLabelBig = "LabelBig";
|
public const string StyleClassLabelBig = "LabelBig";
|
||||||
public const string StyleClassButtonBig = "ButtonBig";
|
public const string StyleClassButtonBig = "ButtonBig";
|
||||||
|
|
||||||
public static readonly Color NanoGold = Color.FromHex("#A88B5E");
|
public static readonly Color NanoGold = Color.FromHex("#A88B5E");
|
||||||
|
|
||||||
public static readonly Color ButtonColorDefault = Color.FromHex("#464966");
|
public static readonly Color ButtonColorDefault = Color.FromHex("#464966");
|
||||||
public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f");
|
public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f");
|
||||||
public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45");
|
public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45");
|
||||||
@@ -36,12 +36,10 @@ namespace Content.Client.UserInterface
|
|||||||
|
|
||||||
public const string StyleClassItemStatus = "ItemStatus";
|
public const string StyleClassItemStatus = "ItemStatus";
|
||||||
|
|
||||||
public Stylesheet Stylesheet { get; }
|
public override Stylesheet Stylesheet { get; }
|
||||||
|
|
||||||
public NanoStyle()
|
public StyleNano(IResourceCache resCache) : base(resCache)
|
||||||
{
|
{
|
||||||
var resCache = IoCManager.Resolve<IResourceCache>();
|
|
||||||
var notoSans8 = resCache.GetFont("/Nano/NotoSans/NotoSans-Regular.ttf", 8);
|
|
||||||
var notoSans10 = resCache.GetFont("/Nano/NotoSans/NotoSans-Regular.ttf", 10);
|
var notoSans10 = resCache.GetFont("/Nano/NotoSans/NotoSans-Regular.ttf", 10);
|
||||||
var notoSans12 = resCache.GetFont("/Nano/NotoSans/NotoSans-Regular.ttf", 12);
|
var notoSans12 = resCache.GetFont("/Nano/NotoSans/NotoSans-Regular.ttf", 12);
|
||||||
var notoSansBold12 = resCache.GetFont("/Nano/NotoSans/NotoSans-Bold.ttf", 12);
|
var notoSansBold12 = resCache.GetFont("/Nano/NotoSans/NotoSans-Bold.ttf", 12);
|
||||||
@@ -69,16 +67,10 @@ namespace Content.Client.UserInterface
|
|||||||
var textureInvertedTriangle = resCache.GetTexture("/Nano/inverted_triangle.svg.png");
|
var textureInvertedTriangle = resCache.GetTexture("/Nano/inverted_triangle.svg.png");
|
||||||
|
|
||||||
// Button styles.
|
// Button styles.
|
||||||
var buttonTex = resCache.GetTexture("/Nano/button.svg.96dpi.png");
|
var buttonNormal = new StyleBoxTexture(BaseButton)
|
||||||
var buttonNormal = new StyleBoxTexture
|
|
||||||
{
|
{
|
||||||
Texture = buttonTex,
|
|
||||||
Modulate = ButtonColorDefault
|
Modulate = ButtonColorDefault
|
||||||
};
|
};
|
||||||
buttonNormal.SetPatchMargin(StyleBox.Margin.All, 10);
|
|
||||||
buttonNormal.SetPadding(StyleBox.Margin.All, 1);
|
|
||||||
buttonNormal.SetContentMarginOverride(StyleBox.Margin.Vertical, 2);
|
|
||||||
buttonNormal.SetContentMarginOverride(StyleBox.Margin.Horizontal, 14);
|
|
||||||
|
|
||||||
var buttonHover = new StyleBoxTexture(buttonNormal)
|
var buttonHover = new StyleBoxTexture(buttonNormal)
|
||||||
{
|
{
|
||||||
@@ -248,16 +240,8 @@ namespace Content.Client.UserInterface
|
|||||||
var sliderFillRed = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Red};
|
var sliderFillRed = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Red};
|
||||||
var sliderFillBlue = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Blue};
|
var sliderFillBlue = new StyleBoxTexture(sliderFillBox) {Modulate = Color.Blue};
|
||||||
|
|
||||||
Stylesheet = new Stylesheet(new[]
|
Stylesheet = new Stylesheet(BaseRules.Concat(new[]
|
||||||
{
|
{
|
||||||
// Default font.
|
|
||||||
new StyleRule(
|
|
||||||
new SelectorElement(null, null, null, null),
|
|
||||||
new[]
|
|
||||||
{
|
|
||||||
new StyleProperty("font", notoSans12),
|
|
||||||
}),
|
|
||||||
|
|
||||||
// Window title.
|
// Window title.
|
||||||
new StyleRule(
|
new StyleRule(
|
||||||
new SelectorElement(typeof(Label), new[] {SS14Window.StyleClassWindowTitle}, null, null),
|
new SelectorElement(typeof(Label), new[] {SS14Window.StyleClassWindowTitle}, null, null),
|
||||||
@@ -721,7 +705,12 @@ namespace Content.Client.UserInterface
|
|||||||
{
|
{
|
||||||
new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Center),
|
new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Center),
|
||||||
}),
|
}),
|
||||||
});
|
|
||||||
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new []{ ClassHighDivider}, null, null), new []
|
||||||
|
{
|
||||||
|
new StyleProperty(PanelContainer.StylePropertyPanel, new StyleBoxFlat { BackgroundColor = NanoGold, ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2}),
|
||||||
|
})
|
||||||
|
}).ToList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
107
Content.Client/UserInterface/Stylesheets/StyleSpace.cs
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Content.Client.Utility;
|
||||||
|
using Robust.Client.Graphics.Drawing;
|
||||||
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
|
|
||||||
|
namespace Content.Client.UserInterface.Stylesheets
|
||||||
|
{
|
||||||
|
public class StyleSpace : StyleBase
|
||||||
|
{
|
||||||
|
public static readonly Color SpaceRed = Color.FromHex("#9b2236");
|
||||||
|
|
||||||
|
public static readonly Color ButtonColorDefault = Color.FromHex("#464966");
|
||||||
|
public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f");
|
||||||
|
public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45");
|
||||||
|
public static readonly Color ButtonColorDisabled = Color.FromHex("#30313c");
|
||||||
|
|
||||||
|
public override Stylesheet Stylesheet { get; }
|
||||||
|
|
||||||
|
public StyleSpace(IResourceCache resCache) : base(resCache)
|
||||||
|
{
|
||||||
|
var notoSans10 = resCache.GetFont("/Nano/NotoSans/NotoSans-Regular.ttf", 10);
|
||||||
|
var notoSansBold16 = resCache.GetFont("/Nano/NotoSans/NotoSans-Bold.ttf", 16);
|
||||||
|
|
||||||
|
// Button styles.
|
||||||
|
var buttonNormal = new StyleBoxTexture(BaseButton)
|
||||||
|
{
|
||||||
|
Modulate = ButtonColorDefault
|
||||||
|
};
|
||||||
|
|
||||||
|
var buttonHover = new StyleBoxTexture(buttonNormal)
|
||||||
|
{
|
||||||
|
Modulate = ButtonColorHovered
|
||||||
|
};
|
||||||
|
|
||||||
|
var buttonPressed = new StyleBoxTexture(buttonNormal)
|
||||||
|
{
|
||||||
|
Modulate = ButtonColorPressed
|
||||||
|
};
|
||||||
|
|
||||||
|
var buttonDisabled = new StyleBoxTexture(buttonNormal)
|
||||||
|
{
|
||||||
|
Modulate = ButtonColorDisabled
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Stylesheet = new Stylesheet(BaseRules.Concat(new StyleRule[]
|
||||||
|
{
|
||||||
|
// Big Label
|
||||||
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelHeading}, null, null), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(Label.StylePropertyFont, notoSansBold16),
|
||||||
|
new StyleProperty(Label.StylePropertyFontColor, SpaceRed),
|
||||||
|
}),
|
||||||
|
|
||||||
|
// Small Label
|
||||||
|
new StyleRule(new SelectorElement(typeof(Label), new[] {StyleClassLabelSubText}, null, null), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(Label.StylePropertyFont, notoSans10),
|
||||||
|
new StyleProperty(Label.StylePropertyFontColor, Color.DarkGray),
|
||||||
|
}),
|
||||||
|
|
||||||
|
new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {ClassHighDivider}, null, null), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(PanelContainer.StylePropertyPanel,
|
||||||
|
new StyleBoxFlat
|
||||||
|
{
|
||||||
|
BackgroundColor = SpaceRed, ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
|
||||||
|
// Regular buttons!
|
||||||
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] { ContainerButton.StyleClassButton }, null, new[] {ContainerButton.StylePseudoClassNormal}), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonNormal),
|
||||||
|
}),
|
||||||
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] { ContainerButton.StyleClassButton }, null, new[] {ContainerButton.StylePseudoClassHover}), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonHover),
|
||||||
|
}),
|
||||||
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] { ContainerButton.StyleClassButton }, null, new[] {ContainerButton.StylePseudoClassPressed}), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonPressed),
|
||||||
|
}),
|
||||||
|
new StyleRule(new SelectorElement(typeof(ContainerButton), new[] { ContainerButton.StyleClassButton }, null, new[] {ContainerButton.StylePseudoClassDisabled}), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(ContainerButton.StylePropertyStyleBox, buttonDisabled),
|
||||||
|
}),
|
||||||
|
|
||||||
|
new StyleRule(new SelectorElement(typeof(Label), new[] { Button.StyleClassButton }, null, null), new[]
|
||||||
|
{
|
||||||
|
new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Center),
|
||||||
|
}),
|
||||||
|
|
||||||
|
new StyleRule(new SelectorChild(
|
||||||
|
new SelectorElement(typeof(Button), null, null, new[] {ContainerButton.StylePseudoClassDisabled}),
|
||||||
|
new SelectorElement(typeof(Label), null, null, null)),
|
||||||
|
new[]
|
||||||
|
{
|
||||||
|
new StyleProperty("font-color", Color.FromHex("#E5E5E581")),
|
||||||
|
}),
|
||||||
|
}).ToList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
|
using Robust.Client.Interfaces.UserInterface;
|
||||||
|
using Robust.Client.UserInterface;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
|
||||||
|
namespace Content.Client.UserInterface.Stylesheets
|
||||||
|
{
|
||||||
|
public sealed class StylesheetManager : IStylesheetManager
|
||||||
|
{
|
||||||
|
#pragma warning disable 649
|
||||||
|
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager;
|
||||||
|
[Dependency] private readonly IResourceCache _resourceCache;
|
||||||
|
#pragma warning restore 649
|
||||||
|
|
||||||
|
public Stylesheet SheetNano { get; private set; }
|
||||||
|
public Stylesheet SheetSpace { get; private set; }
|
||||||
|
|
||||||
|
public void Initialize()
|
||||||
|
{
|
||||||
|
SheetNano = new StyleNano(_resourceCache).Stylesheet;
|
||||||
|
SheetSpace = new StyleSpace(_resourceCache).Stylesheet;
|
||||||
|
|
||||||
|
_userInterfaceManager.Stylesheet = SheetNano;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
81
Content.IntegrationTests/Tests/EntityTest.cs
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
using NUnit.Framework;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
|
using Robust.Shared.Interfaces.Map;
|
||||||
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Robust.Shared.Log;
|
||||||
|
using Robust.Server.Interfaces.Maps;
|
||||||
|
using Robust.Server.Interfaces.Timing;
|
||||||
|
|
||||||
|
namespace Content.IntegrationTests.Tests
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
[TestOf(typeof(Robust.Shared.GameObjects.Entity))]
|
||||||
|
public class EntityTest : ContentIntegrationTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public async Task Test()
|
||||||
|
{
|
||||||
|
var server = StartServerDummyTicker();
|
||||||
|
await server.WaitIdleAsync();
|
||||||
|
var mapMan = server.ResolveDependency<IMapManager>();
|
||||||
|
var entityMan = server.ResolveDependency<IEntityManager>();
|
||||||
|
var prototypeMan = server.ResolveDependency<IPrototypeManager>();
|
||||||
|
var mapLoader = server.ResolveDependency<IMapLoader>();
|
||||||
|
var pauseMan = server.ResolveDependency<IPauseManager>();
|
||||||
|
var prototypes = new List<EntityPrototype>();
|
||||||
|
IMapGrid grid = default;
|
||||||
|
IEntity testEntity = null;
|
||||||
|
|
||||||
|
//Build up test environment
|
||||||
|
server.Post(() =>
|
||||||
|
{
|
||||||
|
var mapId = mapMan.CreateMap();
|
||||||
|
pauseMan.AddUninitializedMap(mapId);
|
||||||
|
grid = mapLoader.LoadBlueprint(mapId, "Maps/stationstation.yml");
|
||||||
|
});
|
||||||
|
|
||||||
|
server.Assert(() =>
|
||||||
|
{
|
||||||
|
var testLocation = new GridCoordinates(new Robust.Shared.Maths.Vector2(0, 0), grid);
|
||||||
|
|
||||||
|
//Generate list of non-abstract prototypes to test
|
||||||
|
foreach (var prototype in prototypeMan.EnumeratePrototypes<EntityPrototype>())
|
||||||
|
{
|
||||||
|
if (prototype.Abstract)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
prototypes.Add(prototype);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Iterate list of prototypes to spawn
|
||||||
|
foreach (var prototype in prototypes)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Logger.LogS(LogLevel.Debug, "EntityTest", "Testing: " + prototype.Name);
|
||||||
|
testEntity = entityMan.SpawnEntity(prototype.ID, testLocation);
|
||||||
|
server.RunTicks(2);
|
||||||
|
Assert.That(testEntity.Initialized);
|
||||||
|
entityMan.DeleteEntity(testEntity.Uid);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Fail any exceptions thrown on spawn
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.LogS(LogLevel.Error, "EntityTest", "Entity '" + testEntity.Name + "' threw: " + e.Message);
|
||||||
|
Assert.Fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await server.WaitIdleAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using Content.Server.Cargo;
|
using Content.Server.Cargo;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
using Content.Shared.GameObjects.Components.Cargo;
|
using Content.Shared.GameObjects.Components.Cargo;
|
||||||
|
using Content.Server.GameObjects.Components.Power;
|
||||||
using Content.Shared.Prototypes.Cargo;
|
using Content.Shared.Prototypes.Cargo;
|
||||||
using Robust.Server.GameObjects.Components.UserInterface;
|
using Robust.Server.GameObjects.Components.UserInterface;
|
||||||
using Robust.Server.Interfaces.GameObjects;
|
using Robust.Server.Interfaces.GameObjects;
|
||||||
@@ -40,6 +41,9 @@ namespace Content.Server.GameObjects.Components.Cargo
|
|||||||
|
|
||||||
private bool _requestOnly = false;
|
private bool _requestOnly = false;
|
||||||
|
|
||||||
|
private PowerDeviceComponent _powerDevice;
|
||||||
|
private bool Powered => _powerDevice.Powered;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
@@ -47,6 +51,7 @@ namespace Content.Server.GameObjects.Components.Cargo
|
|||||||
Orders = Owner.GetComponent<CargoOrderDatabaseComponent>();
|
Orders = Owner.GetComponent<CargoOrderDatabaseComponent>();
|
||||||
_userInterface = Owner.GetComponent<ServerUserInterfaceComponent>().GetBoundUserInterface(CargoConsoleUiKey.Key);
|
_userInterface = Owner.GetComponent<ServerUserInterfaceComponent>().GetBoundUserInterface(CargoConsoleUiKey.Key);
|
||||||
_userInterface.OnReceiveMessage += UserInterfaceOnOnReceiveMessage;
|
_userInterface.OnReceiveMessage += UserInterfaceOnOnReceiveMessage;
|
||||||
|
_powerDevice = Owner.GetComponent<PowerDeviceComponent>();
|
||||||
_galacticBankManager.AddComponent(this);
|
_galacticBankManager.AddComponent(this);
|
||||||
BankId = 0;
|
BankId = 0;
|
||||||
}
|
}
|
||||||
@@ -66,6 +71,8 @@ namespace Content.Server.GameObjects.Components.Cargo
|
|||||||
var message = serverMsg.Message;
|
var message = serverMsg.Message;
|
||||||
if (!Orders.ConnectedToDatabase)
|
if (!Orders.ConnectedToDatabase)
|
||||||
return;
|
return;
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case CargoConsoleAddOrderMessage msg:
|
case CargoConsoleAddOrderMessage msg:
|
||||||
@@ -119,6 +126,8 @@ namespace Content.Server.GameObjects.Components.Cargo
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
|
|
||||||
_userInterface.Open(actor.playerSession);
|
_userInterface.Open(actor.playerSession);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.GameObjects.Components.Sound;
|
using Content.Server.GameObjects.Components.Sound;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
|
using Content.Server.GameObjects.Components.Power;
|
||||||
using Content.Server.Interfaces;
|
using Content.Server.Interfaces;
|
||||||
using Content.Server.Interfaces.GameObjects;
|
using Content.Server.Interfaces.GameObjects;
|
||||||
using Content.Shared.Chemistry;
|
using Content.Shared.Chemistry;
|
||||||
@@ -46,6 +47,11 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
private SolutionComponent Solution => _beakerContainer.ContainedEntity.GetComponent<SolutionComponent>();
|
private SolutionComponent Solution => _beakerContainer.ContainedEntity.GetComponent<SolutionComponent>();
|
||||||
|
|
||||||
|
///implementing PowerDeviceComponent
|
||||||
|
private PowerDeviceComponent _powerDevice;
|
||||||
|
private bool Powered => _powerDevice.Powered;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Shows the serializer how to save/load this components yaml prototype.
|
/// Shows the serializer how to save/load this components yaml prototype.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -70,6 +76,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
|
|
||||||
_beakerContainer =
|
_beakerContainer =
|
||||||
ContainerManagerComponent.Ensure<ContainerSlot>($"{Name}-reagentContainerContainer", Owner);
|
ContainerManagerComponent.Ensure<ContainerSlot>($"{Name}-reagentContainerContainer", Owner);
|
||||||
|
_powerDevice = Owner.GetComponent<PowerDeviceComponent>();
|
||||||
|
|
||||||
InitializeFromPrototype();
|
InitializeFromPrototype();
|
||||||
UpdateUserInterface();
|
UpdateUserInterface();
|
||||||
@@ -159,6 +166,9 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
//Check if player can interact in their current state
|
//Check if player can interact in their current state
|
||||||
if (!ActionBlockerSystem.CanInteract(playerEntity) || !ActionBlockerSystem.CanUse(playerEntity))
|
if (!ActionBlockerSystem.CanInteract(playerEntity) || !ActionBlockerSystem.CanUse(playerEntity))
|
||||||
return false;
|
return false;
|
||||||
|
//Check if device is powered
|
||||||
|
if (!Powered)
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -251,6 +261,9 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
|
|
||||||
var activeHandEntity = hands.GetActiveHand?.Owner;
|
var activeHandEntity = hands.GetActiveHand?.Owner;
|
||||||
if (activeHandEntity == null)
|
if (activeHandEntity == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
using Content.Shared.GameObjects.Components.Medical;
|
using Content.Shared.GameObjects.Components.Medical;
|
||||||
|
using Content.Server.GameObjects.Components.Power;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.GameObjects.Components.Container;
|
using Robust.Server.GameObjects.Components.Container;
|
||||||
using Robust.Server.GameObjects.Components.UserInterface;
|
using Robust.Server.GameObjects.Components.UserInterface;
|
||||||
@@ -24,6 +25,10 @@ namespace Content.Server.GameObjects.Components.Medical
|
|||||||
private readonly Vector2 _ejectOffset = new Vector2(-0.5f, 0f);
|
private readonly Vector2 _ejectOffset = new Vector2(-0.5f, 0f);
|
||||||
public bool IsOccupied => _bodyContainer.ContainedEntity != null;
|
public bool IsOccupied => _bodyContainer.ContainedEntity != null;
|
||||||
|
|
||||||
|
///implementing PowerDeviceComponent
|
||||||
|
private PowerDeviceComponent _powerDevice;
|
||||||
|
private bool Powered => _powerDevice.Powered;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
@@ -31,6 +36,7 @@ namespace Content.Server.GameObjects.Components.Medical
|
|||||||
_userInterface = Owner.GetComponent<ServerUserInterfaceComponent>()
|
_userInterface = Owner.GetComponent<ServerUserInterfaceComponent>()
|
||||||
.GetBoundUserInterface(MedicalScannerUiKey.Key);
|
.GetBoundUserInterface(MedicalScannerUiKey.Key);
|
||||||
_bodyContainer = ContainerManagerComponent.Ensure<ContainerSlot>($"{Name}-bodyContainer", Owner);
|
_bodyContainer = ContainerManagerComponent.Ensure<ContainerSlot>($"{Name}-bodyContainer", Owner);
|
||||||
|
_powerDevice = Owner.GetComponent<PowerDeviceComponent>();
|
||||||
UpdateUserInterface();
|
UpdateUserInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,6 +85,8 @@ namespace Content.Server.GameObjects.Components.Medical
|
|||||||
|
|
||||||
private void UpdateUserInterface()
|
private void UpdateUserInterface()
|
||||||
{
|
{
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
var newState = GetUserInterfaceState();
|
var newState = GetUserInterfaceState();
|
||||||
_userInterface.SetState(newState);
|
_userInterface.SetState(newState);
|
||||||
}
|
}
|
||||||
@@ -112,6 +120,8 @@ namespace Content.Server.GameObjects.Components.Medical
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
_userInterface.Open(actor.playerSession);
|
_userInterface.Open(actor.playerSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ namespace Content.Server.GameObjects.Components.Research
|
|||||||
|
|
||||||
private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage message)
|
private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage message)
|
||||||
{
|
{
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (message.Message)
|
switch (message.Message)
|
||||||
{
|
{
|
||||||
case LatheQueueRecipeMessage msg:
|
case LatheQueueRecipeMessage msg:
|
||||||
@@ -87,13 +90,15 @@ namespace Content.Server.GameObjects.Components.Research
|
|||||||
|
|
||||||
case LatheServerSyncMessage msg:
|
case LatheServerSyncMessage msg:
|
||||||
if (!Owner.TryGetComponent(out TechnologyDatabaseComponent database)
|
if (!Owner.TryGetComponent(out TechnologyDatabaseComponent database)
|
||||||
|| !Owner.TryGetComponent(out ProtolatheDatabaseComponent protoDatabase)) return;
|
|| !Owner.TryGetComponent(out ProtolatheDatabaseComponent protoDatabase)) return;
|
||||||
|
|
||||||
if(database.SyncWithServer())
|
if (database.SyncWithServer())
|
||||||
protoDatabase.Sync();
|
protoDatabase.Sync();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal bool Produce(LatheRecipePrototype recipe)
|
internal bool Produce(LatheRecipePrototype recipe)
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ namespace Content.Server.GameObjects.Components.Research
|
|||||||
private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage message)
|
private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage message)
|
||||||
{
|
{
|
||||||
if (!Owner.TryGetComponent(out TechnologyDatabaseComponent database)) return;
|
if (!Owner.TryGetComponent(out TechnologyDatabaseComponent database)) return;
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (message.Message)
|
switch (message.Message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ namespace Content.Server.GameObjects.Components.VendingMachines
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
|
|
||||||
var wires = Owner.GetComponent<WiresComponent>();
|
var wires = Owner.GetComponent<WiresComponent>();
|
||||||
if (wires.IsPanelOpen)
|
if (wires.IsPanelOpen)
|
||||||
@@ -121,6 +123,9 @@ namespace Content.Server.GameObjects.Components.VendingMachines
|
|||||||
|
|
||||||
private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage serverMsg)
|
private void UserInterfaceOnOnReceiveMessage(ServerBoundUserInterfaceMessage serverMsg)
|
||||||
{
|
{
|
||||||
|
if (!Powered)
|
||||||
|
return;
|
||||||
|
|
||||||
var message = serverMsg.Message;
|
var message = serverMsg.Message;
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
texture: Buildings/chemicals.rsi/industrial_dispenser.png
|
texture: Buildings/chemicals.rsi/industrial_dispenser.png
|
||||||
- type: ReagentDispenser
|
- type: ReagentDispenser
|
||||||
pack: ChemDispenserStandardInventory
|
pack: ChemDispenserStandardInventory
|
||||||
|
- type: PowerDevice
|
||||||
|
|
||||||
- type: reagentDispenserInventory
|
- type: reagentDispenserInventory
|
||||||
id: ChemDispenserStandardInventory
|
id: ChemDispenserStandardInventory
|
||||||
|
|||||||
@@ -1,70 +1,70 @@
|
|||||||
# - type: entity
|
- type: entity
|
||||||
# name: BaseInstrument
|
name: BaseInstrument
|
||||||
# id: BaseInstrument
|
id: BaseInstrument
|
||||||
# abstract: true
|
abstract: true
|
||||||
# components:
|
components:
|
||||||
# - type: Instrument
|
- type: Instrument
|
||||||
# handheld: false
|
handheld: false
|
||||||
#
|
|
||||||
# - type: Clickable
|
- type: Clickable
|
||||||
# - type: InteractionOutline
|
- type: InteractionOutline
|
||||||
#
|
|
||||||
# - type: Collidable
|
- type: Collidable
|
||||||
# shapes:
|
shapes:
|
||||||
# - !type:PhysShapeAabb
|
- !type:PhysShapeAabb
|
||||||
# layer: 31
|
layer: 31
|
||||||
#
|
|
||||||
# - type: SnapGrid
|
- type: SnapGrid
|
||||||
# offset: Center
|
offset: Center
|
||||||
#
|
|
||||||
# - type: Damageable
|
- type: Damageable
|
||||||
# - type: Destructible
|
- type: Destructible
|
||||||
# thresholdvalue: 50
|
thresholdvalue: 50
|
||||||
#
|
|
||||||
# - type: UserInterface
|
- type: UserInterface
|
||||||
# interfaces:
|
interfaces:
|
||||||
# - key: enum.InstrumentUiKey.Key
|
- key: enum.InstrumentUiKey.Key
|
||||||
# type: InstrumentBoundUserInterface
|
type: InstrumentBoundUserInterface
|
||||||
#
|
|
||||||
# - type: entity
|
- type: entity
|
||||||
# name: Piano
|
name: Piano
|
||||||
# parent: BaseInstrument
|
parent: BaseInstrument
|
||||||
# id: PianoInstrument
|
id: PianoInstrument
|
||||||
# description: Play Needles Piano Now.
|
description: Play Needles Piano Now.
|
||||||
# components:
|
components:
|
||||||
# - type: Instrument
|
- type: Instrument
|
||||||
# program: 1
|
program: 1
|
||||||
# - type: Sprite
|
- type: Sprite
|
||||||
# sprite: Objects/Instruments/musician.rsi
|
sprite: Objects/Instruments/musician.rsi
|
||||||
# state: piano
|
state: piano
|
||||||
# - type: Icon
|
- type: Icon
|
||||||
# sprite: Objects/Instruments/musician.rsi
|
sprite: Objects/Instruments/musician.rsi
|
||||||
# state: piano
|
state: piano
|
||||||
#
|
|
||||||
# - type: entity
|
- type: entity
|
||||||
# name: Minimoog
|
name: Minimoog
|
||||||
# parent: BaseInstrument
|
parent: BaseInstrument
|
||||||
# id: MinimoogInstrument
|
id: MinimoogInstrument
|
||||||
# components:
|
components:
|
||||||
# - type: Instrument
|
- type: Instrument
|
||||||
# program: 7
|
program: 7
|
||||||
# - type: Sprite
|
- type: Sprite
|
||||||
# sprite: Objects/Instruments/musician.rsi
|
sprite: Objects/Instruments/musician.rsi
|
||||||
# state: minimoog
|
state: minimoog
|
||||||
# - type: Icon
|
- type: Icon
|
||||||
# sprite: Objects/Instruments/musician.rsi
|
sprite: Objects/Instruments/musician.rsi
|
||||||
# state: minimoog
|
state: minimoog
|
||||||
#
|
|
||||||
# - type: entity
|
- type: entity
|
||||||
# name: Xylophone
|
name: Xylophone
|
||||||
# parent: BaseInstrument
|
parent: BaseInstrument
|
||||||
# id: XylophoneInstrument
|
id: XylophoneInstrument
|
||||||
# components:
|
components:
|
||||||
# - type: Instrument
|
- type: Instrument
|
||||||
# program: 13
|
program: 13
|
||||||
# - type: Sprite
|
- type: Sprite
|
||||||
# sprite: Objects/Instruments/musician.rsi
|
sprite: Objects/Instruments/musician.rsi
|
||||||
# state: xylophone
|
state: xylophone
|
||||||
# - type: Icon
|
- type: Icon
|
||||||
# sprite: Objects/Instruments/musician.rsi
|
sprite: Objects/Instruments/musician.rsi
|
||||||
# state: xylophone
|
state: xylophone
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
map: ["enum.MedicalScannerVisualLayers.Machine"]
|
map: ["enum.MedicalScannerVisualLayers.Machine"]
|
||||||
- state: scanner_terminal_blue
|
- state: scanner_terminal_blue
|
||||||
map: ["enum.MedicalScannerVisualLayers.Terminal"]
|
map: ["enum.MedicalScannerVisualLayers.Terminal"]
|
||||||
|
- type: PowerDevice
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Buildings/medical_scanner.rsi
|
sprite: Buildings/medical_scanner.rsi
|
||||||
state: scanner_open
|
state: scanner_open
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 134 B |
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 134 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 127 B |
@@ -52,5 +52,6 @@
|
|||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Occluders/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Occluders/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=preemptively/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=preemptively/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=prefs/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=prefs/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Soundfont/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=soundfonts/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=soundfonts/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=swsl/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=swsl/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
|
|||||||