RynthSuite as of 2026-09-05 (internal a5ff5c2)
A snapshot of the working tree for aelrynth.com/git/: the code, build files and public docs. Internal review notes and agent instructions are left out. MIT licensed; see LICENSE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
0a4b611a90
166 changed files with 186537 additions and 0 deletions
47
Tools/RynthCore.LootEditor/ConfirmDialog.cs
Normal file
47
Tools/RynthCore.LootEditor/ConfirmDialog.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace RynthCore.LootEditor;
|
||||
|
||||
/// <summary>Simple Yes/No confirmation dialog.</summary>
|
||||
public class ConfirmDialog : Window
|
||||
{
|
||||
public ConfirmDialog(string message)
|
||||
{
|
||||
Title = "Confirm";
|
||||
Width = 360;
|
||||
Height = 150;
|
||||
CanResize = false;
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
Background = new SolidColorBrush(Color.Parse("#171F29"));
|
||||
|
||||
var panel = new StackPanel { Margin = new Thickness(16), Spacing = 16 };
|
||||
|
||||
panel.Children.Add(new TextBlock
|
||||
{
|
||||
Text = message,
|
||||
Foreground = Brushes.White,
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
});
|
||||
|
||||
var buttons = new StackPanel
|
||||
{
|
||||
Orientation = Orientation.Horizontal,
|
||||
HorizontalAlignment = HorizontalAlignment.Right,
|
||||
Spacing = 8,
|
||||
};
|
||||
|
||||
var yes = new Button { Content = "Yes", Width = 72 };
|
||||
var no = new Button { Content = "No", Width = 72 };
|
||||
yes.Click += (_, _) => Close(true);
|
||||
no.Click += (_, _) => Close(false);
|
||||
|
||||
buttons.Children.Add(yes);
|
||||
buttons.Children.Add(no);
|
||||
panel.Children.Add(buttons);
|
||||
|
||||
Content = panel;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue