port Raven Software StripEditor from WinForms to UWT and add Waypoint editor (still preliminary)
This commit is contained in:
parent
c4728b6566
commit
a7e6b55023
@ -0,0 +1,262 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.24"/>
|
||||
<object class="GtkTreeStore" id="tm">
|
||||
<columns>
|
||||
<!-- column-name colStringID -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name colStringLanguage -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name colStringValue -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkWindow">
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=3 -->
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-start">8</property>
|
||||
<property name="margin-end">8</property>
|
||||
<property name="margin-top">8</property>
|
||||
<property name="margin-bottom">8</property>
|
||||
<property name="row-spacing">4</property>
|
||||
<property name="column-spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="txtReference">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="txtDescription">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="txtID">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">ID</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Reference</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes">Description</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkToolbar" id="tbEntries">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="tsbEntryAdd">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Add</property>
|
||||
<property name="label" translatable="yes">Add</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="stock-id">gtk-add</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="tsbEntryEdit">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Edit</property>
|
||||
<property name="label" translatable="yes">Edit</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="stock-id">gtk-edit</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="tsbEntryRemove">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Remove</property>
|
||||
<property name="label" translatable="yes">Remove</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="stock-id">gtk-remove</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="tsbEntryClearAllNonEnglish">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Clear All Non-English Translations</property>
|
||||
<property name="label" translatable="yes">Clear All Non-English Translations</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="stock-id">gtk-clear</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="tv">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="model">tm</property>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcStringID">
|
||||
<property name="resizable">True</property>
|
||||
<property name="title" translatable="yes">ID</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcStringLanguage">
|
||||
<property name="resizable">True</property>
|
||||
<property name="title" translatable="yes">Language</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcStringValue">
|
||||
<property name="resizable">True</property>
|
||||
<property name="title" translatable="yes">Value</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">2</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@ -0,0 +1,17 @@
|
||||
<UniversalEditor Version="4.0">
|
||||
<Editors>
|
||||
<Editor ID="{57f32f5b-3a1b-4d55-9b84-719567a149cc}" TypeName="UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Strip.StripEditor">
|
||||
<SupportedObjectModels>
|
||||
<SupportedObjectModel TypeName="UniversalEditor.Plugins.RavenSoftware.ObjectModels.TranslationSet.TranslationSetObjectModel" />
|
||||
</SupportedObjectModels>
|
||||
<Commands>
|
||||
<Command ID="ToolsCheckMissingTranslationSets" Title="Check Missing Translation Sets" InsertBefore="ToolsOptions" />
|
||||
<Command ID="Tools">
|
||||
<Items>
|
||||
<CommandReference CommandID="ToolsCheckMissingTranslationSets" />
|
||||
</Items>
|
||||
</Command>
|
||||
</Commands>
|
||||
</Editor>
|
||||
</Editors>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.24"/>
|
||||
<object class="GtkTreeStore" id="tmWayponts">
|
||||
<columns>
|
||||
<!-- column-name colWaypointIndex -->
|
||||
<column type="gint"/>
|
||||
<!-- column-name colWaypointType -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name colWaypointA -->
|
||||
<column type="gdouble"/>
|
||||
<!-- column-name colWaypointX -->
|
||||
<column type="gdouble"/>
|
||||
<!-- column-name colWaypointY -->
|
||||
<column type="gdouble"/>
|
||||
<!-- column-name colWaypointZ -->
|
||||
<column type="gdouble"/>
|
||||
<!-- column-name colWaypointListStr -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name colWaypointQ -->
|
||||
<column type="gdouble"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkWindow">
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="tvWaypoints">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="model">tmWayponts</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointIndex">
|
||||
<property name="title" translatable="yes">Index</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointType">
|
||||
<property name="title" translatable="yes">Type</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointA">
|
||||
<property name="title" translatable="yes">A</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">2</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointX">
|
||||
<property name="title" translatable="yes">X</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">3</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointY">
|
||||
<property name="title" translatable="yes">Y</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">4</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointZ">
|
||||
<property name="title" translatable="yes">Z</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">5</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointListstr">
|
||||
<property name="title" translatable="yes">liststr</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">6</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="tvcWaypointQ">
|
||||
<property name="title" translatable="yes">Q</property>
|
||||
<property name="clickable">True</property>
|
||||
<property name="reorderable">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">7</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@ -323,6 +323,9 @@
|
||||
<Content Include="Templates\Project\File Distribution\Images\FileSystem_32x32.png" />
|
||||
<Content Include="Editors\Multimedia3D\Scene\Panels\MotionTestPanel.uexml" />
|
||||
<Content Include="Editors\Multimedia3D\Scene\Panels\MotionTestPanel.glade" />
|
||||
<Content Include="Editors\RavenSoftware\Waypoint\WaypointEditor.glade" />
|
||||
<Content Include="Editors\RavenSoftware\Strip\StripEditor.uexml" />
|
||||
<Content Include="Editors\RavenSoftware\Strip\StripEditor.glade" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Configuration\Application.upl" />
|
||||
@ -359,6 +362,7 @@
|
||||
<Folder Include="Panels\PropertyList\" />
|
||||
<Folder Include="Editors\Multimedia\Picture\" />
|
||||
<Folder Include="Templates\Project\General\Images\" />
|
||||
<Folder Include="Editors\RavenSoftware\Strip\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Templates\Project\Concertroid\Images\Concert.xcf" />
|
||||
|
||||
@ -1,236 +0,0 @@
|
||||
namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.RavenSoftware.Strip
|
||||
{
|
||||
partial class StripEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.lv = new System.Windows.Forms.ListView();
|
||||
this.chGroup = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.chLanguage = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.chValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.fraList = new System.Windows.Forms.GroupBox();
|
||||
this.fraEditor = new System.Windows.Forms.GroupBox();
|
||||
this.cmdRemove = new System.Windows.Forms.Button();
|
||||
this.cmdUpdate = new System.Windows.Forms.Button();
|
||||
this.txtValue = new System.Windows.Forms.TextBox();
|
||||
this.cboLanguage = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.cboGroup = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.fraList.SuspendLayout();
|
||||
this.fraEditor.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lv
|
||||
//
|
||||
this.lv.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.chGroup,
|
||||
this.chLanguage,
|
||||
this.chValue});
|
||||
this.lv.FullRowSelect = true;
|
||||
this.lv.GridLines = true;
|
||||
this.lv.HideSelection = false;
|
||||
this.lv.Location = new System.Drawing.Point(6, 19);
|
||||
this.lv.Name = "lv";
|
||||
this.lv.Size = new System.Drawing.Size(468, 160);
|
||||
this.lv.TabIndex = 0;
|
||||
this.lv.UseCompatibleStateImageBehavior = false;
|
||||
this.lv.View = System.Windows.Forms.View.Details;
|
||||
this.lv.SelectedIndexChanged += new System.EventHandler(this.lv_SelectedIndexChanged);
|
||||
//
|
||||
// chGroup
|
||||
//
|
||||
this.chGroup.Text = "Group";
|
||||
this.chGroup.Width = 122;
|
||||
//
|
||||
// chLanguage
|
||||
//
|
||||
this.chLanguage.Text = "Language";
|
||||
this.chLanguage.Width = 129;
|
||||
//
|
||||
// chValue
|
||||
//
|
||||
this.chValue.Text = "Value";
|
||||
this.chValue.Width = 208;
|
||||
//
|
||||
// fraList
|
||||
//
|
||||
this.fraList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.fraList.Controls.Add(this.lv);
|
||||
this.fraList.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.fraList.Location = new System.Drawing.Point(3, 3);
|
||||
this.fraList.Name = "fraList";
|
||||
this.fraList.Size = new System.Drawing.Size(480, 185);
|
||||
this.fraList.TabIndex = 1;
|
||||
this.fraList.TabStop = false;
|
||||
this.fraList.Text = "Entry list";
|
||||
//
|
||||
// fraEditor
|
||||
//
|
||||
this.fraEditor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.fraEditor.Controls.Add(this.cmdRemove);
|
||||
this.fraEditor.Controls.Add(this.cmdUpdate);
|
||||
this.fraEditor.Controls.Add(this.txtValue);
|
||||
this.fraEditor.Controls.Add(this.cboLanguage);
|
||||
this.fraEditor.Controls.Add(this.label3);
|
||||
this.fraEditor.Controls.Add(this.label2);
|
||||
this.fraEditor.Controls.Add(this.cboGroup);
|
||||
this.fraEditor.Controls.Add(this.label1);
|
||||
this.fraEditor.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.fraEditor.Location = new System.Drawing.Point(3, 194);
|
||||
this.fraEditor.Name = "fraEditor";
|
||||
this.fraEditor.Size = new System.Drawing.Size(480, 146);
|
||||
this.fraEditor.TabIndex = 2;
|
||||
this.fraEditor.TabStop = false;
|
||||
this.fraEditor.Text = "Entry editor";
|
||||
//
|
||||
// cmdRemove
|
||||
//
|
||||
this.cmdRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmdRemove.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.cmdRemove.Location = new System.Drawing.Point(399, 77);
|
||||
this.cmdRemove.Name = "cmdRemove";
|
||||
this.cmdRemove.Size = new System.Drawing.Size(75, 23);
|
||||
this.cmdRemove.TabIndex = 3;
|
||||
this.cmdRemove.Text = "&Remove";
|
||||
this.cmdRemove.UseVisualStyleBackColor = true;
|
||||
this.cmdRemove.Click += new System.EventHandler(this.cmdRemove_Click);
|
||||
//
|
||||
// cmdUpdate
|
||||
//
|
||||
this.cmdUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cmdUpdate.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.cmdUpdate.Location = new System.Drawing.Point(399, 48);
|
||||
this.cmdUpdate.Name = "cmdUpdate";
|
||||
this.cmdUpdate.Size = new System.Drawing.Size(75, 23);
|
||||
this.cmdUpdate.TabIndex = 3;
|
||||
this.cmdUpdate.Text = "Upd&ate";
|
||||
this.cmdUpdate.UseVisualStyleBackColor = true;
|
||||
this.cmdUpdate.Click += new System.EventHandler(this.cmdUpdate_Click);
|
||||
//
|
||||
// txtValue
|
||||
//
|
||||
this.txtValue.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtValue.Location = new System.Drawing.Point(86, 48);
|
||||
this.txtValue.Multiline = true;
|
||||
this.txtValue.Name = "txtValue";
|
||||
this.txtValue.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.txtValue.Size = new System.Drawing.Size(307, 92);
|
||||
this.txtValue.TabIndex = 2;
|
||||
//
|
||||
// cboLanguage
|
||||
//
|
||||
this.cboLanguage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cboLanguage.FormattingEnabled = true;
|
||||
this.cboLanguage.Location = new System.Drawing.Point(273, 19);
|
||||
this.cboLanguage.Name = "cboLanguage";
|
||||
this.cboLanguage.Size = new System.Drawing.Size(201, 21);
|
||||
this.cboLanguage.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.label3.Location = new System.Drawing.Point(22, 51);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(37, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "&Value:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.label2.Location = new System.Drawing.Point(209, 22);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(58, 13);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "&Language:";
|
||||
//
|
||||
// cboGroup
|
||||
//
|
||||
this.cboGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cboGroup.FormattingEnabled = true;
|
||||
this.cboGroup.Location = new System.Drawing.Point(86, 19);
|
||||
this.cboGroup.Name = "cboGroup";
|
||||
this.cboGroup.Size = new System.Drawing.Size(117, 21);
|
||||
this.cboGroup.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
|
||||
this.label1.Location = new System.Drawing.Point(22, 22);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(39, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "&Group:";
|
||||
//
|
||||
// StripEditor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.fraEditor);
|
||||
this.Controls.Add(this.fraList);
|
||||
this.Name = "StripEditor";
|
||||
this.Size = new System.Drawing.Size(486, 343);
|
||||
this.fraList.ResumeLayout(false);
|
||||
this.fraEditor.ResumeLayout(false);
|
||||
this.fraEditor.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView lv;
|
||||
private System.Windows.Forms.ColumnHeader chGroup;
|
||||
private System.Windows.Forms.ColumnHeader chLanguage;
|
||||
private System.Windows.Forms.ColumnHeader chValue;
|
||||
private System.Windows.Forms.GroupBox fraList;
|
||||
private System.Windows.Forms.GroupBox fraEditor;
|
||||
private System.Windows.Forms.Button cmdRemove;
|
||||
private System.Windows.Forms.Button cmdUpdate;
|
||||
private System.Windows.Forms.TextBox txtValue;
|
||||
private System.Windows.Forms.ComboBox cboLanguage;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ComboBox cboGroup;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
@ -1,83 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
using UniversalEditor.ObjectModels.LanguageTranslation;
|
||||
using UniversalEditor.UserInterface;
|
||||
using UniversalEditor.UserInterface.WindowsForms;
|
||||
using MBS.Framework.UserInterface;
|
||||
using MBS.Framework.UserInterface.Controls;
|
||||
using MBS.Framework.UserInterface.Controls.ListView;
|
||||
using MBS.Framework.UserInterface.Dialogs;
|
||||
|
||||
namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.RavenSoftware.Strip
|
||||
using UniversalEditor.ObjectModels.TranslationSet;
|
||||
using UniversalEditor.UserInterface;
|
||||
|
||||
namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Strip
|
||||
{
|
||||
public partial class StripEditor : Editor
|
||||
[ContainerLayout("~/Editors/RavenSoftware/Strip/StripEditor.glade")]
|
||||
public class StripEditor : Editor
|
||||
{
|
||||
private NumericTextBox txtID;
|
||||
private TextBox txtReference;
|
||||
private TextBox txtDescription;
|
||||
|
||||
private Toolbar tbEntries;
|
||||
|
||||
private ListViewControl tv;
|
||||
|
||||
[EventHandler(nameof(txtID), nameof(TextBox.Changed))]
|
||||
private void txtID_Changed(object sender, EventArgs e)
|
||||
{
|
||||
BeginEdit();
|
||||
(ObjectModel as TranslationSetObjectModel).ID = Int32.Parse(txtID.Text);
|
||||
EndEdit();
|
||||
}
|
||||
[EventHandler(nameof(txtReference), nameof(TextBox.Changed))]
|
||||
private void txtReference_Changed(object sender, EventArgs e)
|
||||
{
|
||||
BeginEdit();
|
||||
(ObjectModel as TranslationSetObjectModel).Reference = txtReference.Text;
|
||||
EndEdit();
|
||||
}
|
||||
[EventHandler(nameof(txtDescription), nameof(TextBox.Changed))]
|
||||
private void txtDescription_Changed(object sender, EventArgs e)
|
||||
{
|
||||
BeginEdit();
|
||||
(ObjectModel as TranslationSetObjectModel).Description = txtDescription.Text;
|
||||
EndEdit();
|
||||
}
|
||||
|
||||
private static EditorReference _er = null;
|
||||
public override EditorReference MakeReference()
|
||||
{
|
||||
if (_er == null)
|
||||
{
|
||||
_er = base.MakeReference();
|
||||
_er.Title = "Translation Set Editor";
|
||||
_er.SupportedObjectModels.Add(typeof(TranslationSetObjectModel));
|
||||
}
|
||||
return _er;
|
||||
}
|
||||
|
||||
private void ToolsCheckMissingTranslationSets_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageDialog.ShowDialog("There are no missing translation sets in the translation file. (Good job, this means your task as a translator is complete!)", "RavenTech Stripper", MessageDialogButtons.OK, MessageDialogIcon.Information);
|
||||
}
|
||||
|
||||
public StripEditor()
|
||||
{
|
||||
InitializeComponent();
|
||||
base.SupportedObjectModels.Add(typeof(LanguageTranslationObjectModel));
|
||||
Font = SystemFonts.MenuFont;
|
||||
|
||||
ActionMenuItem mnuTools = (base.MenuBar.Items.Add("mnuTools", "&Tools") as ActionMenuItem);
|
||||
mnuTools.Items.Add("mnuToolsCheckMissingTranslationSets", "Check for missing translation sets", mnuToolsCheckMissingTranslationSets_Click, 3);
|
||||
mnuTools.Items.AddSeparator(3);
|
||||
|
||||
ActionMenuItem mnuHelp = (base.MenuBar.Items.Add("mnuHelp", "&Help") as ActionMenuItem);
|
||||
mnuHelp.Items.Add("mnuHelpAboutStripper", "About RavenTech &Stripper", mnuHelpAboutStripper_Click, -1);
|
||||
Context.AttachCommandEventHandler("ToolsCheckMissingTranslationSets", ToolsCheckMissingTranslationSets_Click);
|
||||
}
|
||||
|
||||
private void mnuToolsCheckMissingTranslationSets_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("There are no missing translation sets in the translation file. (Good job, this means your task as a translator is complete!)", "RavenTech Stripper", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void mnuHelpAboutStripper_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("RavenTech Stripper (Translation Strip Editor)\r\nCopyright (c)2013 Mike Becker's Software\r\nLicensed under the GNU General Public License\r\n\r\nDesigned for use with the RavenTech game engine and Raven Software's customized Jedi Knight II/Jedi Academy engine.", "RavenTech Stripper", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageDialog.ShowDialog("RavenTech Stripper (Translation Strip Editor)\r\nCopyright (c)2013 Mike Becker's Software\r\nLicensed under the GNU General Public License\r\n\r\nDesigned for use with the RavenTech game engine and Raven Software's customized Jedi Knight II/Jedi Academy engine.", "RavenTech Stripper", MessageDialogButtons.OK, MessageDialogIcon.Information);
|
||||
}
|
||||
|
||||
protected override void OnCreated(EventArgs e)
|
||||
{
|
||||
base.OnCreated(e);
|
||||
OnObjectModelChanged(e);
|
||||
}
|
||||
|
||||
protected override void OnObjectModelChanged(EventArgs e)
|
||||
{
|
||||
base.OnObjectModelChanged(e);
|
||||
|
||||
lv.Items.Clear();
|
||||
if (!IsCreated)
|
||||
return;
|
||||
|
||||
LanguageTranslationObjectModel xlate = (ObjectModel as LanguageTranslationObjectModel);
|
||||
tv.Model.Rows.Clear();
|
||||
|
||||
TranslationSetObjectModel xlate = (ObjectModel as TranslationSetObjectModel);
|
||||
if (xlate == null) return;
|
||||
|
||||
Color color = Color.Gainsboro;
|
||||
txtID.Value = xlate.ID;
|
||||
txtReference.Text = xlate.Reference;
|
||||
txtDescription.Text = xlate.Description;
|
||||
|
||||
foreach (Group group in xlate.Groups)
|
||||
foreach (TranslationSetEntry entry in xlate.Entries)
|
||||
{
|
||||
cboGroup.Items.Add(group);
|
||||
// cboGroup.Items.Add(group);
|
||||
|
||||
foreach (Entry entry in group.Entries)
|
||||
foreach (TranslationSetValue value in entry.Values)
|
||||
{
|
||||
ListViewItem lvi = new ListViewItem();
|
||||
lvi.BackColor = color;
|
||||
lvi.Tag = entry;
|
||||
lvi.Text = group.Title;
|
||||
lvi.SubItems.Add(entry.Language);
|
||||
lvi.SubItems.Add(entry.Value);
|
||||
|
||||
if (!cboLanguage.Items.Contains(entry.Language))
|
||||
TreeModelRow row = new TreeModelRow(new TreeModelRowColumn[]
|
||||
{
|
||||
cboLanguage.Items.Add(entry.Language);
|
||||
}
|
||||
lv.Items.Add(lvi);
|
||||
}
|
||||
|
||||
if (color == Color.Gainsboro)
|
||||
{
|
||||
color = Color.White;
|
||||
}
|
||||
else
|
||||
{
|
||||
color = Color.Gainsboro;
|
||||
new TreeModelRowColumn(tv.Model.Columns[0], entry.Reference),
|
||||
new TreeModelRowColumn(tv.Model.Columns[1], value.LanguageIndex),
|
||||
new TreeModelRowColumn(tv.Model.Columns[2], value.Value),
|
||||
// new TreeModelRowColumn(tv.Model.Columns[2], value.Flags.ToString()),
|
||||
});
|
||||
tv.Model.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
lv.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
|
||||
}
|
||||
|
||||
private void lv_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void tv_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
/*
|
||||
cboGroup.Text = String.Empty;
|
||||
cboLanguage.Text = String.Empty;
|
||||
txtValue.Text = String.Empty;
|
||||
@ -101,16 +135,27 @@ namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.RavenSoftw
|
||||
fraEditor.Enabled = true;
|
||||
cmdUpdate.Text = "&Add";
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private void cmdUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Entry entry = (lv.SelectedItems[0].Tag as Entry);
|
||||
// Entry entry = (lv.SelectedItems[0].Tag as Entry);
|
||||
}
|
||||
|
||||
private void cmdRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void UpdateSelections()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override Selection CreateSelectionInternal(object content)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
//
|
||||
// WaypointEditor.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using MBS.Framework.UserInterface;
|
||||
using MBS.Framework.UserInterface.Controls.ListView;
|
||||
using UniversalEditor.ObjectModels.Waypoint;
|
||||
using UniversalEditor.UserInterface;
|
||||
|
||||
namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Waypoint
|
||||
{
|
||||
[ContainerLayout("~/Editors/RavenSoftware/Waypoint/WaypointEditor.glade")]
|
||||
public class WaypointEditor : Editor
|
||||
{
|
||||
private ListViewControl tvWaypoints;
|
||||
|
||||
private static EditorReference _er = null;
|
||||
public override EditorReference MakeReference()
|
||||
{
|
||||
if (_er == null)
|
||||
{
|
||||
_er = base.MakeReference();
|
||||
_er.Title = "Waypoint Editor";
|
||||
_er.SupportedObjectModels.Add(typeof(WaypointObjectModel));
|
||||
}
|
||||
return _er;
|
||||
}
|
||||
|
||||
protected override void OnCreated(EventArgs e)
|
||||
{
|
||||
base.OnCreated(e);
|
||||
|
||||
OnObjectModelChanged(e);
|
||||
}
|
||||
|
||||
protected override void OnObjectModelChanged(EventArgs e)
|
||||
{
|
||||
base.OnObjectModelChanged(e);
|
||||
|
||||
if (!IsCreated)
|
||||
return;
|
||||
|
||||
tvWaypoints.Model.Rows.Clear();
|
||||
|
||||
WaypointObjectModel waypoint = (ObjectModel as WaypointObjectModel);
|
||||
if (waypoint == null)
|
||||
return;
|
||||
|
||||
foreach (WaypointEntry entry in waypoint.Entries)
|
||||
{
|
||||
TreeModelRow row = new TreeModelRow(new TreeModelRowColumn[]
|
||||
{
|
||||
new TreeModelRowColumn(tvWaypoints.Model.Columns[0], entry.Index),
|
||||
new TreeModelRowColumn(tvWaypoints.Model.Columns[1], entry.Type.ToString()),
|
||||
new TreeModelRowColumn(tvWaypoints.Model.Columns[2], entry.A),
|
||||
new TreeModelRowColumn(tvWaypoints.Model.Columns[3], entry.X),
|
||||
new TreeModelRowColumn(tvWaypoints.Model.Columns[4], entry.Y),
|
||||
new TreeModelRowColumn(tvWaypoints.Model.Columns[5], entry.Z),
|
||||
// new TreeModelRowColumn(tvWaypoints.Model.Columns[6], entry.Liststr),
|
||||
new TreeModelRowColumn(tvWaypoints.Model.Columns[7], entry.Q)
|
||||
});
|
||||
|
||||
row.SetExtraData<WaypointEntry>("entry", entry);
|
||||
tvWaypoints.Model.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateSelections()
|
||||
{
|
||||
}
|
||||
|
||||
protected override Selection CreateSelectionInternal(object content)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -40,6 +40,8 @@
|
||||
<Compile Include="Editors\Carcass\CarcassEditor.cs" />
|
||||
<Compile Include="Editors\Carcass\Dialogs\ModelReferencePropertiesDialog.cs" />
|
||||
<Compile Include="Editors\Icarus\KnownSettingsGuids.cs" />
|
||||
<Compile Include="Editors\Waypoint\WaypointEditor.cs" />
|
||||
<Compile Include="Editors\Strip\StripEditor.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Controls\" />
|
||||
@ -48,6 +50,7 @@
|
||||
<Folder Include="SettingsProviders\" />
|
||||
<Folder Include="Editors\Carcass\" />
|
||||
<Folder Include="Editors\Carcass\Dialogs\" />
|
||||
<Folder Include="Editors\Waypoint\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\MBS.Framework\MBS.Framework\MBS.Framework.csproj">
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter HintComparison="MagicThenFilter" Title="Raven Software Strip (string package) translation set">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.sp</FileNameFilter>
|
||||
<FileNameFilter>*.spe</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
<MagicByteSequences>
|
||||
<MagicByteSequence>
|
||||
<MagicByte Type="String">VERSION 1</MagicByte>
|
||||
</MagicByteSequence>
|
||||
</MagicByteSequences>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.TranslationSet.TranslationSetObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.Plugins.RavenSoftware.DataFormats.TranslationSet.StripDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UniversalEditor Version="4.0">
|
||||
<Associations>
|
||||
<Association>
|
||||
<Filters>
|
||||
<Filter ContentType="text/x-ravensoft-botroute" HintComparison="FilterOnly" Title="Raven Software WNT bot route waypoint data">
|
||||
<FileNameFilters>
|
||||
<FileNameFilter>*.wnt</FileNameFilter>
|
||||
</FileNameFilters>
|
||||
</Filter>
|
||||
</Filters>
|
||||
<ObjectModels>
|
||||
<ObjectModel TypeName="UniversalEditor.ObjectModels.Waypoint.WaypointObjectModel" />
|
||||
</ObjectModels>
|
||||
<DataFormats>
|
||||
<DataFormat TypeName="UniversalEditor.DataFormats.Waypoint.WNTDataFormat" />
|
||||
</DataFormats>
|
||||
</Association>
|
||||
</Associations>
|
||||
</UniversalEditor>
|
||||
@ -0,0 +1,190 @@
|
||||
//
|
||||
// StripDataFormat.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MBS.Framework;
|
||||
using MBS.Framework.Settings;
|
||||
using UniversalEditor.ObjectModels.PropertyList;
|
||||
using UniversalEditor.ObjectModels.TranslationSet;
|
||||
using UniversalEditor.UserInterface;
|
||||
|
||||
namespace UniversalEditor.Plugins.RavenSoftware.DataFormats.TranslationSet
|
||||
{
|
||||
public class StripDataFormat : UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration.ExtensibleConfigurationDataFormat
|
||||
{
|
||||
public StripDataFormat()
|
||||
{
|
||||
// apply settings for Strip format
|
||||
Settings.AllowTopLevelProperties = true;
|
||||
Settings.PropertySeparator = "\n";
|
||||
Settings.PropertyNameValueSeparator = " ";
|
||||
}
|
||||
|
||||
public int Version { get; set; } = 1;
|
||||
public string ConfigurationFileName { get; set; } = String.Empty;
|
||||
|
||||
private static DataFormatReference _dfr = null;
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
if (_dfr == null)
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Clear();
|
||||
_dfr.Capabilities.Add(typeof(TranslationSetObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Title = "Raven Software Strip (String Package) translation set";
|
||||
|
||||
_dfr.ImportOptions.SettingsGroups[0].Settings.Add(new TextSetting("ConfigurationFileName", "Configuration file name", ConfigurationFileName));
|
||||
_dfr.ExportOptions.SettingsGroups[0].Settings.Add(new TextSetting("ConfigurationFileName", "Configuration file name", ConfigurationFileName));
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
protected override void BeforeLoadInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.BeforeLoadInternal(objectModels);
|
||||
|
||||
objectModels.Push(new PropertyListObjectModel());
|
||||
}
|
||||
protected override void AfterLoadInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.AfterLoadInternal(objectModels);
|
||||
|
||||
PropertyListObjectModel plom = (objectModels.Pop() as PropertyListObjectModel);
|
||||
TranslationSetObjectModel strip = (objectModels.Pop() as TranslationSetObjectModel);
|
||||
|
||||
for (int i = 0; i < plom.Items.Count; i++)
|
||||
{
|
||||
if (plom.Items[i] is Property)
|
||||
{
|
||||
Property prop = ((Property)plom.Items[i]);
|
||||
switch (prop.Name)
|
||||
{
|
||||
case "VERSION":
|
||||
{
|
||||
Version = Int32.Parse(prop.Value?.ToString());
|
||||
break;
|
||||
}
|
||||
case "CONFIG":
|
||||
{
|
||||
ConfigurationFileName = prop.Value?.ToString();
|
||||
break;
|
||||
}
|
||||
case "ID":
|
||||
{
|
||||
strip.ID = Int32.Parse(prop.Value?.ToString());
|
||||
break;
|
||||
}
|
||||
case "REFERENCE":
|
||||
{
|
||||
strip.Reference = prop.Value?.ToString();
|
||||
break;
|
||||
}
|
||||
case "DESCRIPTION":
|
||||
{
|
||||
strip.Description = prop.Value?.ToString();
|
||||
break;
|
||||
}
|
||||
case "COUNT":
|
||||
{
|
||||
// unused - we just keep reading
|
||||
break;
|
||||
}
|
||||
case "INDEX":
|
||||
{
|
||||
if (i < plom.Items.Count - 1 && plom.Items[i + 1] is Group)
|
||||
{
|
||||
Group grp = (Group)plom.Items[i + 1];
|
||||
|
||||
TranslationSetEntry entry = new TranslationSetEntry();
|
||||
|
||||
for (int j = 0; j < grp.Items.Count; j++)
|
||||
{
|
||||
if (grp.Items[j] is Property)
|
||||
{
|
||||
Property pj = (Property)grp.Items[j];
|
||||
if (pj.Name == "REFERENCE")
|
||||
{
|
||||
string reff = (string)pj.Value;
|
||||
entry.Reference = reff;
|
||||
}
|
||||
else if (pj.Name.StartsWith("TEXT_LANGUAGE"))
|
||||
{
|
||||
TranslationSetValue value = new TranslationSetValue();
|
||||
|
||||
value.LanguageIndex = Int32.Parse(pj.Name.Substring("TEXT_LANGUAGE".Length));
|
||||
value.Value = (string)pj.Value;
|
||||
|
||||
entry.Values.Add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
strip.Entries.Add(entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
((EditorApplication)Application.Instance).Messages.Add(HostApplicationMessageSeverity.Error, "bad .sp file - INDEX not followed by group");
|
||||
Console.WriteLine("ue: ravensoft: strip: bad .sp file - INDEX not followed by group");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// always remember to do this in case someone inherits from this file format , for whatever reason
|
||||
objectModels.Push(strip);
|
||||
}
|
||||
protected override void BeforeSaveInternal(Stack<ObjectModel> objectModels)
|
||||
{
|
||||
base.BeforeSaveInternal(objectModels);
|
||||
|
||||
TranslationSetObjectModel strip = (objectModels.Pop() as TranslationSetObjectModel);
|
||||
PropertyListObjectModel plom = new PropertyListObjectModel();
|
||||
|
||||
plom.Items.AddProperty("VERSION", "1");
|
||||
plom.Items.AddProperty("CONFIG", "W:\\bin\\striped.cfg");
|
||||
plom.Items.AddProperty("ID", strip.ID.ToString());
|
||||
plom.Items.AddProperty("REFERENCE", strip.Reference);
|
||||
plom.Items.AddProperty("DESCRIPTION", strip.Description);
|
||||
plom.Items.AddProperty("COUNT", strip.Entries.Count.ToString());
|
||||
|
||||
for (int i = 0; i < strip.Entries.Count; i++)
|
||||
{
|
||||
TranslationSetEntry entry = strip.Entries[i];
|
||||
plom.Items.AddProperty("INDEX", i.ToString());
|
||||
|
||||
Group g = new Group();
|
||||
g.Items.AddProperty("REFERENCE", entry.Reference);
|
||||
for (int j = 0; j < entry.Values.Count; j++)
|
||||
{
|
||||
g.Items.AddProperty(String.Format("TEXT_LANGUAGE{0}", entry.Values[j].LanguageIndex), entry.Values[j].Value);
|
||||
}
|
||||
plom.Items.Add(g);
|
||||
}
|
||||
|
||||
objectModels.Push(plom);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
//
|
||||
// WNTDataFormat.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UniversalEditor.ObjectModels.Waypoint;
|
||||
|
||||
namespace UniversalEditor.DataFormats.Waypoint
|
||||
{
|
||||
public class WNTDataFormat : DataFormat
|
||||
{
|
||||
public WNTDataFormat()
|
||||
{
|
||||
}
|
||||
|
||||
private static DataFormatReference _dfr = null;
|
||||
protected override DataFormatReference MakeReferenceInternal()
|
||||
{
|
||||
if (_dfr == null)
|
||||
{
|
||||
_dfr = base.MakeReferenceInternal();
|
||||
_dfr.Capabilities.Add(typeof(WaypointObjectModel), DataFormatCapabilities.All);
|
||||
_dfr.Title = "Raven Software WNT bot route waypoint data";
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
protected override void LoadInternal(ref ObjectModel objectModel)
|
||||
{
|
||||
WaypointObjectModel waypoint = (objectModel as WaypointObjectModel);
|
||||
if (waypoint == null)
|
||||
throw new ObjectModelNotSupportedException();
|
||||
|
||||
int lineidx = 0;
|
||||
while (!Accessor.Reader.EndOfStream)
|
||||
{
|
||||
lineidx++;
|
||||
|
||||
string line = Accessor.Reader.ReadLine();
|
||||
string[] parts = line.Split(new char[] { ' ' });
|
||||
if (parts.Length < 9)
|
||||
{
|
||||
Console.WriteLine("ue: ravensoft: waypoint: line {0} invalid - does not contain at least 9 elements");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!parts[3].StartsWith("("))
|
||||
{
|
||||
Console.WriteLine("ue: ravensoft: waypoint: line {0} invalid - part 3 does not start with '('");
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
parts[3] = parts[3].Substring(1);
|
||||
}
|
||||
if (!parts[5].EndsWith(")"))
|
||||
{
|
||||
Console.WriteLine("ue: ravensoft: waypoint: line {0} invalid - part 3 does not start with '('");
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
parts[5] = parts[5].Substring(0, parts[5].Length - 1);
|
||||
}
|
||||
|
||||
if (parts[6] != "{")
|
||||
{
|
||||
Console.WriteLine("ue: ravensoft: waypoint: line {0} invalid - part 6 does not equal '{'");
|
||||
continue;
|
||||
}
|
||||
|
||||
List<string> liststrs = new List<string>();
|
||||
for (int i = 7; i < parts.Length - 1; i++)
|
||||
{
|
||||
if (parts[i] == "}")
|
||||
break;
|
||||
|
||||
liststrs.Add(parts[i]);
|
||||
}
|
||||
|
||||
WaypointEntry entry = new WaypointEntry();
|
||||
entry.Index = Int32.Parse(parts[0]);
|
||||
entry.Type = (WaypointType)Int32.Parse(parts[1]);
|
||||
entry.A = Double.Parse(parts[2]);
|
||||
entry.X = Double.Parse(parts[3]);
|
||||
entry.Y = Double.Parse(parts[4]);
|
||||
entry.Z = Double.Parse(parts[5]);
|
||||
entry.Q = Double.Parse(parts[parts.Length - 1]);
|
||||
|
||||
waypoint.Entries.Add(entry);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SaveInternal(ObjectModel objectModel)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -23,8 +23,15 @@ namespace UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass
|
||||
{
|
||||
public class CarcassObjectModel : ObjectModel
|
||||
{
|
||||
public CarcassObjectModel()
|
||||
private static ObjectModelReference _omr = null;
|
||||
protected override ObjectModelReference MakeReferenceInternal()
|
||||
{
|
||||
if (_omr == null)
|
||||
{
|
||||
_omr = base.MakeReferenceInternal();
|
||||
_omr.Path = new string[] { "Game development", "Raven Software", "Carcass model skin configuration" };
|
||||
}
|
||||
return _omr;
|
||||
}
|
||||
|
||||
public ModelReference.ModelReferenceCollection ModelReferences { get; } = new ModelReference.ModelReferenceCollection();
|
||||
|
||||
@ -47,7 +47,7 @@ namespace UniversalEditor.ObjectModels.Icarus
|
||||
protected override ObjectModelReference MakeReferenceInternal()
|
||||
{
|
||||
ObjectModelReference omr = base.MakeReferenceInternal();
|
||||
omr.Path = new string[] { "Game development", "ICARUS engine script" };
|
||||
omr.Path = new string[] { "Game development", "Raven Software", "ICARUS script" };
|
||||
return omr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
//
|
||||
// TranslationSetEntry.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
namespace UniversalEditor.ObjectModels.TranslationSet
|
||||
{
|
||||
public class TranslationSetEntry : ICloneable
|
||||
{
|
||||
public class TranslationSetEntryCollection
|
||||
: System.Collections.ObjectModel.Collection<TranslationSetEntry>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Reference { get; set; } = null;
|
||||
public TranslationSetValue.TranslationSetValueCollection Values { get; } = new TranslationSetValue.TranslationSetValueCollection();
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
TranslationSetEntry clone = new TranslationSetEntry();
|
||||
clone.Reference = (Reference.Clone() as string);
|
||||
foreach (TranslationSetValue value in Values)
|
||||
{
|
||||
clone.Values.Add(value.Clone() as TranslationSetValue);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
//
|
||||
// TranslationSetObjectModel.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
namespace UniversalEditor.ObjectModels.TranslationSet
|
||||
{
|
||||
public class TranslationSetObjectModel : ObjectModel
|
||||
{
|
||||
private static ObjectModelReference _omr = null;
|
||||
|
||||
public TranslationSetEntry.TranslationSetEntryCollection Entries { get; } = new TranslationSetEntry.TranslationSetEntryCollection();
|
||||
|
||||
public int ID { get; set; } = 0;
|
||||
public string Reference { get; set; } = null;
|
||||
public string Description { get; set; } = null;
|
||||
|
||||
protected override ObjectModelReference MakeReferenceInternal()
|
||||
{
|
||||
if (_omr == null)
|
||||
{
|
||||
_omr = base.MakeReferenceInternal();
|
||||
_omr.Path = new string[] { "Game development", "Raven Software", "Translation set / strip (string package)" };
|
||||
}
|
||||
return _omr;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Entries.Clear();
|
||||
}
|
||||
|
||||
public override void CopyTo(ObjectModel where)
|
||||
{
|
||||
TranslationSetObjectModel clone = (where as TranslationSetObjectModel);
|
||||
if (clone == null)
|
||||
throw new ObjectModelNotSupportedException();
|
||||
|
||||
foreach (TranslationSetEntry entry in Entries)
|
||||
{
|
||||
clone.Entries.Add(entry.Clone() as TranslationSetEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
//
|
||||
// TranslationSetValue.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
namespace UniversalEditor.ObjectModels.TranslationSet
|
||||
{
|
||||
public class TranslationSetValue : ICloneable
|
||||
{
|
||||
public class TranslationSetValueCollection
|
||||
: System.Collections.ObjectModel.Collection<TranslationSetValue>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int LanguageIndex { get; set; } = 0;
|
||||
public string Value { get; set; } = null;
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
TranslationSetValue clone = new TranslationSetValue();
|
||||
clone.LanguageIndex = LanguageIndex;
|
||||
clone.Value = (Value?.Clone() as string);
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
//
|
||||
// WaypointEntry.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
namespace UniversalEditor.ObjectModels.Waypoint
|
||||
{
|
||||
public class WaypointEntry : ICloneable
|
||||
{
|
||||
public class WaypointEntryCollection
|
||||
: System.Collections.ObjectModel.Collection<WaypointEntry>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int Index { get; set; } = 0;
|
||||
public WaypointType Type { get; set; } = WaypointType.Default;
|
||||
public double A { get; set; } = 0.0;
|
||||
|
||||
public double X { get; set; } = 0.0;
|
||||
public double Y { get; set; } = 0.0;
|
||||
public double Z { get; set; } = 0.0;
|
||||
|
||||
public double Q { get; set; } = 0.0;
|
||||
|
||||
private string DoubleToString(double value)
|
||||
{
|
||||
return Math.Round(value, 6).ToString().PadRight(8, '0');
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string liststr = String.Empty;
|
||||
return String.Format("{0} {1} {2} ({3} {4} {5}) {{ {6} }} {7}", Index, (int)Type, DoubleToString(A), DoubleToString(X), DoubleToString(Y), DoubleToString(Z), liststr, DoubleToString(Q));
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
WaypointEntry clone = new WaypointEntry();
|
||||
clone.Index = Index;
|
||||
clone.Type = Type;
|
||||
clone.A = A;
|
||||
clone.X = X;
|
||||
clone.Y = Y;
|
||||
clone.Z = Z;
|
||||
clone.Q = Q;
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
//
|
||||
// WaypointObjectModel.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
namespace UniversalEditor.ObjectModels.Waypoint
|
||||
{
|
||||
// FIXME: this should be moved to a parent Quake plugin or something,
|
||||
// as it also relates to wpeditor waypoints in xonotic, etc.
|
||||
public class WaypointObjectModel : ObjectModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a collection of <see cref="WaypointEntry" /> instances that
|
||||
/// represent the waypoints defined in this botroutes file.
|
||||
/// </summary>
|
||||
/// <value>The collection of <see cref="WaypointEntry" /> instances.</value>
|
||||
public WaypointEntry.WaypointEntryCollection Entries { get; } = new WaypointEntry.WaypointEntryCollection();
|
||||
|
||||
private static ObjectModelReference _omr = null;
|
||||
protected override ObjectModelReference MakeReferenceInternal()
|
||||
{
|
||||
if (_omr == null)
|
||||
{
|
||||
_omr = base.MakeReferenceInternal();
|
||||
_omr.Path = new string[] { "Game development", "Bot waypoint route" };
|
||||
}
|
||||
return _omr;
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Entries.Clear();
|
||||
}
|
||||
public override void CopyTo(ObjectModel where)
|
||||
{
|
||||
WaypointObjectModel clone = (where as WaypointObjectModel);
|
||||
if (clone == null)
|
||||
throw new ObjectModelNotSupportedException();
|
||||
|
||||
foreach (WaypointEntry entry in Entries)
|
||||
{
|
||||
clone.Entries.Add(entry.Clone() as WaypointEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
//
|
||||
// WaypointType.cs
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2021 Mike Becker's Software
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
namespace UniversalEditor.ObjectModels.Waypoint
|
||||
{
|
||||
public enum WaypointType
|
||||
{
|
||||
Default = 0,
|
||||
Jump = 16
|
||||
}
|
||||
}
|
||||
@ -61,6 +61,14 @@
|
||||
<Compile Include="ObjectModels\Carcass\CarcassFrame.cs" />
|
||||
<Compile Include="ObjectModels\Icarus\IcarusCommentCommand.cs" />
|
||||
<Compile Include="ObjectModels\Icarus\IcarusCommandType.cs" />
|
||||
<Compile Include="DataFormats\Waypoint\WNTDataFormat.cs" />
|
||||
<Compile Include="ObjectModels\Waypoint\WaypointEntry.cs" />
|
||||
<Compile Include="ObjectModels\Waypoint\WaypointObjectModel.cs" />
|
||||
<Compile Include="ObjectModels\Waypoint\WaypointType.cs" />
|
||||
<Compile Include="ObjectModels\TranslationSet\TranslationSetObjectModel.cs" />
|
||||
<Compile Include="DataFormats\TranslationSet\StripDataFormat.cs" />
|
||||
<Compile Include="ObjectModels\TranslationSet\TranslationSetEntry.cs" />
|
||||
<Compile Include="ObjectModels\TranslationSet\TranslationSetValue.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
@ -92,6 +100,14 @@
|
||||
<Project>{4FD9DB1D-76AA-48D1-8446-95376C4A2BC2}</Project>
|
||||
<Name>UniversalEditor.Plugins.Multimedia3D</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Libraries\UniversalEditor.Essential\UniversalEditor.Essential.csproj">
|
||||
<Project>{30467E5C-05BC-4856-AADC-13906EF4CADD}</Project>
|
||||
<Name>UniversalEditor.Essential</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\MBS.Framework.UserInterface\Libraries\MBS.Framework.UserInterface\MBS.Framework.UserInterface.csproj">
|
||||
<Project>{29E1C1BB-3EA5-4062-B62F-85EEC703FE07}</Project>
|
||||
<Name>MBS.Framework.UserInterface</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="ObjectModels\Icarus\Parameters\" />
|
||||
@ -100,10 +116,16 @@
|
||||
<Folder Include="ObjectModels\Carcass\" />
|
||||
<Folder Include="DataFormats\Carcass\" />
|
||||
<Folder Include="DataFormats\Carcass\Text\" />
|
||||
<Folder Include="DataFormats\Waypoint\" />
|
||||
<Folder Include="ObjectModels\Waypoint\" />
|
||||
<Folder Include="ObjectModels\TranslationSet\" />
|
||||
<Folder Include="DataFormats\TranslationSet\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Associations\IcarusBinaryDataFormat.uexml" />
|
||||
<EmbeddedResource Include="Associations\IcarusTextDataFormat.uexml" />
|
||||
<EmbeddedResource Include="Associations\CarcassTextDataFormat.uexml" />
|
||||
<EmbeddedResource Include="Associations\WNTWaypointDataFormat.uexml" />
|
||||
<EmbeddedResource Include="Associations\StripDataFormat.uexml" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user