* DungeonData rework Back to fields, serializes better, just make new layers dumby. * wawawewa * Fix this * Fixes * Port the work over * wawawewa * zoom * Kinda workin * Adjust wawa * Unloading work * Ore + entitytable fixes Iterate every dungeon not just last. * Big shot * wawawewa * Fixes * true * Fixes # Conflicts: # Content.Server/Procedural/DungeonJob/DungeonJob.cs * wawawewa * Fixes * Fix * Lot of work * wawawewa * Fixing * eh? * a * Fix a heap of stuff * Better ignored check * Reserve tile changes * biome * changes * wawawewa * Fixes & snow * Shadow fixes * wawawewa * smol * Add layer API * More work * wawawewa * Preloads and running again * wawawewa * Modified * Replacements and command * Runtime support * werk * Fix expeds + dungeon alltiles * reh --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
74 lines
1.8 KiB
C#
74 lines
1.8 KiB
C#
using Content.Client.Stylesheets;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client.Salvage.UI;
|
|
|
|
/// <summary>
|
|
/// Generic window for offering multiple selections with a timer.
|
|
/// </summary>
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class OfferingWindowOption : PanelContainer
|
|
{
|
|
private bool _claimed;
|
|
|
|
public string? Title
|
|
{
|
|
get => TitleStripe.Text;
|
|
set => TitleStripe.Text = value;
|
|
}
|
|
|
|
public event Action<BaseButton.ButtonEventArgs>? ClaimPressed;
|
|
|
|
public OfferingWindowOption()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
|
BigPanel.PanelOverride = new StyleBoxFlat(new Color(30, 30, 34));
|
|
|
|
ClaimButton.OnPressed += args =>
|
|
{
|
|
ClaimPressed?.Invoke(args);
|
|
};
|
|
}
|
|
|
|
public void AddContent(Control control)
|
|
{
|
|
ContentBox.AddChild(control);
|
|
}
|
|
|
|
public bool Disabled
|
|
{
|
|
get => ClaimButton.Disabled;
|
|
set => ClaimButton.Disabled = value;
|
|
}
|
|
|
|
public bool Claimed
|
|
{
|
|
get => _claimed;
|
|
set
|
|
{
|
|
if (_claimed == value)
|
|
return;
|
|
|
|
_claimed = value;
|
|
|
|
if (_claimed)
|
|
{
|
|
ClaimButton.AddStyleClass(StyleBase.ButtonCaution);
|
|
ClaimButton.Text = Loc.GetString("offering-window-claimed");
|
|
}
|
|
else
|
|
{
|
|
ClaimButton.RemoveStyleClass(StyleBase.ButtonCaution);
|
|
ClaimButton.Text = Loc.GetString("offering-window-claim");
|
|
}
|
|
}
|
|
}
|
|
}
|