summaryrefslogtreecommitdiff
path: root/GfxEditor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'GfxEditor.cs')
-rw-r--r--GfxEditor.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/GfxEditor.cs b/GfxEditor.cs
index 604f00e..25578b9 100644
--- a/GfxEditor.cs
+++ b/GfxEditor.cs
@@ -149,6 +149,11 @@ namespace BitmapSpriteEd
private Label[] m_recent;
+ private AlphaColourDialog m_fromColForm;
+ private AlphaColourDialog m_toColForm;
+ private AlphaColourDialog m_edgeColForm;
+ private DropShadowForm m_shadowForm;
+
public GfxEditor()
{
//
@@ -187,6 +192,11 @@ namespace BitmapSpriteEd
m_cpMenu=new CopyMenu();
m_manipMenu=new ManipulationMenu();
+ m_fromColForm=new AlphaColourDialog("Select colour to change from");
+ m_toColForm=new AlphaColourDialog("Select colour to change to");
+ m_edgeColForm=new AlphaColourDialog("Select edge colour");
+ m_shadowForm=new DropShadowForm();
+
m_recent=new Label[]
{m_recent1,m_recent2,m_recent3,m_recent4,
m_recent5,m_recent6,m_recent7,m_recent8};
@@ -1481,6 +1491,43 @@ namespace BitmapSpriteEd
case ManipulationMenu.EMode.eScrollRight:
m_char.Scroll(1,0);
break;
+
+ case ManipulationMenu.EMode.eEdge:
+ if (m_edgeColForm.ShowDialog()==DialogResult.OK)
+ {
+ SetUndo(new Frame(m_char));
+ m_char.Edge(m_edgeColForm.Color);
+ }
+ break;
+
+ case ManipulationMenu.EMode.eDropShadow:
+ if (m_shadowForm.ShowDialog()==DialogResult.OK)
+ {
+ SetUndo(new Frame(m_char));
+ m_char.DropShadow(m_shadowForm.ShadowSize.DX,
+ m_shadowForm.ShadowSize.DY,
+ m_shadowForm.ShadowColour);
+ }
+ break;
+
+ case ManipulationMenu.EMode.eReplace:
+ if (m_fromColForm.ShowDialog()==DialogResult.OK)
+ {
+ if (m_toColForm.ShowDialog()==DialogResult.OK)
+ {
+ SetUndo(new Frame(m_char));
+ m_char.Replace(m_fromColForm.Color,m_toColForm.Color);
+ }
+ }
+ break;
+
+ case ManipulationMenu.EMode.eReplaceAll:
+ if (m_toColForm.ShowDialog()==DialogResult.OK)
+ {
+ SetUndo(new Frame(m_char));
+ m_char.Replace(m_toColForm.Color);
+ }
+ break;
case ManipulationMenu.EMode.eNothing:
redraw=false;