mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 12:22:35 +00:00
- 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:
parent
9af4b5f059
commit
70be85aa95
6 changed files with 194 additions and 3 deletions
|
@ -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" />
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
61
Source/Decorate/ActorStructure.cs
Normal file
61
Source/Decorate/ActorStructure.cs
Normal 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
|
||||
}
|
||||
}
|
63
Source/Decorate/DecorateParser.cs
Normal file
63
Source/Decorate/DecorateParser.cs
Normal 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
|
||||
}
|
||||
}
|
63
Source/Decorate/StatesStructure.cs
Normal file
63
Source/Decorate/StatesStructure.cs
Normal 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
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue