-
Notifications
You must be signed in to change notification settings - Fork 401
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
deltanedas
committed
Feb 7, 2025
1 parent
d0159f1
commit 396b8a3
Showing
3 changed files
with
57 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<BoxContainer xmlns="https://spacestation14.io" | ||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" | ||
Orientation="Horizontal" | ||
HorizontalExpand="true" | ||
MinHeight="64"> | ||
<Label Name="Title"/> <!-- Set in constructor --> | ||
<BoxContainer Orientation="Vertical"> | ||
<Button Name="CompleteButton" Text="Complete"/> | ||
<Button Name="RejectButton" Text="Reject"/> | ||
</BoxContainer> | ||
</BoxContainer> |
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 @@ | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client._DV.Reputation.UI; | ||
|
||
/// <summary> | ||
/// Contract control placed in a slot that has a contract active. | ||
/// </summary> | ||
[GenerateTypedNameReferences] | ||
public sealed partial class Contract : BoxContainer | ||
{ | ||
public event Action OnComplete; | ||
public event Action OnReject; | ||
|
||
public ContractsWindow(string title) | ||
{ | ||
RobustXamlLoader.Load(this); | ||
|
||
Title.text = title; | ||
|
||
CompleteButton.OnPressed += _ => OnComplete?.Invoke(); | ||
RejectButton.OnPressed += _ => OnReject?.Invoke(); | ||
|
||
OnComplete += () => Orphan(); | ||
OnReject += () => Orphan(); | ||
} | ||
} |
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