0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-09-13 18:20:30 +03:00

Allow to view cp .dat in UI

This commit is contained in:
bird_egop
2025-09-04 02:45:26 +03:00
parent 7f0246f996
commit f2bed4b141
14 changed files with 301 additions and 162 deletions

View File

@@ -1,4 +1,5 @@
using System.Numerics;
using CpDatLib;
using ImGuiNET;
using MissionTmaLib;
using MissionTmaLib.Parsing;
@@ -18,6 +19,7 @@ namespace NResUI.ImGuiUI
ScrViewModel scrViewModel,
MissionTmaViewModel missionTmaViewModel,
VarsetViewModel varsetViewModel,
CpDatSchemeViewModel cpDatSchemeViewModel,
MessageBoxModalPanel messageBox)
: IImGuiPanel
{
@@ -121,6 +123,21 @@ namespace NResUI.ImGuiUI
}
}
if (ImGui.MenuItem("Open cp .dat Scheme File"))
{
var result = Dialog.FileOpen("dat");
if (result.IsOk)
{
var path = result.Path;
var parseResult = CpDatParser.Parse(path);
cpDatSchemeViewModel.SetParseResult(parseResult, path);
Console.WriteLine("Read cp .dat");
}
}
if (nResExplorerViewModel.HasFile)
{
if (ImGui.MenuItem("Экспортировать NRes"))