mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 00:18:02 +03:00
add export
This commit is contained in:
33
NResUI/ImGuiUI/MessageBoxModalPanel.cs
Normal file
33
NResUI/ImGuiUI/MessageBoxModalPanel.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System.Numerics;
|
||||
using ImGuiNET;
|
||||
using NResUI.Abstractions;
|
||||
|
||||
namespace NResUI.ImGuiUI;
|
||||
|
||||
public class MessageBoxModalPanel : ImGuiModalPanel
|
||||
{
|
||||
private string? _text;
|
||||
protected override string ImGuiId { get; } = "#message-box";
|
||||
|
||||
public MessageBoxModalPanel()
|
||||
{
|
||||
WindowSize = new Vector2(300, 150);
|
||||
}
|
||||
|
||||
public void Show(string? text)
|
||||
{
|
||||
_text = text;
|
||||
base.Open();
|
||||
}
|
||||
|
||||
protected override void OnImGuiRenderContent()
|
||||
{
|
||||
ImGui.Text(_text);
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGui.Button("Ок"))
|
||||
{
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user