- updated todo list

- added some icons for copy/paste
- begun working on copy/paste features
This commit is contained in:
codeimp 2008-09-15 21:53:00 +00:00
parent 241a271bd0
commit 6a4ffcc498
17 changed files with 115 additions and 14 deletions

View file

@ -1,9 +1,11 @@
- Add more find/replace types - Add more find/replace types
- Make advanced drag/rotate/resize/flip/skew/turn/barf mode
- Make copy/paste features - Make copy/paste features
- Seperate modes into their own Mode menu
- Make plugin support for custom toolbar buttons / menu items (Tools menu?)
- Make sector gradient features - Make sector gradient features
- Make 3D Mode (config specific!) - Make 3D Mode (config specific!)

BIN
Resources/Icons/Copy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

BIN
Resources/Icons/Cut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
Resources/Icons/Paste.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 450 B

View file

@ -593,10 +593,13 @@
<EmbeddedResource Include="Resources\Thing2D_0.png" /> <EmbeddedResource Include="Resources\Thing2D_0.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\Copy.png" />
<None Include="Resources\Cut.png" />
<Content Include="Resources\DB2.ico" /> <Content Include="Resources\DB2.ico" />
<None Include="Resources\Paste.png" />
<None Include="Resources\Test.png" />
<None Include="Resources\Warning.png" /> <None Include="Resources\Warning.png" />
<None Include="Resources\WarningOff.png" /> <None Include="Resources\WarningOff.png" />
<None Include="Resources\Test.png" />
<None Include="Resources\SlimDX_small.png" /> <None Include="Resources\SlimDX_small.png" />
<None Include="Resources\Splash3_trans.png" /> <None Include="Resources\Splash3_trans.png" />
<None Include="Resources\Splash3_small.png" /> <None Include="Resources\Splash3_small.png" />

View file

@ -37,13 +37,14 @@ namespace CodeImp.DoomBuilder.Editing
#region ================== Variables #region ================== Variables
// Properties // Properties
private string switchaction; private string switchaction = null;
private string buttonimage; private string buttonimage = null;
private string buttondesc; private string buttondesc = null;
private int buttonorder; private int buttonorder = 0;
private bool configspecific; private bool configspecific = false;
private bool isvolatile; private bool isvolatile = false;
private string displayname; private string displayname = "Unnamed Mode";
private bool allowcopypaste = true;
#endregion #endregion
@ -88,10 +89,17 @@ namespace CodeImp.DoomBuilder.Editing
public bool Volatile { get { return isvolatile; } set { isvolatile = value; } } public bool Volatile { get { return isvolatile; } set { isvolatile = value; } }
/// <summary> /// <summary>
/// Name to display on the button information bar when no specific element information is displayed. /// Name to display on the button information bar when no specific element
/// information is displayed.
/// </summary> /// </summary>
public string DisplayName { get { return displayname; } set { displayname = value; } } public string DisplayName { get { return displayname; } set { displayname = value; } }
/// <summary>
/// When set to false, the actions Cut, Copy and Paste cannot be used
/// in this mode. Default for this property is true.
/// </summary>
public bool AllowCopyPaste { get { return allowcopypaste; } set { allowcopypaste = value; } }
#endregion #endregion
#region ================== Constructor / Disposer #region ================== Constructor / Disposer

View file

