Fix PDA capitalization to be PascalCase (#17335)
This commit is contained in:
@@ -35,12 +35,12 @@
|
||||
<Control SetHeight="28" Margin="1 0 2 1">
|
||||
<PanelContainer Name="FooterPanel"></PanelContainer>
|
||||
<BoxContainer Name="ContentFooter" HorizontalExpand="True" SetHeight="28">
|
||||
<Label Text="Net#Link ™" VerticalAlignment="Center" Margin="6 0" StyleClasses="PDAContentFooterText"/>
|
||||
<Label Name="AddressLabel" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="6 0" StyleClasses="PDAContentFooterText"/>
|
||||
<Label Text="Net#Link ™" VerticalAlignment="Center" Margin="6 0" StyleClasses="PdaContentFooterText"/>
|
||||
<Label Name="AddressLabel" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="6 0" StyleClasses="PdaContentFooterText"/>
|
||||
<Control HorizontalExpand="True"/>
|
||||
<Label Name="FromAddressLabel" Margin="6 0" StyleClasses="PDAContentFooterText"/>
|
||||
<Label SetWidth="25" StyleClasses="PDAContentFooterText" Align="Center" Text="➝"/><!--Turn this into an arrow texture-->
|
||||
<Label Name="ToAddressLabel" Margin="6 0" StyleClasses="PDAContentFooterText"/>
|
||||
<Label Name="FromAddressLabel" Margin="6 0" StyleClasses="PdaContentFooterText"/>
|
||||
<Label SetWidth="25" StyleClasses="PdaContentFooterText" Align="Center" Text="➝"/><!--Turn this into an arrow texture-->
|
||||
<Label Name="ToAddressLabel" Margin="6 0" StyleClasses="PdaContentFooterText"/>
|
||||
</BoxContainer>
|
||||
</Control>
|
||||
</BoxContainer>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// Used for specifying the pda windows border colors
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class PDABorderColorComponent : Component
|
||||
public sealed class PdaBorderColorComponent : Component
|
||||
{
|
||||
[DataField("borderColor", required: true)]
|
||||
public string? BorderColor;
|
||||
@@ -12,14 +12,14 @@ using Robust.Shared.Configuration;
|
||||
namespace Content.Client.PDA
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class PDABoundUserInterface : CartridgeLoaderBoundUserInterface
|
||||
public sealed class PdaBoundUserInterface : CartridgeLoaderBoundUserInterface
|
||||
{
|
||||
[Dependency] private readonly IEntityManager? _entityManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _configManager = default!;
|
||||
|
||||
private PDAMenu? _menu;
|
||||
private PdaMenu? _menu;
|
||||
|
||||
public PDABoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
|
||||
public PdaBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
}
|
||||
@@ -27,13 +27,13 @@ namespace Content.Client.PDA
|
||||
protected override void Open()
|
||||
{
|
||||
base.Open();
|
||||
SendMessage(new PDARequestUpdateInterfaceMessage());
|
||||
_menu = new PDAMenu();
|
||||
SendMessage(new PdaRequestUpdateInterfaceMessage());
|
||||
_menu = new PdaMenu();
|
||||
_menu.OpenCenteredLeft();
|
||||
_menu.OnClose += Close;
|
||||
_menu.FlashLightToggleButton.OnToggled += _ =>
|
||||
{
|
||||
SendMessage(new PDAToggleFlashlightMessage());
|
||||
SendMessage(new PdaToggleFlashlightMessage());
|
||||
};
|
||||
|
||||
if (_configManager.GetCVar(CCVars.CrewManifestUnsecure))
|
||||
@@ -47,32 +47,32 @@ namespace Content.Client.PDA
|
||||
|
||||
_menu.EjectIdButton.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new ItemSlotButtonPressedEvent(PDAComponent.PDAIdSlotId));
|
||||
SendMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaIdSlotId));
|
||||
};
|
||||
|
||||
_menu.EjectPenButton.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new ItemSlotButtonPressedEvent(PDAComponent.PDAPenSlotId));
|
||||
SendMessage(new ItemSlotButtonPressedEvent(PdaComponent.PdaPenSlotId));
|
||||
};
|
||||
|
||||
_menu.ActivateMusicButton.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new PDAShowMusicMessage());
|
||||
SendMessage(new PdaShowMusicMessage());
|
||||
};
|
||||
|
||||
_menu.AccessRingtoneButton.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new PDAShowRingtoneMessage());
|
||||
SendMessage(new PdaShowRingtoneMessage());
|
||||
};
|
||||
|
||||
_menu.ShowUplinkButton.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new PDAShowUplinkMessage());
|
||||
SendMessage(new PdaShowUplinkMessage());
|
||||
};
|
||||
|
||||
_menu.LockUplinkButton.OnPressed += _ =>
|
||||
{
|
||||
SendMessage(new PDALockUplinkMessage());
|
||||
SendMessage(new PdaLockUplinkMessage());
|
||||
};
|
||||
|
||||
_menu.OnProgramItemPressed += ActivateCartridge;
|
||||
@@ -93,7 +93,7 @@ namespace Content.Client.PDA
|
||||
{
|
||||
base.UpdateState(state);
|
||||
|
||||
if (state is not PDAUpdateState updateState)
|
||||
if (state is not PdaUpdateState updateState)
|
||||
return;
|
||||
|
||||
_menu?.UpdateState(updateState);
|
||||
@@ -130,9 +130,9 @@ namespace Content.Client.PDA
|
||||
_menu?.Dispose();
|
||||
}
|
||||
|
||||
private PDABorderColorComponent? GetBorderColorComponent()
|
||||
private PdaBorderColorComponent? GetBorderColorComponent()
|
||||
{
|
||||
return _entityManager?.GetComponentOrNull<PDABorderColorComponent>(Owner.Owner);
|
||||
return _entityManager?.GetComponentOrNull<PdaBorderColorComponent>(Owner.Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,25 @@
|
||||
<pda:PDAWindow xmlns="https://spacestation14.io"
|
||||
<pda:PdaWindow xmlns="https://spacestation14.io"
|
||||
xmlns:pda="clr-namespace:Content.Client.PDA"
|
||||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
|
||||
MinSize="576 450"
|
||||
SetSize="576 450">
|
||||
<!-- This: (Margin="1 1 3 0") is necessary so the navigation bar doesn't sticks into the black content border. -->
|
||||
<BoxContainer Name="NavigationBar" HorizontalExpand="True" MinHeight="32" Margin="1 1 3 0">
|
||||
<pda:PDANavigationButton Name="HomeButton" SetWidth="32" CurrentTabBorderThickness="0 0 2 0" IsCurrent="True"/>
|
||||
<pda:PDANavigationButton Name="ProgramListButton" Access="Public" MinWidth="100" LabelText="{Loc 'comp-pda-io-program-list-button'}"/>
|
||||
<pda:PDANavigationButton Name="SettingsButton" MinWidth="100" LabelText="{Loc 'comp-pda-io-settings-button'}"/>
|
||||
<pda:PdaNavigationButton Name="HomeButton" SetWidth="32" CurrentTabBorderThickness="0 0 2 0" IsCurrent="True"/>
|
||||
<pda:PdaNavigationButton Name="ProgramListButton" Access="Public" MinWidth="100" LabelText="{Loc 'comp-pda-io-program-list-button'}"/>
|
||||
<pda:PdaNavigationButton Name="SettingsButton" MinWidth="100" LabelText="{Loc 'comp-pda-io-settings-button'}"/>
|
||||
|
||||
<pda:PDANavigationButton Name="ProgramTitle" Access="Public" BorderThickness="0 0 0 2" CurrentTabBorderThickness="2 0 0 2"
|
||||
<pda:PdaNavigationButton Name="ProgramTitle" Access="Public" BorderThickness="0 0 0 2" CurrentTabBorderThickness="2 0 0 2"
|
||||
ActiveBgColor="#202023" Visible="False"/>
|
||||
|
||||
<pda:PDANavigationButton HorizontalExpand="True"/>
|
||||
<pda:PdaNavigationButton HorizontalExpand="True"/>
|
||||
|
||||
<pda:PDANavigationButton Name="ProgramCloseButton" Access="Public" IconScale="0.5 0.5" BorderThickness="0 0 2 2"
|
||||
<pda:PdaNavigationButton Name="ProgramCloseButton" Access="Public" IconScale="0.5 0.5" BorderThickness="0 0 2 2"
|
||||
Visible="False" IsActive="False" SetWidth="32"/>
|
||||
|
||||
<pda:PDANavigationButton Name="FlashLightToggleButton" Access="Public" ToggleMode="True" ActiveFgColor="#EAEFBB" SetWidth="32"/>
|
||||
<pda:PDANavigationButton Name="EjectPenButton" Access="Public" SetWidth="32"/>
|
||||
<pda:PDANavigationButton Name="EjectIdButton" Access="Public" SetWidth="32"/>
|
||||
<pda:PdaNavigationButton Name="FlashLightToggleButton" Access="Public" ToggleMode="True" ActiveFgColor="#EAEFBB" SetWidth="32"/>
|
||||
<pda:PdaNavigationButton Name="EjectPenButton" Access="Public" SetWidth="32"/>
|
||||
<pda:PdaNavigationButton Name="EjectIdButton" Access="Public" SetWidth="32"/>
|
||||
</BoxContainer>
|
||||
<BoxContainer Name="ViewContainer" HorizontalExpand="True" VerticalExpand="True" Access="Public">
|
||||
<BoxContainer Orientation="Vertical"
|
||||
@@ -56,24 +56,24 @@
|
||||
HorizontalExpand="True"
|
||||
MinSize="50 50"
|
||||
Name="Settings">
|
||||
<pda:PDASettingsButton Name="AccessRingtoneButton"
|
||||
<pda:PdaSettingsButton Name="AccessRingtoneButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'comp-pda-ui-ringtone-button'}"
|
||||
Description="{Loc 'comp-pda-ui-ringtone-button-description'}"/>
|
||||
<pda:PDASettingsButton Name="CrewManifestButton"
|
||||
<pda:PdaSettingsButton Name="CrewManifestButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'crew-manifest-button-label'}"
|
||||
Description="{Loc 'crew-manifest-button-description'}"
|
||||
Visible="False" />
|
||||
<pda:PDASettingsButton Name="ActivateMusicButton"
|
||||
<pda:PdaSettingsButton Name="ActivateMusicButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'pda-bound-user-interface-music-button'}"
|
||||
Description="{Loc 'pda-bound-user-interface-music-button-description'}"/>
|
||||
<pda:PDASettingsButton Name="ShowUplinkButton"
|
||||
<pda:PdaSettingsButton Name="ShowUplinkButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'pda-bound-user-interface-show-uplink-title'}"
|
||||
Description="{Loc 'pda-bound-user-interface-show-uplink-description'}"/>
|
||||
<pda:PDASettingsButton Name="LockUplinkButton"
|
||||
<pda:PdaSettingsButton Name="LockUplinkButton"
|
||||
Access="Public"
|
||||
Text="{Loc 'pda-bound-user-interface-lock-uplink-title'}"
|
||||
Description="{Loc 'pda-bound-user-interface-lock-uplink-description'}"/>
|
||||
@@ -88,8 +88,8 @@
|
||||
</BoxContainer>
|
||||
<BoxContainer Name="ContentFooter" HorizontalExpand="True" SetHeight="28" Margin="1 0 2 1">
|
||||
<controls:StripeBack HasBottomEdge="False" HasMargins="False" HorizontalExpand="True">
|
||||
<Label Text="Robust#OS ™" VerticalAlignment="Center" Margin="6 0" StyleClasses="PDAContentFooterText"/>
|
||||
<Label Name="AddressLabel" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="6 0" StyleClasses="PDAContentFooterText"/>
|
||||
<Label Text="Robust#OS ™" VerticalAlignment="Center" Margin="6 0" StyleClasses="PdaContentFooterText"/>
|
||||
<Label Name="AddressLabel" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="6 0" StyleClasses="PdaContentFooterText"/>
|
||||
</controls:StripeBack>
|
||||
</BoxContainer>
|
||||
</pda:PDAWindow>
|
||||
</pda:PdaWindow>
|
||||
@@ -13,7 +13,7 @@ using Robust.Shared.Timing;
|
||||
namespace Content.Client.PDA
|
||||
{
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class PDAMenu : PDAWindow
|
||||
public sealed partial class PdaMenu : PdaWindow
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystem = default!;
|
||||
@@ -29,7 +29,7 @@ namespace Content.Client.PDA
|
||||
public event Action<EntityUid>? OnProgramItemPressed;
|
||||
public event Action<EntityUid>? OnUninstallButtonPressed;
|
||||
public event Action<EntityUid>? OnInstallButtonPressed;
|
||||
public PDAMenu()
|
||||
public PdaMenu()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
_gameTicker = _entitySystem.GetEntitySystem<ClientGameTicker>();
|
||||
@@ -88,22 +88,22 @@ namespace Content.Client.PDA
|
||||
ToHomeScreen();
|
||||
}
|
||||
|
||||
public void UpdateState(PDAUpdateState state)
|
||||
public void UpdateState(PdaUpdateState state)
|
||||
{
|
||||
FlashLightToggleButton.IsActive = state.FlashlightEnabled;
|
||||
|
||||
if (state.PDAOwnerInfo.ActualOwnerName != null)
|
||||
if (state.PdaOwnerInfo.ActualOwnerName != null)
|
||||
{
|
||||
PdaOwnerLabel.SetMarkup(Loc.GetString("comp-pda-ui-owner",
|
||||
("actualOwnerName", state.PDAOwnerInfo.ActualOwnerName)));
|
||||
("actualOwnerName", state.PdaOwnerInfo.ActualOwnerName)));
|
||||
}
|
||||
|
||||
|
||||
if (state.PDAOwnerInfo.IdOwner != null || state.PDAOwnerInfo.JobTitle != null)
|
||||
if (state.PdaOwnerInfo.IdOwner != null || state.PdaOwnerInfo.JobTitle != null)
|
||||
{
|
||||
IdInfoLabel.SetMarkup(Loc.GetString("comp-pda-ui",
|
||||
("owner", state.PDAOwnerInfo.IdOwner ?? Loc.GetString("comp-pda-ui-unknown")),
|
||||
("jobTitle", state.PDAOwnerInfo.JobTitle ?? Loc.GetString("comp-pda-ui-unassigned"))));
|
||||
("owner", state.PdaOwnerInfo.IdOwner ?? Loc.GetString("comp-pda-ui-unknown")),
|
||||
("jobTitle", state.PdaOwnerInfo.JobTitle ?? Loc.GetString("comp-pda-ui-unassigned"))));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -118,8 +118,8 @@ namespace Content.Client.PDA
|
||||
StationTimeLabel.SetMarkup(Loc.GetString("comp-pda-ui-station-time",
|
||||
("time", stationTime.ToString("hh\\:mm\\:ss"))));
|
||||
|
||||
var alertLevel = state.PDAOwnerInfo.StationAlertLevel;
|
||||
var alertColor = state.PDAOwnerInfo.StationAlertColor;
|
||||
var alertLevel = state.PdaOwnerInfo.StationAlertLevel;
|
||||
var alertColor = state.PdaOwnerInfo.StationAlertColor;
|
||||
var alertLevelKey = alertLevel != null ? $"alert-level-{alertLevel}" : "alert-level-unknown";
|
||||
|
||||
StationAlertLevelLabel.SetMarkup(Loc.GetString(
|
||||
@@ -135,7 +135,7 @@ namespace Content.Client.PDA
|
||||
|
||||
AddressLabel.Text = state.Address?.ToUpper() ?? " - ";
|
||||
|
||||
EjectIdButton.IsActive = state.PDAOwnerInfo.IdOwner != null || state.PDAOwnerInfo.JobTitle != null;
|
||||
EjectIdButton.IsActive = state.PdaOwnerInfo.IdOwner != null || state.PdaOwnerInfo.JobTitle != null;
|
||||
EjectPenButton.IsActive = state.HasPen;
|
||||
ActivateMusicButton.Visible = state.CanPlayMusic;
|
||||
ShowUplinkButton.Visible = state.HasUplink;
|
||||
@@ -172,7 +172,7 @@ namespace Content.Client.PDA
|
||||
ProgramList.AddChild(row);
|
||||
}
|
||||
|
||||
var item = new PDAProgramItem();
|
||||
var item = new PdaProgramItem();
|
||||
|
||||
if (component.Icon is not null)
|
||||
item.Icon.SetFromSpriteSpecifier(component.Icon);
|
||||
@@ -1,5 +1,5 @@
|
||||
<pda:PDANavigationButton xmlns="https://spacestation14.io" xmlns:pda="clr-namespace:Content.Client.PDA">
|
||||
<pda:PdaNavigationButton xmlns="https://spacestation14.io" xmlns:pda="clr-namespace:Content.Client.PDA">
|
||||
<PanelContainer Name="Background"/>
|
||||
<AnimatedTextureRect Margin="0 0 0 2" Visible="False" Name="Icon" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<Label Visible="True" Name="Label" Margin="8 0 8 2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</pda:PDANavigationButton>
|
||||
</pda:PdaNavigationButton>
|
||||
@@ -7,7 +7,7 @@ using Robust.Shared.Utility;
|
||||
namespace Content.Client.PDA;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class PDANavigationButton : ContainerButton
|
||||
public sealed partial class PdaNavigationButton : ContainerButton
|
||||
{
|
||||
|
||||
private bool _isCurrent;
|
||||
@@ -100,7 +100,7 @@ public sealed partial class PDANavigationButton : ContainerButton
|
||||
}
|
||||
}
|
||||
|
||||
public PDANavigationButton()
|
||||
public PdaNavigationButton()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
Background.PanelOverride = _styleBox;
|
||||
@@ -1,4 +1,4 @@
|
||||
<pda:PDAProgramItem HorizontalExpand="True" MinHeight="60" Margin="4"
|
||||
<pda:PdaProgramItem HorizontalExpand="True" MinHeight="60" Margin="4"
|
||||
xmlns:pda="clr-namespace:Content.Client.PDA"
|
||||
xmlns="https://spacestation14.io">
|
||||
<PanelContainer Name="Panel"/>
|
||||
@@ -14,4 +14,4 @@
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
</pda:PDAProgramItem>
|
||||
</pda:PdaProgramItem>
|
||||
@@ -6,7 +6,7 @@ using Robust.Client.UserInterface.XAML;
|
||||
namespace Content.Client.PDA;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class PDAProgramItem : ContainerButton
|
||||
public sealed partial class PdaProgramItem : ContainerButton
|
||||
{
|
||||
public const string StylePropertyBgColor = "backgroundColor";
|
||||
public const string NormalBgColor = "#313138";
|
||||
@@ -23,7 +23,7 @@ public sealed partial class PDAProgramItem : ContainerButton
|
||||
set => _styleBox.BackgroundColor = value;
|
||||
}
|
||||
|
||||
public PDAProgramItem()
|
||||
public PdaProgramItem()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
Panel.PanelOverride = _styleBox;
|
||||
@@ -1,4 +1,4 @@
|
||||
<pda:PDASettingsButton xmlns="https://spacestation14.io"
|
||||
<pda:PdaSettingsButton xmlns="https://spacestation14.io"
|
||||
xmlns:pda="clr-namespace:Content.Client.PDA"
|
||||
HorizontalExpand="True"
|
||||
MinHeight="48"
|
||||
@@ -8,4 +8,4 @@
|
||||
<Label Name="OptionName"/>
|
||||
<Label Name="OptionDescription"/>
|
||||
</BoxContainer>
|
||||
</pda:PDASettingsButton>
|
||||
</pda:PdaSettingsButton>
|
||||
@@ -6,7 +6,7 @@ using Robust.Client.UserInterface.XAML;
|
||||
namespace Content.Client.PDA;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class PDASettingsButton : ContainerButton
|
||||
public sealed partial class PdaSettingsButton : ContainerButton
|
||||
{
|
||||
public const string StylePropertyFgColor = "foregroundColor";
|
||||
public const string StylePropertyBgColor = "backgroundColor";
|
||||
@@ -49,7 +49,7 @@ public sealed partial class PDASettingsButton : ContainerButton
|
||||
}
|
||||
}
|
||||
|
||||
public PDASettingsButton()
|
||||
public PdaSettingsButton()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
Panel.PanelOverride = _styleBox;
|
||||
@@ -4,28 +4,28 @@ using Robust.Client.GameObjects;
|
||||
|
||||
namespace Content.Client.PDA;
|
||||
|
||||
public sealed class PDASystem : SharedPDASystem
|
||||
public sealed class PdaSystem : SharedPdaSystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<PDAComponent, AppearanceChangeEvent>(OnAppearanceChange);
|
||||
SubscribeLocalEvent<PdaComponent, AppearanceChangeEvent>(OnAppearanceChange);
|
||||
}
|
||||
|
||||
private void OnAppearanceChange(EntityUid uid, PDAComponent component, ref AppearanceChangeEvent args)
|
||||
private void OnAppearanceChange(EntityUid uid, PdaComponent component, ref AppearanceChangeEvent args)
|
||||
{
|
||||
if (args.Sprite == null)
|
||||
return;
|
||||
|
||||
if (Appearance.TryGetData<bool>(uid, UnpoweredFlashlightVisuals.LightOn, out var isFlashlightOn, args.Component))
|
||||
args.Sprite.LayerSetVisible(PDAVisualLayers.Flashlight, isFlashlightOn);
|
||||
args.Sprite.LayerSetVisible(PdaVisualLayers.Flashlight, isFlashlightOn);
|
||||
|
||||
if (Appearance.TryGetData<bool>(uid, PDAVisuals.IDCardInserted, out var isCardInserted, args.Component))
|
||||
args.Sprite.LayerSetVisible(PDAVisualLayers.IDLight, isCardInserted);
|
||||
if (Appearance.TryGetData<bool>(uid, PdaVisuals.IdCardInserted, out var isCardInserted, args.Component))
|
||||
args.Sprite.LayerSetVisible(PdaVisualLayers.IdLight, isCardInserted);
|
||||
}
|
||||
|
||||
protected override void OnComponentInit(EntityUid uid, PDAComponent component, ComponentInit args)
|
||||
protected override void OnComponentInit(EntityUid uid, PdaComponent component, ComponentInit args)
|
||||
{
|
||||
base.OnComponentInit(uid, component, args);
|
||||
|
||||
@@ -33,16 +33,16 @@ public sealed class PDASystem : SharedPDASystem
|
||||
return;
|
||||
|
||||
if (component.State != null)
|
||||
sprite.LayerSetState(PDAVisualLayers.Base, component.State);
|
||||
sprite.LayerSetState(PdaVisualLayers.Base, component.State);
|
||||
|
||||
sprite.LayerSetVisible(PDAVisualLayers.Flashlight, component.FlashlightOn);
|
||||
sprite.LayerSetVisible(PDAVisualLayers.IDLight, component.IdSlot.StartingItem != null);
|
||||
sprite.LayerSetVisible(PdaVisualLayers.Flashlight, component.FlashlightOn);
|
||||
sprite.LayerSetVisible(PdaVisualLayers.IdLight, component.IdSlot.StartingItem != null);
|
||||
}
|
||||
|
||||
public enum PDAVisualLayers : byte
|
||||
public enum PdaVisualLayers : byte
|
||||
{
|
||||
Base,
|
||||
Flashlight,
|
||||
IDLight
|
||||
IdLight
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<pda:PDAWindow xmlns="https://spacestation14.io"
|
||||
<pda:PdaWindow xmlns="https://spacestation14.io"
|
||||
xmlns:pda="clr-namespace:Content.Client.PDA"
|
||||
MouseFilter="Stop">
|
||||
<PanelContainer Name="Background" Access="Public" StyleClasses="PDABackgroundRect" />
|
||||
<PanelContainer Name="Background" Access="Public" StyleClasses="PdaBackgroundRect" />
|
||||
<!-- The negative markin fixes a gap between the window edges and the decorative panel -->
|
||||
<PanelContainer Name="AccentH" Margin="-1 170 -2 170" Access="Public" StyleClasses="PDABackground" />
|
||||
<PanelContainer Name="AccentV" Margin="220 -1 220 -1" Access="Public" StyleClasses="PDABackground" />
|
||||
<PanelContainer Name="Border" StyleClasses="PDABorderRect" />
|
||||
<PanelContainer Name="AccentH" Margin="-1 170 -2 170" Access="Public" StyleClasses="PdaBackground" />
|
||||
<PanelContainer Name="AccentV" Margin="220 -1 220 -1" Access="Public" StyleClasses="PdaBackground" />
|
||||
<PanelContainer Name="Border" StyleClasses="PdaBorderRect" />
|
||||
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
|
||||
<!--Heading-->
|
||||
<BoxContainer SetHeight="26" Margin="4 2 8 0" Orientation="Horizontal">
|
||||
@@ -16,16 +16,16 @@
|
||||
<!--Content-->
|
||||
<Control Margin="18 0" RectClipContent="True" VerticalExpand="true"
|
||||
HorizontalExpand="True">
|
||||
<PanelContainer Name="ContentBorder" StyleClasses="PDABackground"/>
|
||||
<PanelContainer Name="ContentBorder" StyleClasses="PdaBackground"/>
|
||||
<Control Margin="3 3">
|
||||
<PanelContainer Name="ContentBackground" StyleClasses="PDAContentBackground"/>
|
||||
<BoxContainer Access="Public" Name="ContentsContainer" Orientation="Vertical" StyleClasses="PDAContent"/>
|
||||
<PanelContainer Name="ContentBackground" StyleClasses="PdaContentBackground"/>
|
||||
<BoxContainer Access="Public" Name="ContentsContainer" Orientation="Vertical" StyleClasses="PdaContent"/>
|
||||
|
||||
</Control>
|
||||
</Control>
|
||||
<!--Footer-->
|
||||
<BoxContainer Orientation="Horizontal" SetHeight="28">
|
||||
<Label Text="Personal Digital Assistant" StyleClasses="PDAWindowFooterText" Margin="32 0 0 6"/>
|
||||
<Label Text="Personal Digital Assistant" StyleClasses="PdaWindowFooterText" Margin="32 0 0 6"/>
|
||||
</BoxContainer>
|
||||
</BoxContainer>
|
||||
</pda:PDAWindow>
|
||||
</pda:PdaWindow>
|
||||
@@ -6,7 +6,7 @@ namespace Content.Client.PDA;
|
||||
|
||||
[Virtual]
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class PDAWindow : BaseWindow
|
||||
public partial class PdaWindow : BaseWindow
|
||||
{
|
||||
|
||||
public string? BorderColor
|
||||
@@ -38,7 +38,7 @@ public partial class PDAWindow : BaseWindow
|
||||
}
|
||||
}
|
||||
|
||||
public PDAWindow()
|
||||
public PdaWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<BoxContainer Orientation="Horizontal">
|
||||
<PanelContainer Name="Background"
|
||||
Access="Public"
|
||||
StyleClasses="PDABackground"
|
||||
StyleClasses="PdaBackground"
|
||||
VerticalExpand="False"
|
||||
HorizontalExpand="False"
|
||||
MaxWidth="10"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<BoxContainer Name="MainContainer" Orientation="Vertical" Margin="10 0 10 10">
|
||||
<PanelContainer Name="Background"
|
||||
Access="Public"
|
||||
StyleClasses="PDABackground"
|
||||
StyleClasses="PdaBackground"
|
||||
MinHeight="15"
|
||||
VerticalExpand="False"
|
||||
HorizontalExpand="True"
|
||||
|
||||
@@ -1396,56 +1396,56 @@ namespace Content.Client.Stylesheets
|
||||
.Prop("font-color", DisabledFore),
|
||||
|
||||
//PDA - Backgrounds
|
||||
Element<PanelContainer>().Class("PDAContentBackground")
|
||||
Element<PanelContainer>().Class("PdaContentBackground")
|
||||
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#25252a")),
|
||||
|
||||
Element<PanelContainer>().Class("PDABackground")
|
||||
Element<PanelContainer>().Class("PdaBackground")
|
||||
.Prop(PanelContainer.StylePropertyPanel, BaseButtonOpenBoth)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#000000")),
|
||||
|
||||
Element<PanelContainer>().Class("PDABackgroundRect")
|
||||
Element<PanelContainer>().Class("PdaBackgroundRect")
|
||||
.Prop(PanelContainer.StylePropertyPanel, BaseAngleRect)
|
||||
.Prop(Control.StylePropertyModulateSelf, Color.FromHex("#717059")),
|
||||
|
||||
Element<PanelContainer>().Class("PDABorderRect")
|
||||
Element<PanelContainer>().Class("PdaBorderRect")
|
||||
.Prop(PanelContainer.StylePropertyPanel, AngleBorderRect),
|
||||
|
||||
Element<PanelContainer>().Class("BackgroundDark")
|
||||
.Prop(PanelContainer.StylePropertyPanel, new StyleBoxFlat(Color.FromHex("#25252A"))),
|
||||
|
||||
//PDA - Buttons
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.NormalBgColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.EnabledFgColor)),
|
||||
Element<PdaSettingsButton>().Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
|
||||
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.HoverColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.EnabledFgColor)),
|
||||
Element<PdaSettingsButton>().Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.HoverColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
|
||||
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.PressedColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.EnabledFgColor)),
|
||||
Element<PdaSettingsButton>().Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.PressedColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.EnabledFgColor)),
|
||||
|
||||
Element<PDASettingsButton>().Pseudo(ContainerButton.StylePseudoClassDisabled)
|
||||
.Prop(PDASettingsButton.StylePropertyBgColor, Color.FromHex(PDASettingsButton.NormalBgColor))
|
||||
.Prop(PDASettingsButton.StylePropertyFgColor, Color.FromHex(PDASettingsButton.DisabledFgColor)),
|
||||
Element<PdaSettingsButton>().Pseudo(ContainerButton.StylePseudoClassDisabled)
|
||||
.Prop(PdaSettingsButton.StylePropertyBgColor, Color.FromHex(PdaSettingsButton.NormalBgColor))
|
||||
.Prop(PdaSettingsButton.StylePropertyFgColor, Color.FromHex(PdaSettingsButton.DisabledFgColor)),
|
||||
|
||||
Element<PDAProgramItem>().Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PDAProgramItem.StylePropertyBgColor, Color.FromHex(PDAProgramItem.NormalBgColor)),
|
||||
Element<PdaProgramItem>().Pseudo(ContainerButton.StylePseudoClassNormal)
|
||||
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.NormalBgColor)),
|
||||
|
||||
Element<PDAProgramItem>().Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PDAProgramItem.StylePropertyBgColor, Color.FromHex(PDAProgramItem.HoverColor)),
|
||||
Element<PdaProgramItem>().Pseudo(ContainerButton.StylePseudoClassHover)
|
||||
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
|
||||
|
||||
Element<PDAProgramItem>().Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PDAProgramItem.StylePropertyBgColor, Color.FromHex(PDAProgramItem.HoverColor)),
|
||||
Element<PdaProgramItem>().Pseudo(ContainerButton.StylePseudoClassPressed)
|
||||
.Prop(PdaProgramItem.StylePropertyBgColor, Color.FromHex(PdaProgramItem.HoverColor)),
|
||||
|
||||
//PDA - Text
|
||||
Element<Label>().Class("PDAContentFooterText")
|
||||
Element<Label>().Class("PdaContentFooterText")
|
||||
.Prop(Label.StylePropertyFont, notoSans10)
|
||||
.Prop(Label.StylePropertyFontColor, Color.FromHex("#757575")),
|
||||
|
||||
Element<Label>().Class("PDAWindowFooterText")
|
||||
Element<Label>().Class("PdaWindowFooterText")
|
||||
.Prop(Label.StylePropertyFont, notoSans10)
|
||||
.Prop(Label.StylePropertyFontColor, Color.FromHex("#333d3b")),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user