2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
|
2015-11-30 14:18:42 +00:00
|
|
|
using System;
|
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.Windows
|
|
|
|
{
|
|
|
|
public struct StatusInfo
|
|
|
|
{
|
2015-09-16 12:10:43 +00:00
|
|
|
public const string NO_SELECTION = "Nothing selected."; //mxd
|
|
|
|
public const string LOADING_TEXT = "Loading resources...";
|
|
|
|
public const string READY_TEXT = "Ready.";
|
|
|
|
|
|
|
|
public readonly StatusType type;
|
|
|
|
public readonly string message;
|
|
|
|
public readonly string selectioninfo; //mxd
|
2009-04-19 18:07:22 +00:00
|
|
|
internal bool displayed;
|
|
|
|
|
|
|
|
internal StatusInfo(StatusType type, string message)
|
|
|
|
{
|
|
|
|
this.type = type;
|
2015-09-16 12:10:43 +00:00
|
|
|
|
|
|
|
switch(type)
|
|
|
|
{
|
|
|
|
case StatusType.Selection:
|
|
|
|
this.selectioninfo = (string.IsNullOrEmpty(message) ? NO_SELECTION : message);
|
|
|
|
this.message = General.MainWindow.Status.message;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case StatusType.Ready:
|
|
|
|
bool mapopened = (General.Map != null) && (General.Map.Data != null);
|
|
|
|
bool mapisloading = mapopened && General.Map.Data.IsLoading;
|
Removed "Paste Properties Options" action.
Added "Paste Properties Special" actions in "Classic" and "Visual" categories. They work the same way as "Paste Special" action.
Added: "Copy Properties", "Paste Properties" and "Paste Properties Special" options are now shown in the Edit menu if current classic mode supports them.
Changed, Paste Properties Special window: only options relevant to current map format are now displayed.
Changed, Paste Properties Special window, UDMF: all UI-managed options are now available.
Fixed: MAPINFO parser was unable to process "include" directives.
Fixed, General interface: selection info was reset to "Nothing selected" after few seconds regardless of current selection.
Fixed, Visual mode: thing bounding boxes were not updated when changing things positions using Randomize mode.
Fixed, Visual mode: event lines were displayed at incorrect height when entering Visual mode for the first time.
Fixed, Texture Browser window: when MixTexturesFlats Game Configuration option is disabled, textures/flats are no longer shown in the Used group when flats/textures with the same names are used in the map.
Fixed(?): probably fixed an exception some users reported when trying to initialize a Classic mode after switching from Visual mode with "Sync cameras" option enabled.
Changed, Game configurations, Thing Categories: a block must have at least one thing category property to be recognized as a thing category.
Changed, Visplane Explorer: the plugin now outputs more info when it fails to initialize vpo.dll.
Cosmetic, Thing Edit window, Doom/Hexen map format: adjusted UI layout so thing flags control no longer displays scrollbars in Hexen map format.
Internal: merged methods from UDMFTools into UniFields, removed UDMFTools.
Updated Inno Setup script (added VC++ 2008 SP1 distributive).
Updated ZDoom_DECORATE.cfg (A_CheckBlock).
Updated documentation (added "System Requirements" page).
2015-10-09 12:38:12 +00:00
|
|
|
this.selectioninfo = ((string.IsNullOrEmpty(message) && mapopened) ? (string.IsNullOrEmpty(General.MainWindow.Status.selectioninfo) ? NO_SELECTION : General.MainWindow.Status.selectioninfo) : message);
|
2015-09-16 12:10:43 +00:00
|
|
|
this.message = (mapisloading ? LOADING_TEXT : (mapopened ? string.Empty : READY_TEXT));
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
this.selectioninfo = (string.IsNullOrEmpty(message) ? NO_SELECTION : General.MainWindow.Status.selectioninfo);
|
|
|
|
this.message = message;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
this.displayed = false;
|
|
|
|
}
|
2015-09-16 12:10:43 +00:00
|
|
|
|
|
|
|
//mxd
|
|
|
|
public override string ToString()
|
|
|
|
{
|
|
|
|
if(string.IsNullOrEmpty(selectioninfo)) return message;
|
|
|
|
if(string.IsNullOrEmpty(message)) return selectioninfo;
|
|
|
|
return selectioninfo + " " + message;
|
|
|
|
}
|
2009-04-19 18:07:22 +00:00
|
|
|
}
|
|
|
|
|
2015-09-16 12:10:43 +00:00
|
|
|
public enum StatusType
|
2009-04-19 18:07:22 +00:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// When no particular information is to be displayed. The messages displayed depends on running background processes.
|
|
|
|
/// </summary>
|
|
|
|
Ready,
|
2013-07-09 11:29:10 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// mxd. Displays information about current selection.
|
|
|
|
/// </summary>
|
|
|
|
Selection,
|
2009-04-19 18:07:22 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Shows action information and flashes up the status icon once.
|
|
|
|
/// </summary>
|
|
|
|
Action,
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Shows information without flashing the icon.
|
|
|
|
/// </summary>
|
|
|
|
Info,
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Shows information with the busy icon.
|
|
|
|
/// </summary>
|
|
|
|
Busy,
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Shows a warning, makes a warning sound and flashes a warning icon.
|
|
|
|
/// </summary>
|
|
|
|
Warning
|
|
|
|
}
|
2015-11-30 14:18:42 +00:00
|
|
|
|
|
|
|
//mxd. StatusInfo used by Script Editor
|
|
|
|
public struct ScriptStatusInfo
|
|
|
|
{
|
|
|
|
public const string READY_TEXT = "Ready.";
|
|
|
|
|
|
|
|
public readonly ScriptStatusType type;
|
|
|
|
public readonly string message;
|
|
|
|
internal bool displayed;
|
|
|
|
|
|
|
|
internal ScriptStatusInfo(ScriptStatusType type, string message)
|
|
|
|
{
|
|
|
|
this.type = type;
|
|
|
|
|
|
|
|
switch(type)
|
|
|
|
{
|
|
|
|
case ScriptStatusType.Ready:
|
|
|
|
this.message = READY_TEXT;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ScriptStatusType.Info:
|
|
|
|
case ScriptStatusType.Warning:
|
|
|
|
case ScriptStatusType.Busy:
|
|
|
|
this.message = message;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
throw new NotImplementedException("Unsupported Script Status Type!");
|
|
|
|
}
|
|
|
|
|
|
|
|
this.displayed = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//mxd. StatusType used by Script Editor
|
|
|
|
public enum ScriptStatusType
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// When no particular information is to be displayed.
|
|
|
|
/// </summary>
|
|
|
|
Ready,
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Shows information without flashing the icon.
|
|
|
|
/// </summary>
|
|
|
|
Info,
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Shows information with the busy icon.
|
|
|
|
/// </summary>
|
|
|
|
Busy,
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Shows a warning, makes a warning sound and flashes a warning icon.
|
|
|
|
/// </summary>
|
|
|
|
Warning
|
|
|
|
}
|
2009-04-19 18:07:22 +00:00
|
|
|
}
|