- added some empty class framework for decorate parsing

- fixed textures and flats browsers to dynamically use the preview image size
This commit is contained in:
codeimp 2009-01-19 23:19:33 +00:00
parent 9af4b5f059
commit 70be85aa95
6 changed files with 194 additions and 3 deletions

View file

@ -665,6 +665,9 @@
<Compile Include="Config\FlagTranslation.cs" />
<Compile Include="Data\PK3FileImage.cs" />
<Compile Include="Data\PK3StructuredReader.cs" />
<Compile Include="Decorate\ActorStructure.cs" />
<Compile Include="Decorate\DecorateParser.cs" />
<Compile Include="Decorate\StatesStructure.cs" />
<Compile Include="Editing\EditingManager.cs" />
<EmbeddedResource Include="Resources\Crosshair.png" />
<EmbeddedResource Include="Resources\CrosshairBusy.png" />

View file

@ -83,7 +83,8 @@ namespace CodeImp.DoomBuilder.Controls
// Initialize
InitializeComponent();
items = new List<ImageBrowserItem>();
list.TileSize = new Size(PreviewManager.IMAGE_WIDTH + 26, PreviewManager.IMAGE_HEIGHT + 26);
// Move textbox with label
objectname.Left = label.Right + label.Margin.Right + objectname.Margin.Left;
}

View file

@ -97,8 +97,8 @@ namespace CodeImp.DoomBuilder.Controls
// Determine coordinates
SizeF textsize = g.MeasureString(this.Text, this.ListView.Font, bounds.Width);
Rectangle imagerect = new Rectangle(bounds.Left + ((bounds.Width - 64) >> 1),
bounds.Top + ((bounds.Height - 64 - (int)textsize.Height) >> 1), 64, 64);
Rectangle imagerect = new Rectangle(bounds.Left + ((bounds.Width - PreviewManager.IMAGE_WIDTH) >> 1),
bounds.Top + ((bounds.Height - PreviewManager.IMAGE_HEIGHT - (int)textsize.Height) >> 1), PreviewManager.IMAGE_WIDTH, PreviewManager.IMAGE_HEIGHT);
PointF textpos = new PointF(bounds.Left + ((float)bounds.Width - textsize.Width) * 0.5f, bounds.Bottom - textsize.Height - 2);
// Determine colors

View file

@ -0,0 +1,61 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* 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.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Data;
using System.IO;
using System.Diagnostics;
using CodeImp.DoomBuilder.Compilers;
#endregion
namespace CodeImp.DoomBuilder.Decorate
{
public sealed class ActorStructure
{
#region ================== Constants
#endregion
#region ================== Variables
#endregion
#region ================== Properties
#endregion
#region ================== Constructor / Disposer
// Constructor
internal ActorStructure(Stream stream)
{
}
#endregion
#region ================== Methods
#endregion
}
}

View file

@ -0,0 +1,63 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* 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.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Data;
using System.IO;
using System.Diagnostics;
using CodeImp.DoomBuilder.Compilers;
#endregion
namespace CodeImp.DoomBuilder.Decorate
{
public sealed class DecorateParser
{
#region ================== Constants
#endregion
#region ================== Variables
private List<ActorStructure> actors;
#endregion
#region ================== Properties
#endregion
#region ================== Constructor / Disposer
// Constructor
internal DecorateParser(Stream stream)
{
}
#endregion
#region ================== Methods
#endregion
}
}

View file

@ -0,0 +1,63 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* 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.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Data;
using System.IO;
using System.Diagnostics;
using CodeImp.DoomBuilder.Compilers;
#endregion
namespace CodeImp.DoomBuilder.Decorate
{
public sealed class StatesStructure
{
#region ================== Constants
#endregion
#region ================== Variables
private List<StatesStructure> states;
#endregion
#region ================== Properties
#endregion
#region ================== Constructor / Disposer
// Constructor
internal StatesStructure(Stream stream)
{
}
#endregion
#region ================== Methods
#endregion
}
}