-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,104 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<BoxContainer xmlns="https://spacestation14.io" | ||
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" | ||
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls" | ||
Margin="5 5" | ||
HorizontalExpand="True" | ||
Visible="True"> | ||
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True"> | ||
<BoxContainer Orientation="Horizontal"> | ||
<BoxContainer Orientation="Vertical" VerticalAlignment="Center"> | ||
<CheckBox Name="GroupCheckbox" HorizontalAlignment="Center"/> | ||
</BoxContainer> | ||
<customControls:VSeparator Margin="0 0 10 0"/> | ||
<BoxContainer Orientation="Vertical" HorizontalExpand="True"> | ||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True"> | ||
<TextureRect Name="JobIcon" VerticalAlignment="Center" TextureScale="2 2"/> | ||
<Control MinWidth="4"/> | ||
<Label Name="JobLabel" Text=" " HorizontalAlignment="Center"/> | ||
</BoxContainer> | ||
<Control MinHeight="4"/> | ||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True"> | ||
<Label Name="TimeLabel" Text="{Loc time-transfer-panel-time}" HorizontalAlignment="Center"/> | ||
<Control MinWidth="5"/> | ||
<LineEdit Name="TimeEdit" PlaceHolder="0h0m" HorizontalExpand="True"/> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</BoxContainer> | ||
</PanelContainer> | ||
</BoxContainer> |
46 changes: 46 additions & 0 deletions
46
Content.Client/_Goobstation/Administration/UI/TimeTransferPanel/TimeTransferEntry.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using Content.Shared.Roles; | ||
using Content.Shared.StatusIcon; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.GameObjects; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Client._Goobstation.Administration.UI.TimeTransferPanel; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class TimeTransferEntry : BoxContainer | ||
{ | ||
public string PlaytimeTracker; | ||
public string JobName; | ||
|
||
public TimeTransferEntry(JobPrototype jobProto, SpriteSystem spriteSystem, IPrototypeManager prototypeManager) | ||
{ | ||
RobustXamlLoader.Load(this); | ||
IoCManager.InjectDependencies(this); | ||
|
||
PlaytimeTracker = jobProto.PlayTimeTracker; | ||
JobLabel.Text = jobProto.LocalizedName; | ||
JobName = jobProto.LocalizedName; | ||
|
||
if (prototypeManager.TryIndex<JobIconPrototype>(jobProto.Icon, out var jobIcon)) | ||
JobIcon.Texture = spriteSystem.Frame0(jobIcon.Icon); | ||
} | ||
|
||
public void UpdateGroupVisibility(bool inGrouped) | ||
{ | ||
TimeLabel.Visible = !inGrouped; | ||
TimeEdit.Visible = !inGrouped; | ||
GroupCheckbox.Visible = inGrouped; | ||
} | ||
|
||
public string GetJobTimeString() | ||
{ | ||
return TimeEdit.Text != null ? TimeEdit.Text : ""; | ||
} | ||
|
||
public bool InGroup() | ||
{ | ||
return GroupCheckbox.Pressed; | ||
} | ||
} |
Oops, something went wrong.