Skip to content

Commit 52945db

Browse files
committed
Update PanelPusher.cs
1 parent faf11b8 commit 52945db

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Runtime/PanelSystem/PanelPusher.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,26 @@ public void Push()
2424
{
2525
controller = new PanelViewController(panelType);
2626
}
27-
27+
2828
stack.Push(controller);
2929
}
30+
31+
public void ClearAndPush()
32+
{
33+
IPanelViewController controller;
34+
35+
if (provider != null)
36+
{
37+
controller = provider.GetOrCreate(panelType);
38+
}
39+
else
40+
{
41+
controller = new PanelViewController(panelType);
42+
}
43+
44+
stack.ClearAndPush(controller);
45+
}
46+
3047
}
3148
}
3249

0 commit comments

Comments
 (0)