@ -251,13 +251,23 @@ namespace CodeImp.DoomBuilder
General.WriteLogLine("Running test program: " + processinfo.FileName); General.WriteLogLine("Running test program: " + processinfo.FileName);
General.WriteLogLine("Program parameters: " + processinfo.Arguments); General.WriteLogLine("Program parameters: " + processinfo.Arguments);
// Disable interface
General.MainWindow.DisplayStatus("Waiting for game application to finish...");
General.MainWindow.Enabled = false;
General.MainWindow.Activate();
try try
{ {
// Start the program // Start the program
process = Process.Start(processinfo); process = Process.Start(processinfo);
// Wait for program to complete // Wait for program to complete
process.WaitForExit(); while(!process.WaitForExit(10))
{
General.MainWindow.Update();
}
// Done
deltatime = TimeSpan.FromTicks(process.ExitTime.Ticks - process.StartTime.Ticks); deltatime = TimeSpan.FromTicks(process.ExitTime.Ticks - process.StartTime.Ticks);
General.WriteLogLine("Test program has finished."); General.WriteLogLine("Test program has finished.");
General.WriteLogLine("Run time: " + deltatime.TotalSeconds.ToString("###########0.00") + " seconds"); General.WriteLogLine("Run time: " + deltatime.TotalSeconds.ToString("###########0.00") + " seconds");
@ -273,7 +283,10 @@ namespace CodeImp.DoomBuilder
try { File.Delete(tempwad); } try { File.Delete(tempwad); }
catch(Exception) { } catch(Exception) { }
// Restore old cursor // Done
General.MainWindow.Activate();
General.MainWindow.Enabled = true;
General.MainWindow.DisplayReady();
Cursor.Current = oldcursor; Cursor.Current = oldcursor;
} }

View file

@ -932,12 +932,23 @@ namespace CodeImp.DoomBuilder
#region ================== Copy / Paste #region ================== Copy / Paste
// This copies the current selection // This copies the current selection
[Action("copyselection")]
public void CopySelection() public void CopySelection()
{ {
} }
// This cuts the current selection
[Action("cutselection")]
public void CutSelection()
{
CopySelection();
General.Actions["deleteitem"].Begin();
General.Actions["deleteitem"].End();
}
// This pastes what is on the clipboard and makes it the current selection // This pastes what is on the clipboard and makes it the current selection
[Action("pasteselection")]
public bool PasteSelection() public bool PasteSelection()
{ {
return false; return false;

View file

@ -136,6 +136,13 @@ namespace CodeImp.DoomBuilder.Plugins
{ {
} }
/// <summary>
/// Called by the Doom Builder core when the user pastes geometry into the map. The new geometry is created and marked before this method is called.
/// </summary>
public virtual void OnPaste()
{
}
#endregion #endregion
} }
} }

View file

@ -67,6 +67,20 @@ namespace CodeImp.DoomBuilder.Properties {
} }
} }
internal static System.Drawing.Bitmap Copy {
get {
object obj = ResourceManager.GetObject("Copy", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Cut {
get {
object obj = ResourceManager.GetObject("Cut", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap File { internal static System.Drawing.Bitmap File {
get { get {
object obj = ResourceManager.GetObject("File", resourceCulture); object obj = ResourceManager.GetObject("File", resourceCulture);
@ -144,6 +158,13 @@ namespace CodeImp.DoomBuilder.Properties {
} }
} }
internal static System.Drawing.Bitmap Paste {
get {
object obj = ResourceManager.GetObject("Paste", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Properties { internal static System.Drawing.Bitmap Properties {
get { get {
object obj = ResourceManager.GetObject("Properties", resourceCulture); object obj = ResourceManager.GetObject("Properties", resourceCulture);

View file

@ -202,4 +202,13 @@
<data name="WarningOff" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="WarningOff" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WarningOff.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\WarningOff.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Cut.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

View file

@ -368,3 +368,30 @@ thingsfilterssetup
allowmouse = false; allowmouse = false;
allowscroll = false; allowscroll = false;
} }
copyselection
{
title = "Edit: Copy Selection";
description = "Copies the current selection to the clipboard.";
allowkeys = true;
allowmouse = true;
allowscroll = false;
}
cutselection
{
title = "Edit: Cut Selection";
description = "Copies the current selection to the clipboard and removes it from the map.";
allowkeys = true;
allowmouse = true;
allowscroll = false;
}
pasteselection
{
title = "Edit: Paste Selection";
description = "Pastes the current contents of the clipboard into the map as a new selection.";
allowkeys = true;
allowmouse = true;
allowscroll = false;
}

BIN
Source/Resources/Copy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

BIN
Source/Resources/Cut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
Source/Resources/Paste.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 450 B