Unreal editor enhancements
This commit is contained in:
parent
da49113837
commit
f59f82278c
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<!-- Generated with glade 3.22.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkDialog">
|
||||
@ -7,7 +7,7 @@
|
||||
<property name="title" translatable="yes">Edit Object Properties</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
@ -91,7 +91,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_Parent object name</property>
|
||||
<property name="label" translatable="yes">_Class name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
@ -104,7 +104,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">_Class name</property>
|
||||
<property name="label" translatable="yes">_Package name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
@ -127,7 +127,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry">
|
||||
<object class="GtkEntry" id="txtObjectName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">center</property>
|
||||
@ -140,7 +140,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox">
|
||||
<object class="GtkComboBox" id="cboClassName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
@ -159,7 +159,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox">
|
||||
<object class="GtkComboBox" id="cboPackageName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
@ -178,7 +178,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry">
|
||||
<object class="GtkEntry" id="txtSourceData">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">center</property>
|
||||
@ -192,7 +192,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cmdBrowse">
|
||||
<object class="GtkButton" id="cmdSourceDataBrowse">
|
||||
<property name="label" translatable="yes">_Browse...</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -213,7 +213,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<object class="GtkFrame" id="fraFlags">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
@ -229,7 +229,7 @@
|
||||
<property name="row_homogeneous">True</property>
|
||||
<property name="column_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkTransactional">
|
||||
<object class="GtkCheckButton" id="chkFlagTransactional">
|
||||
<property name="label" translatable="yes">_Transactional</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -247,7 +247,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkUnreachable">
|
||||
<object class="GtkCheckButton" id="chkFlagUnreachable">
|
||||
<property name="label" translatable="yes">Un_reachable</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -265,7 +265,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkPublic">
|
||||
<object class="GtkCheckButton" id="chkFlagPublic">
|
||||
<property name="label" translatable="yes">P_ublic</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -283,7 +283,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkSourceModified">
|
||||
<object class="GtkCheckButton" id="chkFlagSourceModified">
|
||||
<property name="label" translatable="yes">Source _modified</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -301,7 +301,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkGarbageCollect">
|
||||
<object class="GtkCheckButton" id="chkFlagGarbageCollect">
|
||||
<property name="label" translatable="yes">_Garbage collect</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -319,7 +319,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkImporting">
|
||||
<object class="GtkCheckButton" id="chkFlagImporting">
|
||||
<property name="label" translatable="yes">_Importing</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -337,7 +337,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkExporting">
|
||||
<object class="GtkCheckButton" id="chkFlagExporting">
|
||||
<property name="label" translatable="yes">_Exporting</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -355,7 +355,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkRequireLoad">
|
||||
<object class="GtkCheckButton" id="chkFlagRequireLoad">
|
||||
<property name="label" translatable="yes">_Require load</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -373,7 +373,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkHighlightNameEliminateObject">
|
||||
<object class="GtkCheckButton" id="chkFlagHighlightNameEliminateObject">
|
||||
<property name="label" translatable="yes">_Highlight name / eliminate object</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -391,7 +391,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkRemappedNameSingularFunction">
|
||||
<object class="GtkCheckButton" id="chkFlagRemappedNameSingularFunction">
|
||||
<property name="label" translatable="yes">Remapped name / singular _function</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -409,7 +409,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chkSuppressedStateChanged">
|
||||
<object class="GtkCheckButton" id="chkFlagSuppressedStateChanged">
|
||||
<property name="label" translatable="yes">_Suppressed / state changed</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
@ -533,7 +533,7 @@
|
||||
<Content Include="Editors\RavenSoftware\Icarus\IcarusCommands.uexml" />
|
||||
<Content Include="Editors\RavenSoftware\Icarus\IcarusSetTypes.uexml" />
|
||||
<Content Include="Editors\RavenSoftware\Icarus\IcarusConfiguration.uexml" />
|
||||
<Content Include="Editors\Unreal\Package\Dialogs\ObjectPropertiesDialog.glade" />
|
||||
<Content Include="Editors\Unreal\Package\Dialogs\UnrealPackageEntryPropertiesDialog.glade" />
|
||||
<Content Include="Editors\Unreal\Package\UnrealPackageEditor.glade" />
|
||||
<Content Include="Editors\Unreal\Package\ContextMenus.uexml" />
|
||||
<Content Include="Extensions\GameDeveloper\Extensions\ElectronicArts\Associations\FileSystem\BIGF.uexml" />
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
//
|
||||
// UnrealPackageImportPropertiesDialog.cs - provides a UWT-based CustomDialog for editing the properties of an import in an Unreal Engine package
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2019-2020 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;
|
||||
using UniversalEditor.ObjectModels.UnrealEngine;
|
||||
|
||||
namespace UniversalEditor.Plugins.UnrealEngine.UserInterface.Dialogs.Unreal.Package
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a UWT-based <see cref="CustomDialog" /> for editing the properties of an import in an Unreal Engine package.
|
||||
/// </summary>
|
||||
[ContainerLayout("~/Editors/Unreal/Package/Dialogs/UnrealPackageEntryPropertiesDialog.glade")]
|
||||
public class UnrealPackageEntryPropertiesDialog : CustomDialog
|
||||
{
|
||||
private TextBox txtObjectName;
|
||||
private ComboBox cboClassName;
|
||||
private ComboBox cboPackageName;
|
||||
private TextBox txtSourceData;
|
||||
private Button cmdSourceDataBrowse;
|
||||
|
||||
private GroupBox fraFlags;
|
||||
private CheckBox chkFlagTransactional, chkFlagUnreachable, chkFlagPublic, chkFlagSourceModified, chkFlagGarbageCollect;
|
||||
private CheckBox chkFlagImporting, chkFlagExporting, chkFlagRequireLoad, chkFlagHighlightNameEliminateObject, chkFlagRemappedNameSingularFunction, chkFlagSuppressedStateChanged;
|
||||
|
||||
public ImportTableEntry ImportTableEntry { get; set; } = null;
|
||||
public ExportTableEntry ExportTableEntry { get; set; } = null;
|
||||
|
||||
protected override void OnCreated(EventArgs e)
|
||||
{
|
||||
base.OnCreated(e);
|
||||
|
||||
if (ImportTableEntry != null)
|
||||
{
|
||||
txtObjectName.Text = ImportTableEntry.ObjectName.Name;
|
||||
cboClassName.Text = ImportTableEntry.ClassName.Name;
|
||||
cboPackageName.Text = ImportTableEntry.PackageName.Name;
|
||||
|
||||
fraFlags.Visible = false;
|
||||
|
||||
Text = "Import Table Entry Properties";
|
||||
}
|
||||
else if (ExportTableEntry != null)
|
||||
{
|
||||
txtObjectName.Text = ExportTableEntry.Name?.Name;
|
||||
cboClassName.Text = ExportTableEntry.ObjectClass?.Name?.Name;
|
||||
cboPackageName.Text = ExportTableEntry.ObjectParent?.Name?.Name;
|
||||
|
||||
fraFlags.Visible = true;
|
||||
chkFlagTransactional.Checked = ((ExportTableEntry.Flags & ObjectFlags.Transactional) == ObjectFlags.Transactional);
|
||||
chkFlagUnreachable.Checked = ((ExportTableEntry.Flags & ObjectFlags.Unreachable) == ObjectFlags.Unreachable);
|
||||
chkFlagPublic.Checked = ((ExportTableEntry.Flags & ObjectFlags.Public) == ObjectFlags.Public);
|
||||
chkFlagSourceModified.Checked = ((ExportTableEntry.Flags & ObjectFlags.SourceModified) == ObjectFlags.SourceModified);
|
||||
chkFlagGarbageCollect.Checked = ((ExportTableEntry.Flags & ObjectFlags.GarbageCollect) == ObjectFlags.GarbageCollect);
|
||||
chkFlagImporting.Checked = ((ExportTableEntry.Flags & ObjectFlags.Importing) == ObjectFlags.Importing);
|
||||
chkFlagExporting.Checked = ((ExportTableEntry.Flags & ObjectFlags.Exporting) == ObjectFlags.Exporting);
|
||||
chkFlagRequireLoad.Checked = ((ExportTableEntry.Flags & ObjectFlags.RequireLoad) == ObjectFlags.RequireLoad);
|
||||
chkFlagHighlightNameEliminateObject.Checked = ((ExportTableEntry.Flags & ObjectFlags.HighlightedName) == ObjectFlags.HighlightedName);
|
||||
chkFlagRemappedNameSingularFunction.Checked = ((ExportTableEntry.Flags & ObjectFlags.RemappedName) == ObjectFlags.RemappedName);
|
||||
chkFlagSuppressedStateChanged.Checked = ((ExportTableEntry.Flags & ObjectFlags.Suppressed) == ObjectFlags.Suppressed);
|
||||
|
||||
Text = "Export Table Entry Properties";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
//
|
||||
// UnrealPackageImportPropertiesDialog.cs - provides a UWT-based CustomDialog for editing the properties of an import in an Unreal Engine package
|
||||
//
|
||||
// Author:
|
||||
// Michael Becker <alcexhim@gmail.com>
|
||||
//
|
||||
// Copyright (c) 2019-2020 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 MBS.Framework.UserInterface;
|
||||
|
||||
namespace UniversalEditor.Plugins.UnrealEngine.UserInterface.Dialogs.Unreal.Package
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a UWT-based <see cref="CustomDialog" /> for editing the properties of an import in an Unreal Engine package.
|
||||
/// </summary>
|
||||
[ContainerLayout("~/Editors/Unreal/Package/Dialogs/ObjectPropertiesDialog.glade")]
|
||||
public class UnrealPackageImportPropertiesDialog : CustomDialog
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -66,9 +66,6 @@ namespace UniversalEditor.Plugins.UnrealEngine.UserInterface.Editors.Unreal.Pack
|
||||
DefaultTreeModel tmExports = (tvExports.Model as DefaultTreeModel);
|
||||
DefaultTreeModel tmImports = (tvImports.Model as DefaultTreeModel);
|
||||
|
||||
tvExports.RowActivated += tvExports_RowActivated;
|
||||
tvImports.RowActivated += tvImports_RowActivated;
|
||||
|
||||
tvExports.ContextMenuCommandID = "UnrealPackageEditor_ExportTreeViewContextMenu";
|
||||
tvImports.ContextMenuCommandID = "UnrealPackageEditor_ImportTreeViewContextMenu";
|
||||
|
||||
@ -87,7 +84,8 @@ namespace UniversalEditor.Plugins.UnrealEngine.UserInterface.Editors.Unreal.Pack
|
||||
|
||||
FileDialog sfd = new FileDialog
|
||||
{
|
||||
Mode = FileDialogMode.Save
|
||||
Mode = FileDialogMode.Save,
|
||||
SelectedFileName = String.Format("{0}{1}{2}", item.Group?.Name?.Name, item.Group == null ? String.Empty : ".", item.Name?.Name)
|
||||
};
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
@ -95,16 +93,25 @@ namespace UniversalEditor.Plugins.UnrealEngine.UserInterface.Editors.Unreal.Pack
|
||||
}
|
||||
}
|
||||
|
||||
[EventHandler(nameof(tvExports), "RowActivated")]
|
||||
void tvExports_RowActivated(object sender, ListViewRowActivatedEventArgs e)
|
||||
{
|
||||
ExportTableEntry item = e.Row.GetExtraData<ExportTableEntry>("item");
|
||||
|
||||
UnrealPackageEntryPropertiesDialog dlg = new UnrealPackageEntryPropertiesDialog();
|
||||
dlg.ExportTableEntry = item;
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[EventHandler(nameof(tvImports), "RowActivated")]
|
||||
void tvImports_RowActivated(object sender, ListViewRowActivatedEventArgs e)
|
||||
{
|
||||
ImportTableEntry item = e.Row.GetExtraData<ImportTableEntry>("item");
|
||||
|
||||
UnrealPackageImportPropertiesDialog dlg = new UnrealPackageImportPropertiesDialog();
|
||||
UnrealPackageEntryPropertiesDialog dlg = new UnrealPackageEntryPropertiesDialog();
|
||||
dlg.ImportTableEntry = item;
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Editors\Unreal\Package\UnrealPackageEditor.cs" />
|
||||
<Compile Include="Dialogs\Unreal\Package\UnrealPackageImportPropertiesDialog.cs" />
|
||||
<Compile Include="Dialogs\Unreal\Package\UnrealPackageEntryPropertiesDialog.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Editors\" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user