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

Examples and fixes

This commit is contained in:
bird_egop
2025-09-04 03:13:46 +03:00
parent f2bed4b141
commit be60d8d72f
7 changed files with 26 additions and 19 deletions

View File

@@ -1,8 +1,7 @@
using CpDatLib;
using CpDatLib;
using ImGuiNET;
using NResUI.Abstractions;
using NResUI.Models;
using ScrLib;
namespace NResUI.ImGuiUI;
@@ -19,6 +18,9 @@ public class CpDatSchemeExplorer : IImGuiPanel
{
if (ImGui.Begin("cp .dat Scheme Explorer"))
{
ImGui.Text("cp .dat - это файл схема здания или робота. Их можно найти в папке UNITS");
ImGui.Separator();
var cpDat = _viewModel.CpDatScheme;
if (_viewModel.HasFile && cpDat is not null)
{
@@ -32,8 +34,7 @@ public class CpDatSchemeExplorer : IImGuiPanel
ImGui.Separator();
if (ImGui.BeginTable("content", 7,
ImGuiTableFlags.Borders | ImGuiTableFlags.SizingFixedFit | ImGuiTableFlags.NoHostExtendX))
if (ImGui.BeginTable("content", 7, ImGuiTableFlags.Borders | ImGuiTableFlags.SizingFixedFit | ImGuiTableFlags.NoHostExtendX))
{
ImGui.TableSetupColumn("Уровень вложенности");
ImGui.TableSetupColumn("Архив");
@@ -69,8 +70,7 @@ public class CpDatSchemeExplorer : IImGuiPanel
void DrawEntry(CpDatEntry entry, int index)
{
if (ImGui.TreeNodeEx(
$"Элемент: \"{entry.ArchiveFile}/{entry.ArchiveEntryName}\" - {entry.Description}##entry_{index}"))
if (ImGui.TreeNodeEx($"Элемент: \"{entry.ArchiveFile}/{entry.ArchiveEntryName}\" - {entry.Description}##entry_{index}"))
{
ImGui.Text("Magic1: ");
ImGui.SameLine();
@@ -88,17 +88,9 @@ public class CpDatSchemeExplorer : IImGuiPanel
ImGui.SameLine();
ImGui.Text(entry.ChildCount.ToString());
if (entry.Children.Count > 0)
foreach (var child in entry.Children)
{
if (ImGui.TreeNodeEx("Дочерние элементы"))
{
foreach (var child in entry.Children)
{
DrawEntry(child, ++index);
}
ImGui.TreePop();
}
DrawEntry(child, ++index);
}
ImGui.TreePop();
@@ -113,8 +105,8 @@ public class CpDatSchemeExplorer : IImGuiPanel
{
ImGui.Text("cp .dat не открыт");
}
ImGui.End();
}
ImGui.End();
}
}

View File

@@ -1,4 +1,4 @@
using System.Numerics;
using System.Numerics;
using CpDatLib;
using ImGuiNET;
using MissionTmaLib;

View File

@@ -18,6 +18,9 @@ public class MissionTmaExplorer : IImGuiPanel
{
if (ImGui.Begin("Mission TMA Explorer"))
{
ImGui.Text("data.tma - это файл миссии. Его можно найти в папке MISSIONS");
ImGui.Separator();
var mission = _viewModel.Mission;
if (_viewModel.HasFile && mission is not null)
{

View File

@@ -17,6 +17,9 @@ public class NResExplorerPanel : IImGuiPanel
{
if (ImGui.Begin("NRes Explorer"))
{
ImGui.Text("NRes - это файл-архив. Они имеют разные расширения. Примеры - Textures.lib, weapon.rlb, object.dlb, behpsp.res");
ImGui.Separator();
if (!_viewModel.HasFile)
{
ImGui.Text("No NRes is opened");

View File

@@ -18,6 +18,9 @@ public class ScrExplorer : IImGuiPanel
{
if (ImGui.Begin("SCR Explorer"))
{
ImGui.Text("scr - это файл AI скриптов. Их можно найти в папке MISSIONS/SCRIPTS");
ImGui.Separator();
var scr = _viewModel.Scr;
if (_viewModel.HasFile && scr is not null)
{

View File

@@ -21,6 +21,9 @@ public class TexmExplorer : IImGuiPanel
{
if (ImGui.Begin("TEXM Explorer"))
{
ImGui.Text("TEXM - это файл текстуры. Их можно найти внутри NRes архивов, например Textures.lib");
ImGui.Separator();
if (!_viewModel.HasFile)
{
ImGui.Text("No TEXM opened");

View File

@@ -17,6 +17,9 @@ public class VarsetExplorerPanel : IImGuiPanel
{
if (ImGui.Begin("VARSET Explorer"))
{
ImGui.Text(".var - это файл динамических настроек. Можно найти в MISSIONS/SCRIPTS/varset.var, а также внутри behpsp.res");
ImGui.Separator();
if (_viewModel.Items.Count == 0)
{
ImGui.Text("VARSET не загружен");