Skip to content

Commit eeb4985

Browse files
committed
Allow dialog customizable
1 parent b89c5e8 commit eeb4985

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

Packages/com.github.asus4.nativedialog/Runtime/DialogManager.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static DialogManager Instance
4343
private IDialog dialog;
4444
#endregion
4545

46-
#region Lifecycles
46+
#region Life cycles
4747
private void Awake()
4848
{
4949
if (instance == null)
@@ -99,6 +99,15 @@ private void OnDestroy()
9999

100100
#region Public Methods
101101

102+
/// <summary>
103+
/// Gets or sets the custom dialog implementation.
104+
/// </summary>
105+
public IDialog CustomDialog
106+
{
107+
get { return dialog; }
108+
set { dialog = value; }
109+
}
110+
102111
/// <summary>
103112
/// Sets the button labels for all future dialogs.
104113
/// </summary>

Packages/com.github.asus4.nativedialog/Runtime/Internal/IDialog.cs renamed to Packages/com.github.asus4.nativedialog/Runtime/IDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace NativeDialog
44
/// Interface for platform-specific dialog implementations.
55
/// Defines methods for showing native dialogs across different platforms.
66
/// </summary>
7-
internal interface IDialog : System.IDisposable
7+
public interface IDialog : System.IDisposable
88
{
99
void SetLabel(string decide, string cancel, string close);
1010
int ShowSelect(string message);

Packages/com.github.asus4.nativedialog/Runtime/Internal/IDialog.cs.meta renamed to Packages/com.github.asus4.nativedialog/Runtime/IDialog.cs.meta

File renamed without changes.

0 commit comments

Comments
 (0)