Merge branch 'udbmerge202304' into 'master'

Merge current state of UDB

See merge request STJr/UltimateZoneBuilder!2
This commit is contained in:
sphere 2023-05-22 17:26:33 +00:00
commit b62adefedb
353 changed files with 19311 additions and 6641 deletions

View file

@ -57,11 +57,6 @@ jobs:
fi
done
- name: Prepare Package
run: |
# Delete unwanted files
rm -r Build/Setup
- name: Upload Package
uses: actions/upload-artifact@v1
with:

View file

@ -9,7 +9,7 @@ compilers
{
interface = "AccCompiler";
program = "bcc.exe";
zcommon = "zcommon.acs";
zcommon = "zcommon.bcs";
std = "std.acs";
}
}

View file

Binary file not shown.

View file

@ -160,6 +160,7 @@
#define BT_MOVEUP 262144
#define BT_MOVEDOWN 524288
#define BT_SHOWSCORES 1048576
#define BT_RUN 33554432
// Do whatever you want with these.
#define BT_USER1 2097152
@ -298,6 +299,8 @@
#define APROP_MaxStepHeight 44
#define APROP_MaxDropOffHeight 45
#define APROP_DamageType 46
#define APROP_SoundClass 47
#define APROP_FriendlySeeBlocks 48
// New to Eternity
#define APROP_Counter0 100
@ -746,6 +749,8 @@
#define SDF_ABSANGLE 1
#define SDF_PERMANENT 2
#define SDF_FIXED_ZOFF 4
#define SDF_FIXED_DISTANCE 8
// Actor pointer selectors
@ -997,6 +1002,7 @@
#define BLOCKF_SIGHT 256
#define BLOCKF_HITSCAN 512
#define BLOCKF_SOUND 1024
#define BLOCKF_LANDMONSTERS 2048
#define FOGP_DENSITY 0
#define FOGP_OUTSIDEDENSITY 1
@ -1091,6 +1097,10 @@
#define QF_MAX 1 << 3
#define QF_FULLINTENSITY 1 << 4
#define QF_WAVE 1 << 5
#define QF_3D 1 << 6
#define QF_GROUNDONLY 1 << 7
#define QF_AFFECTACTORS 1 << 8
#define QF_SHAKEONLY 1 << 9
#define WARPF_ABSOLUTEOFFSET 0x1
#define WARPF_ABSOLUTEANGLE 0x2

View file

@ -277,9 +277,10 @@ special
280:Ceiling_MoveToValueAndCrush(4, 5),
281:Line_SetAutomapFlags(3),
282:Line_SetAutomapStyle(2),
// new to Eternity
// 300:Portal_Define(5),
283:Polyobj_StopSound(1),
// new to Eternity
// 300:Portal_Define(5),
// 301:Line_QuickPortal(1),
@ -360,7 +361,7 @@ special
-73:CheckFont(1),
-74:DropItem(2,4),
-75:CheckFlag(2),
-76:SetLineActivation(2),
-76:SetLineActivation(2, 3),
-77:GetLineActivation(1),
-78:GetActorPowerupTics(2),
-79:ChangeActorAngle(2,3),
@ -428,6 +429,7 @@ special
-211:StartSlideshow(1),
-212:GetSectorHealth(2),
-213:GetLineHealth(1),
-214:SetSubtitleNumber(2),
// Eternity's
@ -444,4 +446,3 @@ special
-19621:SetTeamScore(2),
-100000:__EndOfList__(10);

View file

@ -0,0 +1,74 @@
/*************************************************************\
Doom Builder 2 Game Configuration for EDGE-Classic
\*************************************************************/
// This is required to prevent accidental use of a different configuration
type = "Doom Builder 2 Game Configuration";
// This is the title to show for this game
game = "EDGE-Classic: Doom 2 (Doom format)";
// This is the simplified game engine/sourceport name
engine = "edge";
// *******************************************************
// * *
// * Note: all the elements that could be factorized *
// * because they were common to ZDoom, GZDoom and *
// * Zandronum have been moved to ZDoom_common.cfg. *
// * *
// *******************************************************
// STANDARD DOOM SETTINGS
// Settings common to all games and all map formats
include("Includes\\Doom_common.cfg", "common");
// Settings common to Doom map format
include("Includes\\Boom_common.cfg", "mapformat_doom");
include("Includes\\MBF21_common.cfg", "mapformat_doom");
// Settings common to Doom games
include("Includes\\Game_Doom.cfg");
include("Includes\\EdgeC_common.cfg", "mapformat_doom");
// Map name format for Doom 2.
mapnameformat = "MAPxy";
//mxd. No DECORATE support in vanilla
decorategames = "";
// Default thing filters
// (these are not required, just useful for new users)
thingsfilters
{
include("Includes\\Doom_misc.cfg", "thingsfilters");
}
// THING TYPES
// Each engine has its own additional thing types
// Order should always be 1: Game; 2: ZDoom/game; 3: ZDoom/zdoom
thingtypes
{
// Basic game actors
include("Includes\\Doom_things.cfg");
include("Includes\\Doom2_things.cfg");
include("Includes\\Boom_things.cfg");
}
// ENUMERATIONS
// Each engine has its own additional thing types
// These are enumerated lists for linedef types and UDMF fields.
enums
{
// Basic game enums
include("Includes\\Doom_misc.cfg", "enums");
}
// Dehacked data
dehacked
{
include("Includes\\Dehacked_Doom.cfg");
}

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -23,6 +23,9 @@ enabledbydefault = true;
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -23,6 +23,9 @@ enabledbydefault = true;
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -20,6 +20,9 @@ engine = "gzdoom";
// *******************************************************
// STANDARD ZDOOM SETTINGS
// GZDoom core
include("Includes\\GZDoom_common.cfg");
// Settings common to all games and all map formats
include("Includes\\ZDoom_common.cfg", "common");

View file

@ -35,9 +35,6 @@ mapnameformat = "MAPxy";
//mxd. No DECORATE support in vanilla
decorategames = "";
//mxd. Don't do vanilla-style thing rotation angle clamping
doomthingrotationangles = false;
// Default thing filters
// (these are not required, just useful for new users)
thingsfilters

View file

@ -19,7 +19,7 @@ common
//mxd. Do vanilla-style thing rotation angle clamping
doomthingrotationangles = true;
// Texture sources
textures
{

View file

@ -148,6 +148,13 @@ sprites
start = "SS_START";
end = "SS_END";
}
// Some WADs rely on buggy behavior of the sprite markers
standard3
{
start = "SS_START";
end = "S_END";
}
}
// Flat sources

View file

@ -1,8 +1,8 @@
0 = "None";
1 = "Light Blinks (randomly)";
2 = "Light Blinks (1 sec.)";
3 = "Light Blinks (0.5 sec.)";
2 = "Light Blinks (0.5 sec.)";
3 = "Light Blinks (1 sec.)";
4 = "Damage -10 or 20% health and Light Blinks (0.5 sec.)";
5 = "Damage -5 or 10% health";
7 = "Damage -2 or 5% health";
@ -10,8 +10,8 @@
9 = "Secret";
10 = "Door Close Stay (after 30 sec.)";
11 = "Damage -10 or 20% health and End level";
12 = "Light Blinks (0.5 sec. synchronized)";
13 = "Light Blinks (1 sec. synchronized)";
12 = "Light Blinks (1 sec. synchronized)";
13 = "Light Blinks (0.5 sec. synchronized)";
14 = "Door Open Close (opens after 5 min.)";
16 = "Damage -10 or 20% health";
17 = "Light Flickers (randomly)";

View file

@ -0,0 +1,390 @@
// ***********************************************************
// * *
// * These values are mainly for UDMF EDGE-Classic *
// * *
// ***********************************************************
common
{
// Some common settings
include("Common.cfg");
// Default testing parameters
include("Test_params.cfg", "modern");
// Default nodebuilder configurations
defaultsavecompiler = "glbsp_normal";
defaulttestcompiler = "glbsp_fast";
// Generalized actions
// generalizedlinedefs is true for Doom format and false for
// the other two, so it's not here.
generalizedsectors = true;
//mxd. Maximum safe map size check (0 means skip check)
safeboundary = 0;
// Texture loading options
mixtexturesflats = true;
defaulttexturescale = 1.0f;
defaultflatscale = 1.0f;
scaledtextureoffsets = true;
//mxd. Sidedefs compression
// ioanch FIXME: what does this do? I made it false
sidedefcompressionignoresaction = false;
// Texture sources
textures
{
include("Doom_misc.cfg", "textures");
include("EdgeC_misc.cfg", "textures");
}
//mxd. HiRes sources
hires
{
include("EdgeC_misc.cfg", "hires");
}
// Patch sources
patches
{
include("Doom_misc.cfg", "patches");
}
// Sprite sources
sprites
{
include("Doom_misc.cfg", "sprites");
}
// Flat sources
flats
{
include("Doom_misc.cfg", "flats");
}
// Colormap sources
colormaps
{
include("Boom_misc.cfg", "colormaps");
}
compatibility
{
fixnegativepatchoffsets = true;
fixmaskedpatchoffsets = true;
}
}
mapformat_doom
{
mixtexturesflats = true;
// The format interface handles the map data format
formatinterface = "DoomMapSetIO";
maplumpnames
{
include("Doom_misc.cfg", "doommaplumpnames");
include("Boom_misc.cfg", "boommaplumpnames");
}
// When this is set to true, sectors with the same tag will light up when a line is highlighted
linetagindicatesectors = true;
// Default flags for first new thing
defaultthingflags
{
include("Doom_misc.cfg", "defaultthingflags");
}
// Door making
//include("ZDoom_misc.cfg", "doormaking_doom");
// Generalized actions
generalizedlinedefs = true;
generalizedsectors = true;
// GENERALIZED LINEDEF TYPES
gen_linedeftypes
{
include("Boom_generalized.cfg", "gen_linedeftypes");
}
// GENERALIZED SECTOR TYPES
gen_sectortypes
{
include("Boom_generalized.cfg", "gen_sectortypes");
}
// DEFAULT SECTOR BRIGHTNESS LEVELS
sectorbrightness
{
include("Doom_misc.cfg", "sectorbrightness");
}
// SECTOR TYPES
sectortypes
{
include("Doom_sectors.cfg");
include("EdgeC_sectors.cfg");
}
// LINEDEF FLAGS
linedefflags
{
include("Doom_misc.cfg", "linedefflags");
include("Boom_misc.cfg", "linedefflags");
}
// LINEDEF ACTIVATIONS
linedefactivations
{
}
// Linedef flags UDMF translation table
// This is needed for copy/paste and prefabs to work properly
// When the UDMF field name is prefixed with ! it is inverted
linedefflagstranslation
{
include("Doom_misc.cfg", "linedefflagstranslation");
include("Boom_misc.cfg", "linedefflagstranslation");
}
// LINEDEF TYPES
linedeftypes
{
include("Doom_linedefs.cfg");
include("Boom_linedefs.cfg");
include("EdgeC_linedefs.cfg");
}
thingtypes
{
include("EdgeC_things.cfg");
}
// THING FLAGS
thingflags
{
include("Doom_misc.cfg", "thingflags");
include("Boom_misc.cfg", "thingflags");
}
// Thing flags UDMF translation table
// This is needed for copy/paste and prefabs to work properly
// When the UDMF field name is prefixed with ! it is inverted
thingflagstranslation
{
include("Doom_misc.cfg", "thingflagstranslation");
include("Boom_misc.cfg", "thingflagstranslation");
}
// How to compare thing flags (for the stuck things error checker)
thingflagscompare
{
include("Doom_misc.cfg", "thingflagscompare");
include("Boom_misc.cfg", "thingflagscompare");
}
// Things flags masks
include("Doom_misc.cfg", "thingflagsmasks");
mixtexturesflats = true;
// Texture sources
textures
{
include("Doom_misc.cfg", "textures");
include("EdgeC_misc.cfg", "textures"); // works for Eternity too
}
//mxd. HiRes sources
hires
{
include("EdgeC_misc.cfg", "hires");
}
}
// ***********************************************************
// * *
// * Text map format *
// * *
// ***********************************************************
mapformat_udmf
{
// The format interface handles the map data format
formatinterface = "UniversalMapSetIO";
//mxd. The default script compiler to use
defaultscriptcompiler = "zdoom_acs.cfg";
// Enables support for long (> 8 chars) texture names
// WARNING: this should only be enabled for UDMF game configurations!
// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
longtexturenames = false;
// Enables setting brightness for floor and ceiling independently from each other
distinctfloorandceilingbrightness = false;
// Default nodebuilder configurations
defaultsavecompiler = "zdbsp_udmf_normal";
defaulttestcompiler = "zdbsp_udmf_fast";
// ioanch: eternity
engine = "edge"; // override that so that DB2 uses the correct namespace
maplumpnames
{
include("UDMF_misc.cfg", "udmfmaplumpnames_begin");
include("EdgeC_misc.cfg", "udmfmaplumpnames");
include("UDMF_misc.cfg", "udmfmaplumpnames_end");
}
// eternity
universalfields
{
include("EdgeC_misc.cfg", "universalfields");
}
// When this is set to true, sectors with the same tag will light up when a line is highlighted
linetagindicatesectors = true;
// Special linedefs
//include("ZDoom_misc.cfg", "speciallinedefs_udmf"); // same in EE
// Default flags for first new thing
defaultthingflags
{
include("EdgeC_misc.cfg", "defaultthingflags_udmf");
}
// Door making
//include("Eternity_misc.cfg", "doormaking_udmf");
// Generalized actions
generalizedlinedefs = true;
generalizedsectors = true;
// GENERALIZED SECTOR TYPES
//gen_sectortypes
//{
// include("Eternity_generalized.cfg", "gen_sectortypes_udmf");
//}
// SECTOR FLAGS
//sectorflags
//{
// include("Eternity_misc.cfg", "sectorflags_udmf");
//}
// DEFAULT SECTOR BRIGHTNESS LEVELS
//sectorbrightness
//{
// include("ZDoom_misc.cfg", "sectorbrightness");
//}
// SECTOR TYPES
//sectortypes
//{
// include("Eternity_misc.cfg", "sectors_udmf");
//}
// SECTOR RENSERSTYLES
//sectorrenderstyles
//{
// include("UDMF_misc.cfg", "sectorrenderstyles");
//}
// LINEDEF FLAGS
//linedefflags
//{
// include("Eternity_misc.cfg", "linedefflags_udmf");
//}
// LINEDEF ACTIVATIONS
//linedefactivations
//{
// include("Eternity_misc.cfg", "linedefactivations_udmf");
//}
//mxd. Linedef flags UDMF translation table
// This is needed for copy/paste and prefabs to work properly
// When the UDMF field name is prefixed with ! it is inverted
linedefflagstranslation
{
include("Doom_misc.cfg", "linedefflagstranslation");
//include("Hexen_misc.cfg", "linedefflagstranslation");
//include("ZDoom_misc.cfg", "linedefflagstranslation");
}
// LINEDEF RENSERSTYLES
//linedefrenderstyles
//{
// include("UDMF_misc.cfg", "linedefrenderstyles");
//}
//SIDEDEF FLAGS
//sidedefflags
//{
// include("Eternity_misc.cfg", "sidedefflags");
//}
// THING FLAGS
//thingflags
//{
// include("Eternity_misc.cfg", "thingflags_udmf");
//}
// THING RENSERSTYLES
//thingrenderstyles
//{
// include("UDMF_misc.cfg", "thingrenderstyles");
//}
// How to compare thing flags (for the stuck things error checker)
//thingflagscompare
//{
// include("Eternity_misc.cfg", "thingflagscompare_udmf");
//}
//mxd. Thing flags UDMF translation table
// This is needed for copy/paste and prefabs to work properly
// When the UDMF field name is prefixed with ! it is inverted
thingflagstranslation
{
include("Doom_misc.cfg", "thingflagstranslation");
//include("Hexen_misc.cfg", "thingflagstranslation");
//include("ZDoom_misc.cfg", "thingflagstranslation");
}
// Things flags masks
//include("Hexen_misc.cfg", "thingflagsmasks");
// LINEDEF TYPES
//linedeftypes
//{
// include("Hexen_linedefs.cfg");
// include("Eternity_linedefs.cfg", "udmf");
//}
// Texture sources
textures
{
include("Doom_misc.cfg", "textures");
include("EdgeC_misc.cfg", "textures"); // works for Eternity too
}
//mxd. HiRes sources
hires
{
include("EdgeC_misc.cfg", "hires");
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,636 @@
// Texture loading options
mixtexturesflats = true;
defaulttexturescale = 1.0f;
defaultflatscale = 1.0f;
linedefflags
{
512 = "PassThru";
}
linedefflagtooltips
{
512 = "Normally, if you try to pull a switch or use a door, then players are only able to activate\nthe closest linedef with a special. When PassThru is set, your use reaches\nthrough and allows players to activate both this line and whatever is behind this\nline.\nThis does nothing for 1-sided lines because they always block use actions.\n\nNote that if someone plays your map on ZDoom-derived ports like GZDoom or Zandronum,\nthen PassThru will be true for walkover specials & scrollers even when this flag\nis not set, unless you set 'compat_useblocking' in MAPINFO.";
}
// Linedef flags UDMF translation table
// This is needed for copy/paste and prefabs to work properly
// When the UDMF field name is prefixed with ! it is inverted
linedefflagstranslation
{
512 = "passuse";
}
linedefflags_udmf
{
blocking = "Impassable";
blockmonsters = "Block monster";
twosided = "Doublesided";
dontpegtop = "Upper unpegged";
dontpegbottom = "Lower unpegged";
secret = "Secret";
blocksound = "Block sound";
dontdraw = "Hidden";
mapped = "Shown";
passuse = "PassThru";
}
linedefflagtooltips_udmf
{
blocking = "If set on a 2-sided linedef, the linedef blocks players and monsters from being able to move through it. \nThis is typically used for mid-textured cage bars.\nBy convention, most doom-related software sets it for 1-sided lines by default because the\nid Software maps did, but it doesn't actually do anything.";
blockmonsters = "If set, blocks only monster movement.\n(in addition to whatever existing blocking properties it would have).";
twosided = "If set, then it has 2 sidedefs and acts as a connection between two sectors.";
dontpegtop = "If set:\nIf the linedef is 2-sided, the upper texture starts at the height of the higher ceiling.\nIf not set: and the linedef is 2-sided, the upper texture starts at the lower ceiling instead.\nIf the linedef is 1-sided, this does nothing.";
dontpegbottom = "If set: If the linedef is 2-sided, the lower texture starts at the height of the higher ceiling.\nIf not set: and the linedef is 2-sided, the upper texture starts at the higher floor instead.\nIf the linedef is 1-sided, this makes the mid texture start at floor instead of the ceiling.\nYou probably want to use this for door tracks if you don't want them to move with the door.";
secret = "If set, this flag prevents it from being marked as a switch or a door on the automap.";
blocksound = "If set, this linedef will partially block monster-waking sound from passing into the sector on the other side of it.\nNote that a sound must try to pass through two of these lines before being blocked.\nThis does not block the actual audio that the player hears at all, it is only for the monster AI.\nThis does nothing for 1-sided linedefs.";
dontdraw = "If set, this line is not shown on the automap even if you are looking directly at it";
mapped = "If set, this line is always revealed on the automap even if you haven't actually visited the area.";
passuse = "Normally, if you try to pull a switch or use a door, then players are only able to activate\nthe closest linedef with a special. When PassThru is set, your use reaches\nthrough and allows players to activate both this line and whatever is behind this\nline.\nThis does nothing for 1-sided lines because they always block use actions.\n\nNote that if someone plays your map on ZDoom-derived ports like GZDoom or Zandronum,\nthen PassThru will be true for walkover specials & scrollers even when this flag\nis not set, unless you set 'compat_useblocking' in MAPINFO.";
}
thingflags
{
//2048 = "Translucent (25%)";
//4096 = "Invisible";
//8192 = "Friendly";
//16384 = "Frozen while inactive";
}
thingflags_udmf
{
skill1 = "Skill 1";
skill2 = "Skill 2";
skill3 = "Skill 3";
skill4 = "Skill 4";
skill5 = "Skill 5";
ambush = "Ambush";
single = "Singleplayer";
dm = "Deathmatch";
coop = "Cooperative";
friend = "Friendly";
}
thingflagtooltips_udmf
{
skill1 = "If set, this actor appears on 'I'm Too Young To Die' difficulty.";
skill2 = "If set, this actor appears on 'Hey, Not Too Rough' difficulty.";
skill3 = "If set, this actor appears on 'Hurt Me Plenty' difficulty.";
skill4 = "If set, this actor appears on 'Ultraviolence' difficulty.";
skill5 = "If set, this actor appears on 'Nightmare' difficulty.";
ambush = "If set, this actor does not wake up if it hears the player until the player comes within field of view\n(even if the actor is facing the away from the player).";
single = "If not set, the actor does not appear in singleplayer modes.";
dm = "If not set, the actor does not appear in deathmatch modes.";
coop = "If not set, the actor does not appear in co-op modes.";
friend = "If set, the actor is friendly to the player.\nIf it is a monster, it will attack other players.";
}
// Thing flags UDMF translation table
// This is needed for copy/paste and prefabs to work properly
// When the UDMF field name is prefixed with ! it is inverted
thingflagstranslation
{
//2048 = "translucent";
//4096 = "invisible";
//8192 = "friend";
//16384 = "standing";
}
defaultthingflags
{
1;
2;
4;
}
defaultthingflags_udmf
{
skill1;
skill2;
skill3;
skill4;
skill5;
single;
coop;
dm;
}
// Default sector brightness levels
sectorbrightness
{
255; 248; 240; 232; 224; 216; 208; 200; 192; 184; 176; 168; 160; 152; 144; 136;
128; 120; 112; 104; 96; 88; 80; 72; 64; 56; 48; 40; 32; 24; 16; 8; 0;
}
/*
TEXTURES AND FLAT SOURCES
This tells Doom Builder where to find the information for textures
and flats in the IWAD file, Addition WAD file and Map WAD file.
Start and end lumps must be given in a structure (of which the
key name doesnt matter) and any textures or flats in between them
are loaded in either the textures category or flats category.
For textures: PNAMES, TEXTURE1 and TEXTURE2 are loaded by default.
*/
textures
{
edge1
{
start = "TX_START";
end = "TX_END";
}
}
hires
{
edge1
{
start = "HI_START";
end = "HI_END";
}
}
/*
ADDITIONAL UNIVERSAL DOOM MAP FORMAT FIELD DEFINITIONS
See Documents\fielddatatypes.txt for informtion on the types.
*/
universalfields
{
linedef
{
comment
{
type = 2;
default = "";
}
}
sidedef
{
comment
{
type = 2;
default = "";
}
}
thing
{
comment
{
type = 2;
default = "";
}
}
sector
{
comment
{
type = 2;
default = "";
}
}
}
/*
MAP LUMP NAMES
Map lumps are loaded with the map as long as they are right after each other. When the editor
meets a lump which is not defined in this list it will ignore the map if not satisfied.
The order of items defines the order in which lumps will be written to WAD file on save.
To indicate the map header lump, use ~MAP
Legenda:
required = Lump is required to exist.
blindcopy = Lump will be copied along with the map blindly. (usefull for lumps Doom Builder doesn't use)
nodebuild = The nodebuilder generates this lump.
allowempty = The nodebuilder is allowed to leave this lump empty.
script = This lump is a text-based script. Specify the filename of the script configuration to use.
*/
doommaplumpnames
{
REJECT
{
allowempty = true;
}
}
udmfmaplumpnames
{
BEHAVIOR
{
required = false;
nodebuild = false;
blindcopy = true;
}
DIALOGUE
{
required = false;
nodebuild = false;
script = "ZDoom_USDF.cfg";
}
ZNODES
{
required = false;
nodebuild = true;
allowempty = false;
}
BLOCKMAP
{
required = false;
nodebuild = true;
allowempty = true;
}
REJECT
{
required = false;
nodebuild = true;
allowempty = true;
}
SCRIPTS
{
required = false;
nodebuild = false;
script = "ZDoom_ACS.cfg";
}
}
enums
{
frontback
{
0 = "Front";
1 = "Back";
}
backfront
{
1 = "Front";
0 = "Back";
}
floorceiling
{
0 = "Floor";
1 = "Ceiling";
}
ceilingfloor
{
0 = "Ceiling";
1 = "Floor";
}
sector_flags
{
1 = "Silent";
2 = "No Falling Damage";
4 = "Drop with floor";
8 = "No Respawn";
}
keys
{
0 = "None";
1 = "Red key card";
2 = "Blue key card";
3 = "Yellow key card";
4 = "Red skull key";
5 = "Blue skull key";
6 = "Yellow skull key";
100 = "Any key";
101 = "All keys";
102 = "Impossible";
129 = "Any red key";
130 = "Any blue key";
131 = "Any yellow key";
229 = "One of each color";
}
spawnthing
{
0 = "None";
1 = "Shotgun Guy";
2 = "Chaingun Guy";
3 = "Baron Of Hell";
4 = "Zombieman";
5 = "Imp";
6 = "Arachnotron";
7 = "Spider Mastermind";
8 = "Demon";
9 = "Spectre";
10 = "Imp Fireball";
11 = "Clip";
12 = "Shells";
19 = "Cacodemon";
20 = "Revenant";
21 = "Bridge";
22 = "Armour Bonus";
23 = "Stimpack";
24 = "Medkit";
25 = "Soul Sphere";
27 = "Shotgun";
28 = "Chaingun";
29 = "Rocket Launcher";
30 = "Plasma Gun";
31 = "BFG";
32 = "Chainsaw";
33 = "Super Shotgun";
51 = "Plasma Bolt";
53 = "Tracer";
68 = "Green Armour";
69 = "Blue Armour";
75 = "Cell";
85 = "Blue Keycard";
86 = "Red Keycard";
87 = "Yellow Keycard";
88 = "Yellow Skullkey";
89 = "Red Skullkey";
90 = "Blue Skullkey";
98 = "Temp Large Flame";
100 = "Stealth Baron";
101 = "Stealth Hell Knight";
102 = "Stealth Zombieman";
103 = "Stealth Shotgun Guy";
110 = "Lost Soul";
111 = "Arch-Vile";
112 = "Mancubus";
113 = "Hell Knight";
114 = "Cyberdemon";
115 = "Pain Elemental";
116 = "Wolf SS Soldier";
117 = "Stealth Arachnotron";
118 = "Stealth Arch-Vile";
119 = "Stealth Cacodemon";
120 = "Stealth Chaingun Guy";
121 = "Stealth Demon";
122 = "Stealth Imp";
123 = "Stealth Mancubus";
124 = "Stealth Revenant";
125 = "Barrel";
126 = "Cacodemon Shot";
127 = "Rocket (Projectile)";
128 = "BFG Shot";
129 = "Arachnotron Plasma Bolt";
130 = "Blood";
131 = "Bullet Puff";
132 = "Megasphere";
133 = "Invulnerability Sphere";
134 = "Berserk Pack";
135 = "Invisibility Sphere";
136 = "Radiation Suit";
137 = "Computer Map";
138 = "Light-Amp Goggles";
139 = "Box Of Ammo";
140 = "Rocket (Ammo)";
141 = "Box Of Rockets";
142 = "Larce Cell";
143 = "Box Of Shells";
144 = "Backpack";
145 = "Guts";
146 = "Blood Pool 1";
147 = "Blood Pool 2";
148 = "Blood Pool 3";
149 = "Flaming Barrel";
150 = "Brains";
151 = "Scripted Marine";
152 = "Health Bonus";
153 = "Mancubus Shot";
154 = "Baron Fireball";
}
generic_floor_target
{
0 = "Relative offset";
1 = "Highest neighbor";
2 = "Lowest neighbor";
3 = "Nearest neighbor";
4 = "Lowest neighbor";
5 = "Ceiling";
6 = "Shortest lower texture";
}
generic_ceiling_target
{
0 = "Relative offset";
1 = "Highest neighbor";
2 = "Lowest neighbor";
3 = "Nearest neighbor";
4 = "Highest neighbor";
5 = "Floor";
6 = "Shortest lower texture";
}
generic_door_types
{
0 = "Open Close";
1 = "Open Stay";
2 = "Close Open";
3 = "Close Stay";
}
generic_lift_types
{
0 = "Up Stay";
1 = "Down Up";
2 = "Down to nearest";
3 = "Down to lowest";
4 = "Perpetual raise";
}
death_types
{
0 = "Unknown";
12 = "Water";
13 = "Slime";
14 = "Lava";
15 = "Crush";
16 = "Telefrag";
17 = "Falling";
18 = "Suicide";
19 = "Barrel";
20 = "Exit";
21 = "Splash";
22 = "Hit";
}
}
// Default thing filters
// (these are not required, just usefull for new users)
thingsfilters_udmf
{
filter0
{
name = "Keys only";
category = "keys";
type = -1;
}
filter2
{
name = "Skill 1";
category = "";
type = -1;
fields
{
skill1 = true;
}
}
filter3
{
name = "Skill 2";
category = "";
type = -1;
fields
{
skill2 = true;
}
}
filter4
{
name = "Skill 3";
category = "";
type = -1;
fields
{
skill3 = true;
}
}
filter5
{
name = "Skill 4";
category = "";
type = -1;
fields
{
skill4 = true;
}
}
/*
filter6
{
name = "Skill 5";
category = "";
type = -1;
fields
{
skill5 = true;
}
}
filter7
{
name = "Skill 6";
category = "";
type = -1;
fields
{
skill6 = true;
}
}
filter8
{
name = "Skill 7";
category = "";
type = -1;
fields
{
skill7 = true;
}
}
filter9
{
name = "Skill 8";
category = "";
type = -1;
fields
{
skill8 = true;
}
}
*/
}
// How thing flags should be compared (for the stuck thing error check)
thingflagscompare_udmf
{
skills {
skill6;
skill7;
skill8;
}
classes {
class4;
class5;
class6;
class7;
class8;
}
}

View file

@ -0,0 +1,63 @@
29 = "Hub Entry";
20 = "Airless";
25 = "Lo Grav";
4418 = "Water Liquid Extrafloor SCROLL/PUSH North";
4419 = "Water Liquid Extrafloor SCROLL/PUSH North East";
4420 = "Water Liquid Extrafloor SCROLL/PUSH East";
4421 = "Water Liquid Extrafloor SCROLL/PUSH South East";
4422 = "Water Liquid Extrafloor SCROLL/PUSH South";
4423 = "Water Liquid Extrafloor SCROLL/PUSH South West";
4424 = "Water Liquid Extrafloor SCROLL/PUSH West";
4425 = "Water Liquid Extrafloor SCROLL/PUSH North West";
4426 = "Slime Liquid Extrafloor SCROLL/PUSH North";
4427 = "Slime Liquid Extrafloor SCROLL/PUSH North East";
4428 = "Slime Liquid Extrafloor SCROLL/PUSH East";
4429 = "Slime Liquid Extrafloor SCROLL/PUSH South East";
4430 = "Slime Liquid Extrafloor SCROLL/PUSH South";
4431 = "Slime Liquid Extrafloor SCROLL/PUSH South West";
4432 = "Slime Liquid Extrafloor SCROLL/PUSH West";
4433 = "Slime Liquid Extrafloor SCROLL/PUSH North West";
4434 = "Lava Liquid Extrafloor SCROLL/PUSH North";
4435 = "Lava Liquid Extrafloor SCROLL/PUSH North East";
4436 = "Lava Liquid Extrafloor SCROLL/PUSH East";
4437 = "Lava Liquid Extrafloor SCROLL/PUSH South East";
4438 = "Lava Liquid Extrafloor SCROLL/PUSH South";
4439 = "Lava Liquid Extrafloor SCROLL/PUSH South West";
4440 = "Lava Liquid Extrafloor SCROLL/PUSH West";
4441 = "Lava Liquid Extrafloor SCROLL/PUSH North West";
4442 = "Push North";
4443 = "Push North East";
4444 = "Push East";
4445 = "Push South East";
4446 = "Push South";
4447 = "Push South West";
4448 = "Push West";
4449 = "Push North West";
4450 = "Scroll Floor Texture North";
4451 = "Scroll Floor Texture North East";
4452 = "Scroll Floor Texture East";
4453 = "Scroll Floor Texture South East";
4454 = "Scroll Floor Texture South";
4455 = "Scroll Floor Texture South West";
4456 = "Scroll Floor Texture West";
4457 = "Scroll Floor Texture North West";
4458 = "Scroll Floor Texture/Push North";
4459 = "Scroll Floor Texture/Push North East";
4460 = "Scroll Floor Texture/Push East";
4461 = "Scroll Floor Texture/Push South East";
4462 = "Scroll Floor Texture/Push South";
4463 = "Scroll Floor Texture/Push South West";
4464 = "Scroll Floor Texture/Push West";
4465 = "Scroll Floor Texture/Push North West";
4466 = "Blue Hue (Swimmable)";
4467 = "Green Hue (Swimmable)";
4468 = "Green Hue + Damage (Swimmable)";
4469 = "Red Hue (Swimmable)";
4470 = "Red Hue + Damage (Swimmable)";
4471 = "Blue Hue";
4472 = "Green Hue";
4473 = "Red Hue";
4474 = "Yellow Hue";
4475 = "Purple Hue";
4476 = "Grey Hue";

View file

@ -0,0 +1,331 @@
EDGE_monsters
{
color = 12; // Light Red
arrow = 1;
title = "Edge: Monsters";
width = 20;
sort = 1;
height = 56;
hangs = 0;
blocking = 1;
error = 2;
4050
{
title = "Stealth Arachnotron";
height = 32;
}
4051
{
title = "Stealth Archvile";
height = 32;
}
4052
{
title = "Stealth Baron of Hell";
height = 32;
}
4053
{
title = "Stealth Cacodemon";
height = 32;
}
4054
{
title = "Stealth Heavy weapon dude";
height = 32;
}
4055
{
title = "Stealth Demon";
height = 32;
}
4056
{
title = "Stealth Hell knight";
height = 32;
}
4057
{
title = "Stealth Imp";
height = 32;
}
4058
{
title = "Stealth Mancubus";
height = 32;
}
4059
{
title = "Stealth Revenant";
height = 32;
}
4060
{
title = "Stealth Shotgun Guy";
height = 32;
}
4061
{
title = "Stealth Zombie man";
height = 32;
}
7100
{
title = "EDGE Revenant MKII";
height = 32;
}
7101
{
title = "EDGE Teleport spawner";
height = 32;
}
7102
{
title = "Arachnotron MKII";
height = 32;
}
7103
{
title = "Mancubus MKII";
height = 32;
}
}
edge_powerups
{
color = 9; // Light Blue
arrow = 0;
title = "EDGE: Powerups";
width = 20;
height = 20;
hangs = 0;
blocking = 0;
sort = 1;
7000
{
title = "EDGE Nightvision Specs";
sprite = "NVSCA0";
}
7020
{
title = "EDGE Jetpack";
sprite = "JPCKA0";
}
7005
{
title = "EDGE Stop Time";
sprite = "TSTPB0";
}
}
edge_glowlights
{
color = 9; // Light Blue
arrow = 0;
title = "EDGE: Sector Light FX";
sprite = "internal:light";
width = 20;
height = 20;
hangs = 0;
blocking = 0;
7041
{
title = "EDGE Nukage Glow";
height = 32;
}
7042
{
title = "EDGE Lava Glow";
height = 32;
}
7043
{
title = "EDGE Water Glow";
height = 32;
}
}
edge_lights
{
color = 9; // Light Blue
arrow = 0;
title = "EDGE: Lights";
sprite = "internal:light";
width = 8;
height = 20;
hangs = 0;
blocking = 0;
7044
{
title = "White light: Floor";
height = 32;
color = 15;
}
7045
{
title = "Yellow light: Floor";
height = 32;
color = 15;
}
7046
{
title = "Red light: Floor";
height = 32;
color = 15;
}
7047
{
title = "Blue light: Floor";
height = 32;
color = 15;
}
7048
{
title = "Green light: Floor";
height = 32;
color = 15;
}
7049
{
title = "Orange light: Floor";
height = 32;
color = 15;
}
7054
{
title = "White light: Ceiling";
height = 16;
hangs = 1;
color = 15;
}
7055
{
title = "Yellow light: Ceiling";
height = 16;
hangs = 1;
color = 15;
}
7056
{
title = "Red light: Ceiling";
height = 16;
hangs = 1;
color = 15;
}
7057
{
title = "Blue light: Ceiling";
height = 16;
hangs = 1;
color = 15;
}
7058
{
title = "Green light: Ceiling";
height = 16;
hangs = 1;
color = 15;
}
7059
{
title = "Orange light: Ceiling";
height = 16;
hangs = 1;
color = 15;
}
}
edge_keys
{
color = 13; // Light Magenta
arrow = 0;
title = "EDGE: Keys";
width = 20;
sort = 1;
height = 16;
hangs = 0;
blocking = 0;
7015
{
title = "Green keycard";
sprite = "BKEYA0";
}
7017
{
title = "Green skullkey";
sprite = "BSKUB0";
}
}
edge_armour
{
color = 1; // Blue
arrow = 0;
title = "EDGE: Armour";
width = 20;
sort = 1;
height = 16;
hangs = 0;
blocking = 0;
7031
{
title = "Purple armor";
sprite = "ARM1A0";
}
7032
{
title = "Yellow armor";
sprite = "ARM2A0";
}
7033
{
title = "Red armor";
sprite = "ARM2A0";
}
}

View file

@ -511,10 +511,11 @@ linedefactivations_udmf
monsteruse = "When monster presses use";
monstercross = "When monster walks over";
monsterpush = "When monsters bumps";
monstershoot = "On monster hitscan impact";
// anycross = "Any crossing non-missile activates";
missilecross = "When projectile crosses";
polycross = "When polyobject moves over";
impact = "On projectile impact";
impact = "On player hitscan impact";
// checkswitchrange = "Switch height check";
passuse
{

View file

@ -0,0 +1,21 @@
// This is used to require GZDoom.pk3 when you are working with a GZDoom game configuration.
requiredarchives
{
gzdoom
{
filename = "gzdoom.pk3";
need_exclude = true;
0
{
// this is currently checked globally for all archives
class = "actor";
}
1
{
lump = "x11r6rgb.txt";
}
}
}

View file

@ -1,5 +1,89 @@
gzdoom_lights
{
staticlights
{
color = 7;
arrow = 0;
title = "Static Lights";
sort = 1;
width = 0;
height = 0;
hangs = 0;
blocking = 0;
fixedsize = true;
sprite = "internal:light";
9875
{
title = "Light Probe";
}
9876
{
title = "Static Point Light";
class = "StaticPointLight"; // Fake class name
arg0
{
title = "Red";
default = 255;
}
arg1
{
title = "Green";
default = 255;
}
arg2
{
title = "Blue";
default = 255;
}
arg3
{
title = "Radius";
default = 64;
}
}
9881
{
title = "Static Spotlight";
class = "StaticSpotLight"; // Fake class name
arg0
{
title = "Color";
default = 16777215;
str = true;
}
arg1
{
title = "Inner angle";
default = 8;
}
arg2
{
title = "Outer angle";
default = 32;
}
arg3
{
title = "Radius";
default = 64;
}
}
9890
{
title = "ZDRayInfo";
class = "ZDRaySun"; // Fake class name
adduniversalfields
{
lm_suncolor;
lm_sampledistance;
lm_gridsize;
}
}
}
dynlights
{
color = 7;

View file

@ -1,16 +1,16 @@
0 = "None";
1 = "Light Blinks (randomly)";
2 = "Light Blinks (1 sec.)";
3 = "Light Blinks (0.5 sec.)";
2 = "Light Blinks (0.5 sec.)";
3 = "Light Blinks (1 sec.)";
4 = "Damage (5 Points, Fast, Fire), Light Blinks (0.5s), Scroll East (Fast)";
5 = "Damage (5 Points, Fast, Fire)";
7 = "Damage (4 Points, Slow, Normal)";
8 = "Light Glows (1.0s)";
9 = "Secret";
10 = "Door Close Stay (After 30s)";
12 = "Light Blinks (0.5s Synchronized)";
13 = "Light Blinks (1.0s Synchronized)";
12 = "Light Blinks (1 sec. synchronized)";
13 = "Light Blinks (0.5 sec. synchronized)";
14 = "Door Open Stay (After 300s)";
15 = "Friction";
16 = "Damage (8 Points, Fast, Fire)";

View file

@ -7,10 +7,14 @@ mapformat_doom
linedefflags
{
include("MBF21_misc.cfg", "linedefflags");
}
thingflags
{
include("MBF21_misc.cfg", "thingflags");
}
linedeftypes
{
include("MBF21_linedefs.cfg");

View file

@ -4,3 +4,8 @@ linedefflags
4096 = "Block land monsters";
8192 = "Block players";
}
thingflags
{
128 = "Friendly";
}

View file

@ -1,7 +1,7 @@
0 = "None";
1 = "Light blinks (randomly)";
2 = "Light blinks (1 sec.)";
3 = "Light blinks (0.5 sec.)";
2 = "Light blinks (0.5 sec.)";
3 = "Light blinks (1 sec.)";
4 = "5% damage every 32 tics + light blink 0.5 sec.";
5 = "Damage: +2 to nukagecount";
7 = "Damage 5% every 32 tics";
@ -9,8 +9,8 @@
9 = "Secret";
10 = "Ceiling closes 30 seconds after level start";
11 = "20% dmg. per sec. When player dies, level ends";
12 = "Light blink 0.5 second, synchronized";
13 = "Light blink 1 second, synchronized";
12 = "Light blink 1 second, synchronized";
13 = "Light blink 0.5 seconds, synchronized";
14 = "Ceiling opens 5 minutes after level start";
15 = "Instant death: 999% damage every tic";
16 = "Damage: +4 to nukagecount";

View file

@ -368,6 +368,12 @@ mapformat_udmf
distinctfloorandceilingbrightness = true;
distinctwallbrightness = true;
// Enabled setting brightness for upper, middle, and lower sidedef independently from each other
distinctsidedefpartbrightness = true;
// Enables multiple tags on sectors
sectormultitag = true;
// Default nodebuilder configurations
defaultsavecompiler = "zdbsp_udmf_normal";
defaulttestcompiler = "zdbsp_udmf_fast";

View file

@ -70,7 +70,7 @@ linedefactivations_udmf
monsterpush = "When monsters bumps";
anycross = "Any crossing non-missile activates";
missilecross = "When projectile crosses";
impact = "On projectile impact";
impact = "On player hitscan/projectile impact";
checkswitchrange
{
name = "Switch height check";
@ -332,8 +332,25 @@ universalfields
automapstyle
{
type = 0;
type = 11;
default = 0;
enum
{
0 = "Default";
1 = "One-sided wall";
2 = "Two-sided wall";
3 = "Floor levels of front and back sectors are different";
4 = "Ceiling levels of front and back sectors are different";
5 = "3D floor border";
6 = "Wall with special non-door action";
7 = "Secret door";
8 = "Wall not seen yet";
9 = "Locked door";
10 = "Intra-level teleporter";
11 = "Inter-level or game-ending teleporter";
12 = "Unexplored secret wall";
13 = "Portal line";
}
}
arg0str
@ -358,7 +375,31 @@ universalfields
{
type = 2;
default = "";
}
}
lm_sampledist_line
{
type = 0;
default = 0;
}
lm_sampledist_top
{
type = 0;
default = 0;
}
lm_sampledist_mid
{
type = 0;
default = 0;
}
lm_sampledist_bot
{
type = 0;
default = 0;
}
}
sidedef
@ -451,7 +492,43 @@ universalfields
{
type = 1;
default = 1.0;
}
}
light_top
{
type = 0;
default = 0;
}
lightabsolute_top
{
type = 3;
default = false;
}
light_mid
{
type = 0;
default = 0;
}
lightabsolute_mid
{
type = 3;
default = false;
}
light_bottom
{
type = 0;
default = 0;
}
lightabsolute_bottom
{
type = 3;
default = false;
}
}
thing
@ -659,6 +736,27 @@ universalfields
type = 1;
default = 1.0;
}
lm_suncolor
{
type = 10;
default = 16777215;
thingtypespecific = true;
}
lm_sampledistance
{
type = 0;
default = 8;
thingtypespecific = true;
}
lm_gridsize
{
type = 1;
default = 32.0;
thingtypespecific = true;
}
}
sector
@ -961,7 +1059,19 @@ universalfields
{
type = 3;
default = false;
}
}
lm_sampledist_floor
{
type = 0;
default = 0;
}
lm_sampledist_ceiling
{
type = 0;
default = 0;
}
}
}
@ -1103,6 +1213,13 @@ udmfmaplumpnames
nodebuild = false;
scriptbuild = true;
}
LIGHTMAP
{
required = false;
nodebuild = true;
blindcopy = true;
}
}
enums

View file

@ -971,6 +971,42 @@ zdoom
fixedsize = true;
sprite = "internal:action";
9600
{
title = "Sector Floor Damaged";
class = "SecActDamageFloor";
}
9601
{
title = "Sector Ceiling Damaged";
class = "SecActDamageCeiling";
}
9602
{
title = "Sector Floor Died";
class = "SecActDeathFloor";
}
9603
{
title = "Sector Ceiling Died";
class = "SecActDeathCeiling";
}
9604
{
title = "3D Sector Damaged";
class = "SecActDamage3D";
}
9605
{
title = "3D Sector Died";
class = "SecActDeath3D";
}
9082
{
title = "Silent Sector";

View file

@ -1,170 +1,185 @@
// ***********************************************************
// * *
// * Text map format *
// * *
// ***********************************************************
// Contains the differences to the GZDoom UDMF settings
mapformat_udmf
{
// Disables support for plane equation slopes
planeequationsupport = false;
}
// New things available in all games
zandronum
things
{
//dynamic lights
include("GZDoom_things.cfg", "gzdoom_lights")
// Team player starts
players
zandronum
{
color = 10; // Light Green
arrow = 1;
title = "Player Starts";
width = 16;
sort = 1;
height = 56;
hangs = 0;
blocking = 2;
error = 2;
5080
//dynamic lights
include("GZDoom_things.cfg", "gzdoom_lights")
// Team player starts
players
{
title = "Player Blue start (team start)";
sprite = "PLAYE2E8";
color = 10; // Light Green
arrow = 1;
title = "Player Starts";
width = 16;
sort = 1;
height = 56;
hangs = 0;
blocking = 2;
error = 2;
5080
{
title = "Player Blue start (team start)";
sprite = "PLAYE2E8";
}
5081
{
title = "Player Red start (team start)";
sprite = "PLAYF2F8";
}
5082
{
title = "Player Temporary start (team start)";
sprite = "PLAYF1";
}
}
5081
flags
{
title = "Player Red start (team start)";
sprite = "PLAYF2F8";
}
5082
{
title = "Player Temporary start (team start)";
sprite = "PLAYF1";
color = 13; // Light Magenta
arrow = 0;
title = "Flags";
width = 20;
sort = 1;
height = 20;
hangs = 0;
blocking = 0;
5130
{
title = "Blue flag";
sprite = "internal:ZandFlagBlue";
}
5131
{
title = "Red flag";
sprite = "internal:ZandFlagRed";
}
5132
{
title = "White flag";
sprite = "internal:ZandFlagWhite";
}
5133
{
title = "Green flag";
sprite = "internal:ZandFlagGreen";
}
5134
{
title = "Gold flag";
sprite = "internal:ZandFlagGold";
}
}
}
flags
// New things available in Doom, Heretic, Hexen and Strife but not Chex Quest
doomheretichexenstrife
{
color = 13; // Light Magenta
arrow = 0;
title = "Flags";
width = 20;
sort = 1;
height = 20;
hangs = 0;
blocking = 0;
5130
flags
{
title = "Blue flag";
sprite = "internal:ZandFlagBlue";
}
5131
{
title = "Red flag";
sprite = "internal:ZandFlagRed";
}
5132
{
title = "White flag";
sprite = "internal:ZandFlagWhite";
}
5133
{
title = "Green flag";
sprite = "internal:ZandFlagGreen";
}
5134
{
title = "Gold flag";
sprite = "internal:ZandFlagGold";
color = 13; // Light Magenta
arrow = 0;
title = "Flags";
width = 20;
sort = 1;
height = 20;
hangs = 0;
blocking = 0;
5025
{
title = "Red skull";
sprite = "RSKUB0";
}
5026
{
title = "Blue skull";
sprite = "BSKUB0";
}
}
}
}
// New things available in Doom, Heretic, Hexen and Strife but not Chex Quest
doomheretichexenstrife
{
flags
// New things available in Doom, Heretic and Hexen; but not in Chex or Strife
doomheretichexen
{
color = 13; // Light Magenta
arrow = 0;
title = "Flags";
width = 20;
sort = 1;
height = 20;
hangs = 0;
blocking = 0;
5025
// Zandronum runes
runes
{
title = "Red skull";
sprite = "RSKUB0";
}
5026
{
title = "Blue skull";
sprite = "BSKUB0";
}
}
}
// New things available in Doom, Heretic and Hexen; but not in Chex or Strife
doomheretichexen
{
// Zandronum runes
runes
{
color = 17; // Light Orange
arrow = 0;
title = "Runes";
width = 20;
sort = 1;
height = 45;
hangs = 0;
blocking = 0;
5100
{
title = "Strength";
sprite = "internal:ZandRuneStrength";
}
5101
{
title = "Rage";
sprite = "internal:ZandRuneRage";
}
5102
{
title = "Drain";
sprite = "internal:ZandRuneDrain";
}
5103
{
title = "Spread";
sprite = "internal:ZandRuneSpread";
}
5104
{
title = "Resistance";
sprite = "internal:ZandRuneResistance";
}
5105
{
title = "Regeneration";
sprite = "internal:ZandRuneRegeneration";
}
5106
{
title = "Prosperity";
sprite = "internal:ZandRuneProsperity";
}
5107
{
title = "Reflection";
sprite = "internal:ZandRuneReflection";
}
5108
{
title = "High Jumper";
sprite = "internal:ZandRuneHighJump";
}
5109
{
title = "Haste";
sprite = "internal:ZandRuneHaste";
color = 17; // Light Orange
arrow = 0;
title = "Runes";
width = 20;
sort = 1;
height = 45;
hangs = 0;
blocking = 0;
5100
{
title = "Strength";
sprite = "internal:ZandRuneStrength";
}
5101
{
title = "Rage";
sprite = "internal:ZandRuneRage";
}
5102
{
title = "Drain";
sprite = "internal:ZandRuneDrain";
}
5103
{
title = "Spread";
sprite = "internal:ZandRuneSpread";
}
5104
{
title = "Resistance";
sprite = "internal:ZandRuneResistance";
}
5105
{
title = "Regeneration";
sprite = "internal:ZandRuneRegeneration";
}
5106
{
title = "Prosperity";
sprite = "internal:ZandRuneProsperity";
}
5107
{
title = "Reflection";
sprite = "internal:ZandRuneReflection";
}
5108
{
title = "High Jumper";
sprite = "internal:ZandRuneHighJump";
}
5109
{
title = "Haste";
sprite = "internal:ZandRuneHaste";
}
}
}
}

View file

@ -5,18 +5,18 @@
doom
{
include("Zandronum_common.cfg", "zandronum")
include("Zandronum_common.cfg", "doomheretichexenstrife")
include("Zandronum_common.cfg", "doomheretichexen")
include("Zandronum_common.cfg", "things.zandronum")
include("Zandronum_common.cfg", "things.doomheretichexenstrife")
include("Zandronum_common.cfg", "things.doomheretichexen")
include("Skulltag_things.cfg", "doomheretichexen")
include("Skulltag_things.cfg", "doom")
}
heretic
{
include("Zandronum_common.cfg", "zandronum")
include("Zandronum_common.cfg", "doomheretichexenstrife")
include("Zandronum_common.cfg", "doomheretichexen")
include("Zandronum_common.cfg", "things.zandronum")
include("Zandronum_common.cfg", "things.doomheretichexenstrife")
include("Zandronum_common.cfg", "things.doomheretichexen")
include("Skulltag_things.cfg", "doomheretichexen")
include("Skulltag_things.cfg", "raven")
include("Skulltag_things.cfg", "heretic")
@ -24,9 +24,9 @@ heretic
hexen
{
include("Zandronum_common.cfg", "zandronum")
include("Zandronum_common.cfg", "doomheretichexenstrife")
include("Zandronum_common.cfg", "doomheretichexen")
include("Zandronum_common.cfg", "things.zandronum")
include("Zandronum_common.cfg", "things.doomheretichexenstrife")
include("Zandronum_common.cfg", "things.doomheretichexen")
include("Skulltag_things.cfg", "doomheretichexen")
include("Skulltag_things.cfg", "raven")
include("Skulltag_things.cfg", "hexen")
@ -34,13 +34,13 @@ hexen
strife
{
include("Zandronum_common.cfg", "zandronum")
include("Zandronum_common.cfg", "doomheretichexenstrife")
include("Zandronum_common.cfg", "things.zandronum")
include("Zandronum_common.cfg", "things.doomheretichexenstrife")
include("Skulltag_things.cfg", "strife")
}
default
{
include("Zandronum_common.cfg", "zandronum")
include("Zandronum_common.cfg", "things.zandronum")
include("Skulltag_things.cfg", "skulltag")
}

View file

@ -12,7 +12,7 @@ game = "MBF21: Doom 2 (Doom format)";
engine = "mbf21";
// Should this configuration be initially available?
enabledbydefault = false;
enabledbydefault = true;
// *******************************************************
// * *

View file

@ -25,8 +25,13 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_linedefs.cfg");
// Zandronum doesn't support sectors with multiple tags. Defaults to false, but is set to true
// by the GZDoom config, so we need to set it to false again
sectormultitag = false;
// Enables support for long (> 8 chars) texture names
// WARNING: this should only be enabled for UDMF game configurations!
// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!

View file

@ -25,8 +25,13 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_linedefs.cfg");
// Zandronum doesn't support sectors with multiple tags. Defaults to false, but is set to true
// by the GZDoom config, so we need to set it to false again
sectormultitag = false;
// Enables support for long (> 8 chars) texture names
// WARNING: this should only be enabled for UDMF game configurations!
// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!

View file

@ -25,8 +25,13 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_linedefs.cfg");
// Zandronum doesn't support sectors with multiple tags. Defaults to false, but is set to true
// by the GZDoom config, so we need to set it to false again
sectormultitag = false;
// Enables support for long (> 8 chars) texture names
// WARNING: this should only be enabled for UDMF game configurations!
// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!

View file

@ -25,8 +25,13 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_common.cfg", "mapformat_udmf");
include("Includes\\Zandronum_linedefs.cfg");
// Zandronum doesn't support sectors with multiple tags. Defaults to false, but is set to true
// by the GZDoom config, so we need to set it to false again
sectormultitag = false;
// Enables support for long (> 8 chars) texture names
// WARNING: this should only be enabled for UDMF game configurations!
// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
// Inspired by ribbiks's DBX Lua script: https://github.com/ribbiks/doom_lua/
`#version 4`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Create Line Portal`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Create PolyObject`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
// Inspired by ribbiks's DBX Lua script: https://github.com/ribbiks/doom_lua/
`#version 4`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Jitter Vertices`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Make Door`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Triangulate Sectors`;
`#description Triangulates the selected or highlighted sectors into new sectors. Note that the triangulation will not "be beautiful", and that the sectors with islands may cause problems.`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Draw Voodoo Doll Closet`;
@ -147,7 +149,7 @@ if(UDB.ScriptOptions.inactive)
if(UDB.ScriptOptions.looping)
{
// Create the teleport destination line
p.setAngle(90 * ScriptOptions.direction).moveTo(basepos)
p.setAngle(90 * UDB.ScriptOptions.direction).moveTo(basepos)
.moveForward(32).turnRight().moveForward(8).drawVertex()
.moveForward(closetwidth - 16).drawVertex();

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Logic assertions`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Show Map Squareness`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../../udbscript.d.ts" />
`#version 4`;
`#name Calculate sector area`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Apply textures to selected surfaces`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Delete Sector Tag`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Flip Triangular Sectors`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Imps to Arch-Viles`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Randomize Selection Order`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Randomize Texture Offsets`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Reorder Things Indices`;

View file

@ -1,3 +1,5 @@
/// <reference path="../../udbscript.d.ts" />
`#version 4`;
`#name Select Connected Linedefs`;

1735
Build/UDBScript/udbscript.d.ts vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,5 @@
URL http://devbuilds.drdteam.org/ultimatedoombuilder/
FileName Builder.exe
UpdateName UltimateDoomBuilder-r[REVNUM]-x86.7z
InstallerName UltimateDoomBuilder-Setup-R[REVNUM]-x86.exe
UpdaterName UDB_Updater-x86.7z

View file

@ -5,5 +5,6 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UDMF/@EntryIndexedValue">UDMF</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=Constants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=BuilderModes_002FProperties_002FResources/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Builder_002FProperties_002FResources/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>

790
Setup/CodeDependencies.iss Normal file
View file

@ -0,0 +1,790 @@
; -- CodeDependencies.iss --
;
; This script shows how to download and install any dependency such as .NET,
; Visual C++ or SQL Server during your application's installation process.
;
; contribute: https://github.com/DomGries/InnoDependencyInstaller
; -----------
; SHARED CODE
; -----------
[Code]
// types and variables
type
TDependency_Entry = record
Filename: String;
Parameters: String;
Title: String;
URL: String;
Checksum: String;
ForceSuccess: Boolean;
RestartAfter: Boolean;
end;
var
Dependency_Memo: String;
Dependency_List: array of TDependency_Entry;
Dependency_NeedRestart, Dependency_ForceX86: Boolean;
Dependency_DownloadPage: TDownloadWizardPage;
procedure Dependency_Add(const Filename, Parameters, Title, URL, Checksum: String; const ForceSuccess, RestartAfter: Boolean);
var
Dependency: TDependency_Entry;
DependencyCount: Integer;
begin
Dependency_Memo := Dependency_Memo + #13#10 + '%1' + Title;
Dependency.Filename := Filename;
Dependency.Parameters := Parameters;
Dependency.Title := Title;
if FileExists(ExpandConstant('{tmp}{\}') + Filename) then begin
Dependency.URL := '';
end else begin
Dependency.URL := URL;
end;
Dependency.Checksum := Checksum;
Dependency.ForceSuccess := ForceSuccess;
Dependency.RestartAfter := RestartAfter;
DependencyCount := GetArrayLength(Dependency_List);
SetArrayLength(Dependency_List, DependencyCount + 1);
Dependency_List[DependencyCount] := Dependency;
end;
<event('InitializeWizard')>
procedure Dependency_Internal1;
begin
Dependency_DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), nil);
end;
<event('PrepareToInstall')>
function Dependency_Internal2(var NeedsRestart: Boolean): String;
var
DependencyCount, DependencyIndex, ResultCode: Integer;
Retry: Boolean;
TempValue: String;
begin
DependencyCount := GetArrayLength(Dependency_List);
if DependencyCount > 0 then begin
Dependency_DownloadPage.Show;
for DependencyIndex := 0 to DependencyCount - 1 do begin
if Dependency_List[DependencyIndex].URL <> '' then begin
Dependency_DownloadPage.Clear;
Dependency_DownloadPage.Add(Dependency_List[DependencyIndex].URL, Dependency_List[DependencyIndex].Filename, Dependency_List[DependencyIndex].Checksum);
Retry := True;
while Retry do begin
Retry := False;
try
Dependency_DownloadPage.Download;
except
if Dependency_DownloadPage.AbortedByUser then begin
Result := Dependency_List[DependencyIndex].Title;
DependencyIndex := DependencyCount;
end else begin
case SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbError, MB_ABORTRETRYIGNORE, IDIGNORE) of
IDABORT: begin
Result := Dependency_List[DependencyIndex].Title;
DependencyIndex := DependencyCount;
end;
IDRETRY: begin
Retry := True;
end;
end;
end;
end;
end;
end;
end;
if Result = '' then begin
for DependencyIndex := 0 to DependencyCount - 1 do begin
Dependency_DownloadPage.SetText(Dependency_List[DependencyIndex].Title, '');
Dependency_DownloadPage.SetProgress(DependencyIndex + 1, DependencyCount + 1);
while True do begin
ResultCode := 0;
if ShellExec('', ExpandConstant('{tmp}{\}') + Dependency_List[DependencyIndex].Filename, Dependency_List[DependencyIndex].Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then begin
if Dependency_List[DependencyIndex].RestartAfter then begin
if DependencyIndex = DependencyCount - 1 then begin
Dependency_NeedRestart := True;
end else begin
NeedsRestart := True;
Result := Dependency_List[DependencyIndex].Title;
end;
break;
end else if (ResultCode = 0) or Dependency_List[DependencyIndex].ForceSuccess then begin // ERROR_SUCCESS (0)
break;
end else if ResultCode = 1641 then begin // ERROR_SUCCESS_REBOOT_INITIATED (1641)
NeedsRestart := True;
Result := Dependency_List[DependencyIndex].Title;
break;
end else if ResultCode = 3010 then begin // ERROR_SUCCESS_REBOOT_REQUIRED (3010)
Dependency_NeedRestart := True;
break;
end;
end;
case SuppressibleMsgBox(FmtMessage(SetupMessage(msgErrorFunctionFailed), [Dependency_List[DependencyIndex].Title, IntToStr(ResultCode)]), mbError, MB_ABORTRETRYIGNORE, IDIGNORE) of
IDABORT: begin
Result := Dependency_List[DependencyIndex].Title;
break;
end;
IDIGNORE: begin
break;
end;
end;
end;
if Result <> '' then begin
break;
end;
end;
if NeedsRestart then begin
TempValue := '"' + ExpandConstant('{srcexe}') + '" /restart=1 /LANG="' + ExpandConstant('{language}') + '" /DIR="' + WizardDirValue + '" /GROUP="' + WizardGroupValue + '" /TYPE="' + WizardSetupType(False) + '" /COMPONENTS="' + WizardSelectedComponents(False) + '" /TASKS="' + WizardSelectedTasks(False) + '"';
if WizardNoIcons then begin
TempValue := TempValue + ' /NOICONS';
end;
RegWriteStringValue(HKA, 'SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce', '{#SetupSetting("AppName")}', TempValue);
end;
end;
Dependency_DownloadPage.Hide;
end;
end;
<event('UpdateReadyMemo')>
function Dependency_Internal3(const Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
begin
Result := '';
if MemoUserInfoInfo <> '' then begin
Result := Result + MemoUserInfoInfo + Newline + NewLine;
end;
if MemoDirInfo <> '' then begin
Result := Result + MemoDirInfo + Newline + NewLine;
end;
if MemoTypeInfo <> '' then begin
Result := Result + MemoTypeInfo + Newline + NewLine;
end;
if MemoComponentsInfo <> '' then begin
Result := Result + MemoComponentsInfo + Newline + NewLine;
end;
if MemoGroupInfo <> '' then begin
Result := Result + MemoGroupInfo + Newline + NewLine;
end;
if MemoTasksInfo <> '' then begin
Result := Result + MemoTasksInfo;
end;
if Dependency_Memo <> '' then begin
if MemoTasksInfo = '' then begin
Result := Result + SetupMessage(msgReadyMemoTasks);
end;
Result := Result + FmtMessage(Dependency_Memo, [Space]);
end;
end;
<event('NeedRestart')>
function Dependency_Internal4: Boolean;
begin
Result := Dependency_NeedRestart;
end;
function Dependency_IsX64: Boolean;
begin
Result := not Dependency_ForceX86 and Is64BitInstallMode;
end;
function Dependency_String(const x86, x64: String): String;
begin
if Dependency_IsX64 then begin
Result := x64;
end else begin
Result := x86;
end;
end;
function Dependency_ArchSuffix: String;
begin
Result := Dependency_String('', '_x64');
end;
function Dependency_ArchTitle: String;
begin
Result := Dependency_String(' (x86)', ' (x64)');
end;
function Dependency_IsNetCoreInstalled(const Version: String): Boolean;
var
ResultCode: Integer;
begin
// source code: https://github.com/dotnet/deployment-tools/tree/master/src/clickonce/native/projects/NetCoreCheck
if not FileExists(ExpandConstant('{tmp}{\}') + 'netcorecheck' + Dependency_ArchSuffix + '.exe') then begin
ExtractTemporaryFile('netcorecheck' + Dependency_ArchSuffix + '.exe');
end;
Result := ShellExec('', ExpandConstant('{tmp}{\}') + 'netcorecheck' + Dependency_ArchSuffix + '.exe', Version, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and (ResultCode = 0);
end;
procedure Dependency_AddDotNet35;
begin
// https://dotnet.microsoft.com/download/dotnet-framework/net35-sp1
if not IsDotNetInstalled(net35, 1) then begin
Dependency_Add('dotnetfx35.exe',
'/lang:enu /passive /norestart',
'.NET Framework 3.5 Service Pack 1',
'https://download.microsoft.com/download/2/0/E/20E90413-712F-438C-988E-FDAA79A8AC3D/dotnetfx35.exe',
'', False, False);
end;
end;
procedure Dependency_AddDotNet40;
begin
// https://dotnet.microsoft.com/download/dotnet-framework/net40
if not IsDotNetInstalled(net4full, 0) then begin
Dependency_Add('dotNetFx40_Full_setup.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Framework 4.0',
'https://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exe',
'', False, False);
end;
end;
procedure Dependency_AddDotNet45;
begin
// https://dotnet.microsoft.com/download/dotnet-framework/net452
if not IsDotNetInstalled(net452, 0) then begin
Dependency_Add('dotnetfx45.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Framework 4.5.2',
'https://go.microsoft.com/fwlink/?LinkId=397707',
'', False, False);
end;
end;
procedure Dependency_AddDotNet46;
begin
// https://dotnet.microsoft.com/download/dotnet-framework/net462
if not IsDotNetInstalled(net462, 0) then begin
Dependency_Add('dotnetfx46.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Framework 4.6.2',
'https://go.microsoft.com/fwlink/?linkid=780596',
'', False, False);
end;
end;
procedure Dependency_AddDotNet47;
begin
// https://dotnet.microsoft.com/download/dotnet-framework/net472
if not IsDotNetInstalled(net472, 0) then begin
Dependency_Add('dotnetfx47.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Framework 4.7.2',
'https://go.microsoft.com/fwlink/?LinkId=863262',
'', False, False);
end;
end;
procedure Dependency_AddDotNet48;
begin
// https://dotnet.microsoft.com/download/dotnet-framework/net48
if not IsDotNetInstalled(net48, 0) then begin
Dependency_Add('dotnetfx48.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Framework 4.8',
'https://go.microsoft.com/fwlink/?LinkId=2085155',
'', False, False);
end;
end;
procedure Dependency_AddNetCore31;
begin
// https://dotnet.microsoft.com/download/dotnet-core/3.1
if not Dependency_IsNetCoreInstalled('Microsoft.NETCore.App 3.1.22') then begin
Dependency_Add('netcore31' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Core Runtime 3.1.22' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/c2437aed-8cc4-41d0-a239-d6c7cf7bddae/062c37e8b06df740301c0bca1b0b7b9a/dotnet-runtime-3.1.22-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/4e95705e-1bb6-4764-b899-1b97eb70ea1d/dd311e073bd3e25b2efe2dcf02727e81/dotnet-runtime-3.1.22-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddNetCore31Asp;
begin
// https://dotnet.microsoft.com/download/dotnet-core/3.1
if not Dependency_IsNetCoreInstalled('Microsoft.AspNetCore.App 3.1.22') then begin
Dependency_Add('netcore31asp' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'ASP.NET Core Runtime 3.1.22' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/0a1a2ee5-b8ed-4f0d-a4af-a7bce9a9ac2b/d452039b49d79e8897f272c3ab34b875/aspnetcore-runtime-3.1.22-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/80e52143-31e8-450e-aa94-b3f8484aaba9/4b69e5c77d50e7b367960a0079c90a99/aspnetcore-runtime-3.1.22-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddNetCore31Desktop;
begin
// https://dotnet.microsoft.com/download/dotnet-core/3.1
if not Dependency_IsNetCoreInstalled('Microsoft.WindowsDesktop.App 3.1.22') then begin
Dependency_Add('netcore31desktop' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Desktop Runtime 3.1.22' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/e4fcd574-4487-4b4b-8ca8-c23177c6f59f/c6d67a04956169dc21895cdcb42bf344/windowsdesktop-runtime-3.1.22-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/1c14e24b-7f31-42dc-ba3c-83295a2d6f7e/41b93591162dfe556cc160ae44fbe75e/windowsdesktop-runtime-3.1.22-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDotNet50;
begin
// https://dotnet.microsoft.com/download/dotnet/5.0
if not Dependency_IsNetCoreInstalled('Microsoft.NETCore.App 5.0.13') then begin
Dependency_Add('dotnet50' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Runtime 5.0.13' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/4a79fcd5-d61b-4606-8496-68071c8099c6/2bf770ca40521e8c4563072592eadd06/dotnet-runtime-5.0.13-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/fccf43d2-3e62-4ede-b5a5-592a7ccded7b/6339f1fdfe3317df5b09adf65f0261ab/dotnet-runtime-5.0.13-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDotNet50Asp;
begin
// https://dotnet.microsoft.com/download/dotnet/5.0
if not Dependency_IsNetCoreInstalled('Microsoft.AspNetCore.App 5.0.13') then begin
Dependency_Add('dotnet50asp' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'ASP.NET Core Runtime 5.0.13' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/340f9482-fc43-4ef7-b434-e2ed57f55cb3/c641b805cef3823769409a6dbac5746b/aspnetcore-runtime-5.0.13-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/aac560f3-eac8-437e-aebd-9830119deb10/6a3880161cf527e4ec71f67efe4d91ad/aspnetcore-runtime-5.0.13-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDotNet50Desktop;
begin
// https://dotnet.microsoft.com/download/dotnet/5.0
if not Dependency_IsNetCoreInstalled('Microsoft.WindowsDesktop.App 5.0.13') then begin
Dependency_Add('dotnet50desktop' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Desktop Runtime 5.0.13' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/c8125c6b-d399-4be3-b201-8f1394fc3b25/724758f754fc7b67daba74db8d6d91d9/windowsdesktop-runtime-5.0.13-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/2bfb80f2-b8f2-44b0-90c1-d3c8c1c8eac8/409dd3d3367feeeda048f4ff34b32e82/windowsdesktop-runtime-5.0.13-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDotNet60;
begin
// https://dotnet.microsoft.com/download/dotnet/6.0
if not Dependency_IsNetCoreInstalled('Microsoft.NETCore.App 6.0.2') then begin
Dependency_Add('dotnet60' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Runtime 6.0.2' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/2c266f64-4c86-4209-8113-0146a9c93bef/f771275c8cb0df884dcfc290569fba3a/dotnet-runtime-6.0.2-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/0b3e8ad9-7914-4489-8d02-58b551c2efea/fdc3f3a171bf0b7bb90c01f5faa59fc4/dotnet-runtime-6.0.2-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDotNet60Asp;
begin
// https://dotnet.microsoft.com/download/dotnet/6.0
if not Dependency_IsNetCoreInstalled('Microsoft.AspNetCore.App 6.0.2') then begin
Dependency_Add('dotnet60asp' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'ASP.NET Core Runtime 6.0.2' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/ad7d20a7-debf-4399-b59b-04419ae7adfe/73918e15d0bde4431546d8f659ed7381/aspnetcore-runtime-6.0.2-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/ef70aabf-e945-4a82-8303-7675e84a183c/a1ef3d32b8572842684974747eee034b/aspnetcore-runtime-6.0.2-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDotNet60Desktop;
begin
// https://dotnet.microsoft.com/download/dotnet/6.0
if not Dependency_IsNetCoreInstalled('Microsoft.WindowsDesktop.App 6.0.2') then begin
Dependency_Add('dotnet60desktop' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Desktop Runtime 6.0.2' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/f5f7ed62-0973-400b-9772-4cf0eef96801/87959c77e1fceeafc40c867f9c238bbc/windowsdesktop-runtime-6.0.2-win-x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/7fbe3ce3-4082-4995-93de-674038ac919b/56d3fa94d78dc3f39fc70d73ef174c93/windowsdesktop-runtime-6.0.2-win-x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddVC2005;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=26347
if not IsMsiProductInstalled(Dependency_String('{86C9D5AA-F00C-4921-B3F2-C60AF92E2844}', '{A8D19029-8E5C-4E22-8011-48070F9E796E}'), PackVersionComponents(8, 0, 61000, 0)) then begin
Dependency_Add('vcredist2005' + Dependency_ArchSuffix + '.exe',
'/q',
'Visual C++ 2005 Service Pack 1 Redistributable' + Dependency_ArchTitle,
Dependency_String('https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE', 'https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.EXE'),
'', False, False);
end;
end;
procedure Dependency_AddVC2008;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=26368
if not IsMsiProductInstalled(Dependency_String('{DE2C306F-A067-38EF-B86C-03DE4B0312F9}', '{FDA45DDF-8E17-336F-A3ED-356B7B7C688A}'), PackVersionComponents(9, 0, 30729, 6161)) then begin
Dependency_Add('vcredist2008' + Dependency_ArchSuffix + '.exe',
'/q',
'Visual C++ 2008 Service Pack 1 Redistributable' + Dependency_ArchTitle,
Dependency_String('https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe', 'https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddVC2010;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=26999
if not IsMsiProductInstalled(Dependency_String('{1F4F1D2A-D9DA-32CF-9909-48485DA06DD5}', '{5B75F761-BAC8-33BC-A381-464DDDD813A3}'), PackVersionComponents(10, 0, 40219, 0)) then begin
Dependency_Add('vcredist2010' + Dependency_ArchSuffix + '.exe',
'/passive /norestart',
'Visual C++ 2010 Service Pack 1 Redistributable' + Dependency_ArchTitle,
Dependency_String('https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe', 'https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddVC2012;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=30679
if not IsMsiProductInstalled(Dependency_String('{4121ED58-4BD9-3E7B-A8B5-9F8BAAE045B7}', '{EFA6AFA1-738E-3E00-8101-FD03B86B29D1}'), PackVersionComponents(11, 0, 61030, 0)) then begin
Dependency_Add('vcredist2012' + Dependency_ArchSuffix + '.exe',
'/passive /norestart',
'Visual C++ 2012 Update 4 Redistributable' + Dependency_ArchTitle,
Dependency_String('https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe', 'https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddVC2013;
begin
// https://support.microsoft.com/en-us/help/4032938
if not IsMsiProductInstalled(Dependency_String('{B59F5BF1-67C8-3802-8E59-2CE551A39FC5}', '{20400CF0-DE7C-327E-9AE4-F0F38D9085F8}'), PackVersionComponents(12, 0, 40664, 0)) then begin
Dependency_Add('vcredist2013' + Dependency_ArchSuffix + '.exe',
'/passive /norestart',
'Visual C++ 2013 Update 5 Redistributable' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/10912113/5da66ddebb0ad32ebd4b922fd82e8e25/vcredist_x86.exe', 'https://download.visualstudio.microsoft.com/download/pr/10912041/cee5d6bca2ddbcd039da727bf4acb48a/vcredist_x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddVC2015To2022;
begin
// https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
if not IsMsiProductInstalled(Dependency_String('{65E5BD06-6392-3027-8C26-853107D3CF1A}', '{36F68A90-239C-34DF-B58C-64B30153CE35}'), PackVersionComponents(14, 30, 30704, 0)) then begin
Dependency_Add('vcredist2022' + Dependency_ArchSuffix + '.exe',
'/passive /norestart',
'Visual C++ 2015-2022 Redistributable' + Dependency_ArchTitle,
Dependency_String('https://aka.ms/vs/17/release/vc_redist.x86.exe', 'https://aka.ms/vs/17/release/vc_redist.x64.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDirectX;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=35
Dependency_Add('dxwebsetup.exe',
'/q',
'DirectX Runtime',
'https://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe',
'', True, False);
end;
procedure Dependency_AddSql2008Express;
var
Version: String;
PackedVersion: Int64;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=30438
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQLServer\CurrentVersion', 'CurrentVersion', Version) or not StrToVersion(Version, PackedVersion) or (ComparePackedVersion(PackedVersion, PackVersionComponents(10, 50, 4000, 0)) < 0) then begin
Dependency_Add('sql2008express' + Dependency_ArchSuffix + '.exe',
'/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER',
'SQL Server 2008 R2 Service Pack 2 Express',
Dependency_String('https://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPR32_x86_ENU.exe', 'https://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPR_x64_ENU.exe'),
'', False, False);
end;
end;
procedure Dependency_AddSql2012Express;
var
Version: String;
PackedVersion: Int64;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=56042
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer\CurrentVersion', 'CurrentVersion', Version) or not StrToVersion(Version, PackedVersion) or (ComparePackedVersion(PackedVersion, PackVersionComponents(11, 0, 7001, 0)) < 0) then begin
Dependency_Add('sql2012express' + Dependency_ArchSuffix + '.exe',
'/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER',
'SQL Server 2012 Service Pack 4 Express',
Dependency_String('https://download.microsoft.com/download/B/D/E/BDE8FAD6-33E5-44F6-B714-348F73E602B6/SQLEXPR32_x86_ENU.exe', 'https://download.microsoft.com/download/B/D/E/BDE8FAD6-33E5-44F6-B714-348F73E602B6/SQLEXPR_x64_ENU.exe'),
'', False, False);
end;
end;
procedure Dependency_AddSql2014Express;
var
Version: String;
PackedVersion: Int64;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=57473
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQLServer\CurrentVersion', 'CurrentVersion', Version) or not StrToVersion(Version, PackedVersion) or (ComparePackedVersion(PackedVersion, PackVersionComponents(12, 0, 6024, 0)) < 0) then begin
Dependency_Add('sql2014express' + Dependency_ArchSuffix + '.exe',
'/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER',
'SQL Server 2014 Service Pack 3 Express',
Dependency_String('https://download.microsoft.com/download/3/9/F/39F968FA-DEBB-4960-8F9E-0E7BB3035959/SQLEXPR32_x86_ENU.exe', 'https://download.microsoft.com/download/3/9/F/39F968FA-DEBB-4960-8F9E-0E7BB3035959/SQLEXPR_x64_ENU.exe'),
'', False, False);
end;
end;
procedure Dependency_AddSql2016Express;
var
Version: String;
PackedVersion: Int64;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=56840
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQLServer\CurrentVersion', 'CurrentVersion', Version) or not StrToVersion(Version, PackedVersion) or (ComparePackedVersion(PackedVersion, PackVersionComponents(13, 0, 5026, 0)) < 0) then begin
Dependency_Add('sql2016express' + Dependency_ArchSuffix + '.exe',
'/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER',
'SQL Server 2016 Service Pack 2 Express',
'https://download.microsoft.com/download/3/7/6/3767D272-76A1-4F31-8849-260BD37924E4/SQLServer2016-SSEI-Expr.exe',
'', False, False);
end;
end;
procedure Dependency_AddSql2017Express;
var
Version: String;
PackedVersion: Int64;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=55994
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQLServer\CurrentVersion', 'CurrentVersion', Version) or not StrToVersion(Version, PackedVersion) or (ComparePackedVersion(PackedVersion, PackVersionComponents(14, 0, 0, 0)) < 0) then begin
Dependency_Add('sql2017express' + Dependency_ArchSuffix + '.exe',
'/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER',
'SQL Server 2017 Express',
'https://download.microsoft.com/download/5/E/9/5E9B18CC-8FD5-467E-B5BF-BADE39C51F73/SQLServer2017-SSEI-Expr.exe',
'', False, False);
end;
end;
procedure Dependency_AddSql2019Express;
var
Version: String;
PackedVersion: Int64;
begin
// https://www.microsoft.com/en-us/download/details.aspx?id=101064
if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQLServer\CurrentVersion', 'CurrentVersion', Version) or not StrToVersion(Version, PackedVersion) or (ComparePackedVersion(PackedVersion, PackVersionComponents(15, 0, 0, 0)) < 0) then begin
Dependency_Add('sql2019express' + Dependency_ArchSuffix + '.exe',
'/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=INSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER',
'SQL Server 2019 Express',
'https://download.microsoft.com/download/7/f/8/7f8a9c43-8c8a-4f7c-9f92-83c18d96b681/SQL2019-SSEI-Expr.exe',
'', False, False);
end;
end;
[Setup]
; -------------
; EXAMPLE SETUP
; -------------
#ifndef Dependency_NoExampleSetup
; comment out dependency defines to disable installing them
#define UseDotNet35
#define UseDotNet40
#define UseDotNet45
#define UseDotNet46
#define UseDotNet47
#define UseDotNet48
; requires netcorecheck.exe and netcorecheck_x64.exe (see download link below)
#define UseNetCoreCheck
#ifdef UseNetCoreCheck
#define UseNetCore31
#define UseNetCore31Asp
#define UseNetCore31Desktop
#define UseDotNet50
#define UseDotNet50Asp
#define UseDotNet50Desktop
#define UseDotNet60
#define UseDotNet60Asp
#define UseDotNet60Desktop
#endif
#define UseVC2005
#define UseVC2008
#define UseVC2010
#define UseVC2012
#define UseVC2013
#define UseVC2015To2022
; requires dxwebsetup.exe (see download link below)
;#define UseDirectX
#define UseSql2008Express
#define UseSql2012Express
#define UseSql2014Express
#define UseSql2016Express
#define UseSql2017Express
#define UseSql2019Express
#define MyAppSetupName 'MyProgram'
#define MyAppVersion '1.0'
#define MyAppPublisher 'Inno Setup'
#define MyAppCopyright 'Copyright © Inno Setup'
#define MyAppURL 'https://jrsoftware.org/isinfo.php'
AppName={#MyAppSetupName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppSetupName} {#MyAppVersion}
AppCopyright={#MyAppCopyright}
VersionInfoVersion={#MyAppVersion}
VersionInfoCompany={#MyAppPublisher}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}
DefaultGroupName={#MyAppSetupName}
DefaultDirName={autopf}\{#MyAppSetupName}
UninstallDisplayIcon={app}\MyProgram.exe
SourceDir=src
OutputDir={#SourcePath}\bin
AllowNoIcons=yes
PrivilegesRequired=admin
; remove next line if you only deploy 32-bit binaries and dependencies
ArchitecturesInstallIn64BitMode=x64
[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: nl; MessagesFile: "compiler:Languages\Dutch.isl"
Name: de; MessagesFile: "compiler:Languages\German.isl"
[Files]
#ifdef UseNetCoreCheck
; download netcorecheck.exe: https://go.microsoft.com/fwlink/?linkid=2135256
; download netcorecheck_x64.exe: https://go.microsoft.com/fwlink/?linkid=2135504
Source: "netcorecheck.exe"; Flags: dontcopy noencryption
Source: "netcorecheck_x64.exe"; Flags: dontcopy noencryption
#endif
#ifdef UseDirectX
Source: "dxwebsetup.exe"; Flags: dontcopy noencryption
#endif
Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: Dependency_IsX64; Flags: ignoreversion
Source: "MyProg.exe"; DestDir: "{app}"; Check: not Dependency_IsX64; Flags: ignoreversion
[Icons]
Name: "{group}\{#MyAppSetupName}"; Filename: "{app}\MyProg.exe"
Name: "{group}\{cm:UninstallProgram,{#MyAppSetupName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppSetupName}"; Filename: "{app}\MyProg.exe"; Tasks: desktopicon
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"
[Run]
Filename: "{app}\MyProg.exe"; Description: "{cm:LaunchProgram,{#MyAppSetupName}}"; Flags: nowait postinstall skipifsilent
[Code]
function InitializeSetup: Boolean;
begin
#ifdef UseDotNet35
Dependency_AddDotNet35;
#endif
#ifdef UseDotNet40
Dependency_AddDotNet40;
#endif
#ifdef UseDotNet45
Dependency_AddDotNet45;
#endif
#ifdef UseDotNet46
Dependency_AddDotNet46;
#endif
#ifdef UseDotNet47
Dependency_AddDotNet47;
#endif
#ifdef UseDotNet48
Dependency_AddDotNet48;
#endif
#ifdef UseNetCore31
Dependency_AddNetCore31;
#endif
#ifdef UseNetCore31Asp
Dependency_AddNetCore31Asp;
#endif
#ifdef UseNetCore31Desktop
Dependency_AddNetCore31Desktop;
#endif
#ifdef UseDotNet50
Dependency_AddDotNet50;
#endif
#ifdef UseDotNet50Asp
Dependency_AddDotNet50Asp;
#endif
#ifdef UseDotNet50Desktop
Dependency_AddDotNet50Desktop;
#endif
#ifdef UseDotNet60
Dependency_AddDotNet60;
#endif
#ifdef UseDotNet60Asp
Dependency_AddDotNet60Asp;
#endif
#ifdef UseDotNet60Desktop
Dependency_AddDotNet60Desktop;
#endif
#ifdef UseVC2005
Dependency_AddVC2005;
#endif
#ifdef UseVC2008
Dependency_AddVC2008;
#endif
#ifdef UseVC2010
Dependency_AddVC2010;
#endif
#ifdef UseVC2012
Dependency_AddVC2012;
#endif
#ifdef UseVC2013
//Dependency_ForceX86 := True; // force 32-bit install of next dependencies
Dependency_AddVC2013;
//Dependency_ForceX86 := False; // disable forced 32-bit install again
#endif
#ifdef UseVC2015To2022
Dependency_AddVC2015To2022;
#endif
#ifdef UseDirectX
ExtractTemporaryFile('dxwebsetup.exe');
Dependency_AddDirectX;
#endif
#ifdef UseSql2008Express
Dependency_AddSql2008Express;
#endif
#ifdef UseSql2012Express
Dependency_AddSql2012Express;
#endif
#ifdef UseSql2014Express
Dependency_AddSql2014Express;
#endif
#ifdef UseSql2016Express
Dependency_AddSql2016Express;
#endif
#ifdef UseSql2017Express
Dependency_AddSql2017Express;
#endif
#ifdef UseSql2019Express
Dependency_AddSql2019Express;
#endif
Result := True;
end;
#endif

150
Setup/UDBuilder_setup.iss Normal file
View file

@ -0,0 +1,150 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define public Dependency_NoExampleSetup
#include "CodeDependencies.iss"
;#define UDB_arch "x64"
#define UDB_GetVersionString() \
Local[0] = GetVersionNumbersString("..\Build\Builder.exe"), \
Delete(Local[0], 0, RPos(".", Local[0])+1), \
"R" + Local[0]
[Setup]
AppName=Ultimate Doom Builder
AppVersion={#UDB_GetVersionString} ({#UDB_arch})
;AppVerName=Ultimate Doom Builder {#UDB_GetVersionString} ({#UDB_arch})
AppPublisher=ZZYZX
AppPublisherURL=https://forum.zdoom.org/memberlist.php?mode=viewprofile&u=7527
AppSupportURL=https://forum.zdoom.org/viewtopic.php?f=232&t=66745
AppUpdatesURL=https://devbuilds.drdteam.org/ultimatedoombuilder/
DefaultDirName={userpf}\Ultimate Doom Builder
DefaultGroupName=Ultimate Doom Builder
AllowNoIcons=true
LicenseFile=..\LICENSE.txt
OutputDir=..\Release
OutputBaseFilename=Setup
Compression=lzma/ultra64
SolidCompression=true
SourceDir=..\Build
SetupLogging=false
AppMutex=ultimatedoombuilder
PrivilegesRequired=lowest
ShowLanguageDialog=no
LanguageDetectionMethod=none
MinVersion=0,6.1sp1
UninstallDisplayIcon={app}\Updater.exe
WizardImageFile=..\Setup\WizModernImage-IS.bmp
WizardSmallImageFile=..\Setup\WizModernSmallImage-IS.bmp
#if UDB_arch != "x86"
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
#endif
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: Builder.exe; DestDir: {app}; Flags: ignoreversion
Source: Builder.pdb; DestDir: {app}; Flags: ignoreversion
Source: Builder.exe.config; DestDir: {app}; Flags: ignoreversion
Source: UDBuilder.default.cfg; DestDir: {app}; Flags: ignoreversion
Source: Updater.exe; DestDir: {app}; Flags: ignoreversion
Source: Updater.ini; DestDir: {app}; Flags: ignoreversion
Source: Refmanual.chm; DestDir: {app}; Flags: ignoreversion
Source: BuilderNative.dll; DestDir: {app}; Flags: ignoreversion
Source: BuilderNative.pdb; DestDir: {app}; Flags: ignoreversion
Source: SharpCompress.dll; DestDir: {app}; Flags: ignoreversion
Source: ScintillaNET.dll; DestDir: {app}; Flags: ignoreversion
Source: TabControlEX.dll; DestDir: {app}; Flags: ignoreversion
Source: System.Buffers.dll; DestDir: {app}; Flags: ignoreversion
Source: System.Memory.dll; DestDir: {app}; Flags: ignoreversion
Source: System.Numerics.Vectors.dll; DestDir: {app}; Flags: ignoreversion
Source: System.Runtime.CompilerServices.Unsafe.dll; DestDir: {app}; Flags: ignoreversion
Source: LICENSE.txt; DestDir: {app}; Flags: ignoreversion
Source: Compilers\*; DestDir: {app}\Compilers; Flags: ignoreversion recursesubdirs
Source: Configurations\*; DestDir: {app}\Configurations; Flags: ignoreversion recursesubdirs
Source: Scripting\*; DestDir: {app}\Scripting; Flags: ignoreversion recursesubdirs
Source: Snippets\*; DestDir: {app}\Snippets; Flags: ignoreversion recursesubdirs
Source: UDBScript\udbscript.d.ts; DestDir: {app}\UDBScript; Flags: ignoreversion
Source: UDBScript\Libraries\*; DestDir: {app}\UDBScript\Libraries; Flags: ignoreversion recursesubdirs
Source: UDBScript\Scripts\Examples\*; DestDir: {app}\UDBScript\Scripts\Examples; Flags: ignoreversion recursesubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: Plugins\AutomapMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\AutomapMode.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\BuilderModes.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\BuilderModes.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\BuilderEffects.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\BuilderEffects.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\ColorPicker.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\ColorPicker.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\CommentsPanel.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\CommentsPanel.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\NodesViewer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\NodesViewer.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\SoundPropagationMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\SoundPropagationMode.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\StairSectorBuilder.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\StairSectorBuilder.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\TagExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\TagExplorer.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\TagRange.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\TagRange.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\ThreeDFloorMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\ThreeDFloorMode.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\UDBScript.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\UDBScript.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\VisplaneExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\VisplaneExplorer.pdb; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\Loadorder.cfg; DestDir: {app}\Plugins; Flags: ignoreversion onlyifdoesntexist
Source: Plugins\Dependencies\*; DestDir: {app}\Plugins\Dependencies; Flags: ignoreversion
Source: Sprites\*; DestDir: {app}\Sprites; Flags: ignoreversion recursesubdirs
Source: Textures\*; DestDir: {app}\Textures; Flags: ignoreversion
[Icons]
Name: {group}\Ultimate Doom Builder; Filename: {app}\Builder.exe
Name: {group}\{cm:UninstallProgram,Ultimate Doom Builder}; Filename: {uninstallexe}
Name: {autodesktop}\Ultimate Doom Builder; Filename: {app}\Builder.exe; Tasks: desktopicon
[Run]
Filename: {app}\Builder.exe; Description: Run {#SetupSetting("AppName")}; Flags: postinstall skipifsilent
[UninstallDelete]
Name: {app}; Type: filesandordirs
;[InstallDelete]
;Name: {app}\Builder.pdb; Type: files
;Name: {app}\Builder.xml; Type: files
[Registry]
Root: HKCU; Subkey: SOFTWARE\Ultimate Doom Builder\; ValueType: string; ValueName: Location; ValueData: {app}; Flags: uninsdeletevalue
[Messages]
ReadyLabel2a=Continue to begin with the installation, or click Back if you want to review or change any settings.
[Code]
// When the wizard initializes
procedure InitializeWizard();
begin
// .Net and VC Redistributables. Those come from CodeDependencies.iss
Dependency_AddDotNet47;
//Dependency_AddVC2015To2022;
end;
//Remove configs?
procedure DeinitializeUninstall();
begin
if MsgBox('Delete map restore data and program configuration files?', mbConfirmation, MB_YESNO) = IDYES then
begin
// Remove restore data
DelTree(ExpandConstant('{localappdata}\Doom Builder\Restore'), True, True, True);
// Remove configs
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\UDBuilder.cfg'));
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\UDBuilder.log'));
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\UDBCrash.txt'));
end;
end;

View file

@ -1,288 +0,0 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
AppName=Ultimate Zone Builder
AppVerName=Ultimate Zone Builder
AppPublisher=Sonic Team Junior
AppPublisherURL=https://www.srb2.org/
AppSupportURL=https://www.srb2.org/
AppUpdatesURL=https://www.srb2.org/
DefaultDirName={pf}\Ultimate Zone Builder
DefaultGroupName=Ultimate Zone Builder
AllowNoIcons=true
LicenseFile=..\LICENSE.txt
OutputDir=..\Release
OutputBaseFilename=Setup
Compression=lzma/ultra64
SolidCompression=true
SourceDir=..\Build
SetupLogging=false
AppMutex=ultimatezonebuilder
PrivilegesRequired=admin
ShowLanguageDialog=no
LanguageDetectionMethod=none
MinVersion=0,6.0
UninstallDisplayIcon={app}\Updater.exe
WizardImageFile=..\Setup\WizModernImage-IS.bmp
WizardSmallImageFile=..\Setup\WizModernSmallImage-IS.bmp
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: Setup\dotnetfx35setup.exe; DestDir: {tmp}; Flags: dontcopy
Source: Setup\vcredist_x86.exe; DestDir: {tmp}; Flags: dontcopy
Source: Builder.exe; DestDir: {app}; Flags: ignoreversion
Source: Builder.exe.config; DestDir: {app}; Flags: ignoreversion
Source: UDBuilder.default.cfg; DestDir: {app}; Flags: ignoreversion
//Source: Updater.exe; DestDir: {app}; Flags: ignoreversion
Source: Updater.ini; DestDir: {app}; Flags: ignoreversion
//Source: Refmanual.chm; DestDir: {app}; Flags: ignoreversion
//Source: DevIL.dll; DestDir: {app}; Flags: ignoreversion
Source: BuilderNative.dll; DestDir: {app}; Flags: ignoreversion
Source: SharpCompress.dll; DestDir: {app}; Flags: ignoreversion
Source: ScintillaNET.dll; DestDir: {app}; Flags: ignoreversion
Source: TabControlEX.dll; DestDir: {app}; Flags: ignoreversion
Source: LICENSE.txt; DestDir: {app}; Flags: ignoreversion
Source: Compilers\*; DestDir: {app}\Compilers; Flags: ignoreversion recursesubdirs
Source: Configurations\*; DestDir: {app}\Configurations; Flags: ignoreversion recursesubdirs
Source: Scripting\*; DestDir: {app}\Scripting; Flags: ignoreversion recursesubdirs
Source: Snippets\*; DestDir: {app}\Snippets; Flags: ignoreversion recursesubdirs
Source: UDBScript\*; DestDir: {app}\UDBScript; Flags: ignoreversion recursesubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: Plugins\Dependencies\Esprima.dll; DestDir: {app}\Plugins\Dependencies; Flags: ignoreversion
Source: Plugins\Dependencies\Jint.dll; DestDir: {app}\Plugins\Dependencies; Flags: ignoreversion
Source: Plugins\AutomapMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\BuilderModes.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\BuilderEffects.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\ColorPicker.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\CommentsPanel.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\NodesViewer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\SoundPropagationMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\StairSectorBuilder.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\TagExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\TagRange.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\ThreeDFloorMode.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\UDBScript.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\VisplaneExplorer.dll; DestDir: {app}\Plugins; Flags: ignoreversion
Source: Plugins\Loadorder.cfg; DestDir: {app}\Plugins; Flags: ignoreversion onlyifdoesntexist
Source: Sprites\*; DestDir: {app}\Sprites; Flags: ignoreversion recursesubdirs
Source: Textures\*; DestDir: {app}\Textures; Flags: ignoreversion
[Icons]
Name: {group}\Ultimate Zone Builder; Filename: {app}\Builder.exe
Name: {group}\{cm:UninstallProgram,Ultimate Zone Builder}; Filename: {uninstallexe}
Name: {commondesktop}\Ultimate Zone Builder; Filename: {app}\Builder.exe; Tasks: desktopicon
[UninstallDelete]
Name: {app}; Type: filesandordirs
[InstallDelete]
Name: {app}\Builder.pdb; Type: files
Name: {app}\Builder.xml; Type: files
[Registry]
Root: HKLM; Subkey: SOFTWARE\UZB\Ultimate Zone Builder\; ValueType: string; ValueName: Location; ValueData: {app}; Flags: uninsdeletevalue
[Messages]
ReadyLabel2a=Continue to begin with the installation, or click Back if you want to review or change any settings.
[Code]
// Global variables
var
page_info_net: TOutputMsgWizardPage;
page_info_netfailed: TOutputMsgWizardPage;
page_setup_net: TOutputProgressWizardPage;
page_info_vc: TOutputMsgWizardPage;
page_info_vcfailed: TOutputMsgWizardPage;
page_setup_vc: TOutputProgressWizardPage;
restartneeded: Boolean;
netinstallfailed: Boolean;
netisinstalled: Boolean;
vcinstallfailed: Boolean;
vcisinstalled: Boolean;
// Prerequisites checks
function CheckNetIsInstalled(): Boolean;
begin
Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5') or
RegKeyExists(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v3.5');
end;
function CheckVCIsInstalled(): Boolean;
begin
//mxd. Any VC++ 2008 package will do, I assume...
//mxd. Registry values gartered from http://blogs.msdn.com/b/astebner/archive/2009/01/29/9384143.aspx
Result := RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}') or
RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A25302D-30C0-39D9-BD6F-21E6EC160475}') or
RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}');
end;
// When the wizard initializes
procedure InitializeWizard();
begin
restartneeded := false;
netinstallfailed := false;
netisinstalled := CheckNetIsInstalled();
vcinstallfailed := false;
vcisinstalled := CheckVCIsInstalled();
// Create .NET Framework pages
page_info_net := CreateOutputMsgPage(wpPreparing,
'Installing Microsoft .NET Framework 3.5', '',
'Setup has detected that your system is missing the required version of the Microsoft .NET Framework. ' +
'Setup will now install or update your Microsoft .NET Framework. This may take several minutes to complete.' + #10 + #10 +
'WARNING: The installer will download the Microsoft .NET Framework from the internet, but the progress bar will not ' +
'go forward until the download is complete. You may send Microsoft an angry letter about that.' + #10 + #10 +
'Click Install to begin.');
page_info_netfailed := CreateOutputMsgPage(page_info_net.ID,
'Installing Microsoft .NET Framework 3.5', '',
'Setup could not install the Microsoft .NET Framework 3.5.' + #10 + #10 +
'Click Back to try again, or Cancel to exit Setup.');
page_setup_net := CreateOutputProgressPage('Installing Microsoft .NET Framework 3.5', 'Setup is installing Microsoft .NET Framework 3.5, please wait...');
// Create VC++ 2008 pages
page_info_vc := CreateOutputMsgPage(wpPreparing,
'Installing Visual C++ 2008 SP1 ATL Security Update', '',
'Setup has detected that your system is missing the required version of the Visual C++ Runtime. ' +
'Setup will now install or update your Visual C++ Runtime. This may take several minutes to complete.' + #10 + #10 +
'Click Install to begin.');
page_info_vcfailed := CreateOutputMsgPage(page_info_net.ID,
'Installing Visual C++ 2008 SP1 ATL Security Update', '',
'Setup could not install Visual C++ 2008 SP1 ATL Security Update.' + #10 + #10 +
'Click Back to try again, or Cancel to exit Setup.');
page_setup_vc := CreateOutputProgressPage('Installing Visual C++ 2008 SP1 ATL Security Update', 'Setup is installing Visual C++ 2008 SP1 ATL Security Update, please wait...');
end;
// This is called to check if a page must be skipped
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if(PageID = page_info_net.ID) then // Skip .NET pages?
Result := netisinstalled
else if(PageID = page_info_netfailed.ID) then
Result := (not netinstallfailed) and netisinstalled
else if(PageID = page_info_vc.ID) then // Skip VC++ pages?
Result := vcisinstalled
else if(PageID = page_info_vcfailed.ID) then
Result := (not vcinstallfailed) and vcisinstalled
else
Result := false;
end;
// This is called to determine if we need to restart
function NeedRestart(): Boolean;
begin
Result := restartneeded;
end;
// This is called when the current page changes
procedure CurPageChanged(CurPageID: Integer);
begin
if(CurPageID = wpReady) then begin
if(netisinstalled = false) or (vcisinstalled = false) then
WizardForm.NextButton.Caption := 'Next';
end
else if(CurPageID = page_info_net.ID) or (CurPageID = page_info_vc.ID) then begin
WizardForm.NextButton.Caption := 'Install';
end
else if(CurPageID = page_info_netfailed.ID) or (CurPageID = page_info_vcfailed.ID) then begin
WizardForm.NextButton.Visible := true;
WizardForm.NextButton.Enabled := false;
WizardForm.BackButton.Visible := true;
WizardForm.BackButton.Enabled := true;
WizardForm.CancelButton.Visible := true;
WizardForm.CancelButton.Enabled := true;
end;
end;
// This is called when the Next button is clicked
function NextButtonClick(CurPage: Integer): Boolean;
var
errorcode: Integer;
tempfile: String;
begin
// Next pressed on .NET info page?
if(CurPage = page_info_net.ID) then begin
// Show progress page and run setup
page_setup_net.Show;
try
begin
netinstallfailed := false;
ExtractTemporaryFile('dotnetfx35setup.exe');
// We copy the file to the real temp directory so that it isn't removed when Setup is closed.
// Judging from the return codes, this installer may want to run again after a reboot.
// See the return codes here: http://msdn.microsoft.com/en-us/library/cc160716.aspx
tempfile := RemoveBackslash(GetTempDir()) + '\dotnetfx35setup.exe';
FileCopy(ExpandConstant('{tmp}\dotnetfx35setup.exe'), tempfile, false);
Exec(tempfile, '/qb /norestart', '', SW_SHOW, ewWaitUntilTerminated, errorcode);
if((errorcode = 1641) or (errorcode = 3010)) then begin
// Success, but restart needed!
restartneeded := true;
end
else if(errorcode <> 0) then begin
netinstallfailed := true;
end;
netisinstalled := CheckNetIsInstalled();
end
finally
page_setup_net.Hide;
end;
end
// Next pressed on VC info page?
else if(CurPage = page_info_vc.ID) then begin
// Show progress page and run setup
page_setup_vc.Show;
try
begin
vcinstallfailed := false;
ExtractTemporaryFile('vcredist_x86.exe');
// We copy the file to the real temp directory so that it isn't removed when Setup is closed.
// Judging from the return codes, this installer may want to run again after a reboot.
// See the return codes here: http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx
tempfile := RemoveBackslash(GetTempDir()) + '\vcredist_x86.exe';
FileCopy(ExpandConstant('{tmp}\vcredist_x86.exe'), tempfile, false);
Exec(tempfile, '/q /norestart', '', SW_SHOW, ewWaitUntilTerminated, errorcode);
if(errorcode = 3010) then begin
// Success, but restart needed!
restartneeded := true;
end
else if(errorcode <> 0) then begin
vcinstallfailed := true;
end;
vcisinstalled := CheckVCIsInstalled();
end
finally
page_setup_vc.Hide;
end;
end;
Result := True;
end;
//Remove configs?
procedure DeinitializeUninstall();
begin
if MsgBox('Delete map restore data and program configuration files?', mbConfirmation, MB_YESNO) = IDYES then
begin
// Remove restore data
DelTree(ExpandConstant('{localappdata}\Doom Builder\Restore'), True, True, True);
// Remove configs
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZBuilder.cfg'));
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZBuilder.log'));
DeleteFile(ExpandConstant('{localappdata}\Doom Builder\GZCrash.txt'));
end;
end;

View file

@ -34,6 +34,7 @@ namespace CodeImp.DoomBuilder.Actions
private readonly string title;
private readonly string description;
private readonly string category;
private readonly bool registertoast;
// Shortcut key
private int key;
@ -62,6 +63,7 @@ namespace CodeImp.DoomBuilder.Actions
public string Category { get { return category; } }
public string Title { get { return title; } }
public string Description { get { return description; } }
public bool RegisterToast { get { return registertoast; } }
public int ShortcutKey { get { return key; } }
public int ShortcutMask { get { return keymask; } }
public int DefaultShortcutKey { get { return defaultkey; } }
@ -88,6 +90,7 @@ namespace CodeImp.DoomBuilder.Actions
this.title = cfg.ReadSetting(shortname + ".title", "[" + name + "]");
this.category = cfg.ReadSetting(shortname + ".category", "");
this.description = cfg.ReadSetting(shortname + ".description", "");
this.registertoast = cfg.ReadSetting(shortname + ".registertoast", false);
this.allowkeys = cfg.ReadSetting(shortname + ".allowkeys", true);
this.allowmouse = cfg.ReadSetting(shortname + ".allowmouse", true);
this.allowscroll = cfg.ReadSetting(shortname + ".allowscroll", false);

View file

@ -144,6 +144,7 @@
<Compile Include="Compilers\NodesCompiler.cs" />
<Compile Include="Config\ArgumentInfo.cs" />
<Compile Include="Config\ExternalCommandSettings.cs" />
<Compile Include="Config\RequiredArchive.cs" />
<Compile Include="Config\StaticLimits.cs" />
<Compile Include="Config\MapLumpInfo.cs" />
<Compile Include="Config\ScriptConfiguration.cs" />
@ -186,6 +187,12 @@
<Compile Include="Controls\ArgumentsControlSRB2.Designer.cs">
<DependentUpon>ArgumentsControlSRB2.cs</DependentUpon>
</Compile>
<Compile Include="Controls\CommandPaletteControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\CommandPaletteControl.Designer.cs">
<DependentUpon>CommandPaletteControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ExternalCommandControl.cs">
<SubType>UserControl</SubType>
</Compile>
@ -197,6 +204,21 @@
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Scripting\TextEditorControl.cs" />
<Compile Include="Controls\SidedefPartLightControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\SidedefPartLightControl.Designer.cs">
<DependentUpon>SidedefPartLightControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ToastControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ToastControl.Designer.cs">
<DependentUpon>ToastControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ToolStripActionButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\TransparentTrackBar.cs">
<SubType>Component</SubType>
</Compile>
@ -226,6 +248,7 @@
<Compile Include="Dehacked\DehackedParser.cs" />
<Compile Include="Dehacked\DehackedThing.cs" />
<Compile Include="General\SHA256Hash.cs" />
<Compile Include="General\ToastManager.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@ -676,6 +699,7 @@
<HintPath>..\..\Build\SharpCompress.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
@ -683,16 +707,27 @@
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="TabControlEX, Version=0.0.3271.41578, Culture=neutral, PublicKeyToken=1db242dc828e4b4e">
<Private>False</Private>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Controls\ArgumentsControlSRB2.resx">
<DependentUpon>ArgumentsControlSRB2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\CommandPaletteControl.resx">
<DependentUpon>CommandPaletteControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ExternalCommandControl.resx">
<DependentUpon>ExternalCommandControl.cs</DependentUpon>
</EmbeddedResource>
@ -702,6 +737,12 @@
<EmbeddedResource Include="Windows\LinedefEditFormSRB2.resx">
<DependentUpon>LinedefEditFormSRB2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\SidedefPartLightControl.resx">
<DependentUpon>SidedefPartLightControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ToastControl.resx">
<DependentUpon>ToastControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\PreAndPostCommandsForm.resx">
<DependentUpon>PreAndPostCommandsForm.cs</DependentUpon>
</EmbeddedResource>
@ -1389,6 +1430,7 @@
<None Include="Resources\MergeGeo.png" />
<None Include="Resources\MergeGeoClassic.png" />
<None Include="Resources\MergeGeoRemoveLines.png" />
<None Include="Resources\Loader.gif" />
<Content Include="Resources\Model.png" />
<None Include="Resources\ModelDisabled.png" />
<None Include="Resources\ModelFiltered.png" />

View file

@ -160,6 +160,7 @@
<Compile Include="Config\LinedefActivateInfo.cs" />
<Compile Include="Config\ProgramConfiguration.cs" />
<Compile Include="Config\SkillInfo.cs" />
<Compile Include="Config\RequiredArchive.cs" />
<Compile Include="Config\StaticLimits.cs" />
<Compile Include="Config\TagType.cs" />
<Compile Include="Config\TextureSet.cs" />
@ -183,6 +184,12 @@
<Compile Include="Controls\ArgumentsControlSRB2.Designer.cs">
<DependentUpon>ArgumentsControlSRB2.cs</DependentUpon>
</Compile>
<Compile Include="Controls\CommandPaletteControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\CommandPaletteControl.Designer.cs">
<DependentUpon>CommandPaletteControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ExternalCommandControl.cs">
<SubType>UserControl</SubType>
</Compile>
@ -194,6 +201,21 @@
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Scripting\TextEditorControl.cs" />
<Compile Include="Controls\SidedefPartLightControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\SidedefPartLightControl.Designer.cs">
<DependentUpon>SidedefPartLightControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ToastControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\ToastControl.Designer.cs">
<DependentUpon>ToastControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\ToolStripActionButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\TransparentTrackBar.cs">
<SubType>Component</SubType>
</Compile>
@ -218,6 +240,7 @@
<Compile Include="Data\FlatImage.cs" />
<Compile Include="Data\ImageLoadState.cs" />
<Compile Include="General\SHA256Hash.cs" />
<Compile Include="General\ToastManager.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@ -685,6 +708,9 @@
<EmbeddedResource Include="Controls\ArgumentsControlSRB2.resx">
<DependentUpon>ArgumentsControlSRB2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\CommandPaletteControl.resx">
<DependentUpon>CommandPaletteControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ExternalCommandControl.resx">
<DependentUpon>ExternalCommandControl.cs</DependentUpon>
</EmbeddedResource>
@ -694,6 +720,12 @@
<EmbeddedResource Include="Windows\LinedefEditFormSRB2.resx">
<DependentUpon>LinedefEditFormSRB2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\SidedefPartLightControl.resx">
<DependentUpon>SidedefPartLightControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\ToastControl.resx">
<DependentUpon>ToastControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\PreAndPostCommandsForm.resx">
<DependentUpon>PreAndPostCommandsForm.cs</DependentUpon>
</EmbeddedResource>

View file

@ -105,7 +105,7 @@ namespace CodeImp.DoomBuilder.Compilers
// Map SCRIPTS lump is empty. Abort the process without generating any warnings or errors.
if(SourceIsMapScriptsLump && stream.Length == 0) return false;
DataLocation dl = new DataLocation(DataLocation.RESOURCE_DIRECTORY, Path.GetDirectoryName(inputfilepath), false, false, false);
DataLocation dl = new DataLocation(DataLocation.RESOURCE_DIRECTORY, Path.GetDirectoryName(inputfilepath), false, false, false, null);
//mxd. TextResourceData must point to temp path when compiling WAD lumps for lump to be recognized as map lump when reporting errors...
TextResourceData data = new TextResourceData(stream, dl, (SourceIsMapScriptsLump ? inputfile : sourcefile));
if(!parser.Parse(data, info.Files, true, AcsParserSE.IncludeType.NONE, false))

View file

@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.Config
{
//mxd. Use short name when adding a texture with "classic" name to override same-named textures
// with textures loaded from directory/pk3 containters
textures[image.DisplayName.Length > 8 ? image.Name : image.ShortName] = image;
textures[/*image.DisplayName.Length > 8 ?*/ image.Name /*: image.ShortName*/] = image;
}
internal void AddFlat(ImageData image)

32
Source/Core/Config/GameConfiguration.cs Executable file → Normal file
View file

@ -113,6 +113,8 @@ namespace CodeImp.DoomBuilder.Config
private readonly bool planeequationsupport;
private readonly bool distinctfloorandceilingbrightness;
private readonly bool distinctwallbrightness;
private readonly bool distinctsidedefpartbrightness;
private readonly bool sectormultitag;
private readonly int maxcolormapalpha;
private readonly int numbrightnesslevels;
@ -200,6 +202,9 @@ namespace CodeImp.DoomBuilder.Config
//mxd. Stuff to ignore
private HashSet<string> ignoreddirectories;
private HashSet<string> ignoredextensions;
// [ZZ] This implements error message if GZDoom.pk3 is required but not loaded
private List<RequiredArchive> requiredarchives;
// Defaults
private readonly List<DefinedTextureSet> texturesets;
@ -294,6 +299,8 @@ namespace CodeImp.DoomBuilder.Config
public bool PlaneEquationSupport { get { return planeequationsupport; } }
public bool DistinctFloorAndCeilingBrightness { get { return distinctfloorandceilingbrightness; } }
public bool DistinctWallBrightness { get { return distinctwallbrightness; } }
public bool DistinctSidedefPartBrightness { get { return distinctsidedefpartbrightness; } }
public bool SectorMultiTag { get { return sectormultitag; } }
public int MaxColormapAlpha { get { return maxcolormapalpha; } }
public int NumBrightnessLevels { get { return numbrightnesslevels; } }
@ -362,6 +369,9 @@ namespace CodeImp.DoomBuilder.Config
internal HashSet<string> IgnoredFileExtensions { get { return ignoredextensions; } }
internal HashSet<string> IgnoredDirectoryNames { get { return ignoreddirectories; } }
// [ZZ] This implements error message if GZDoom.pk3 is required but not loaded
internal List<RequiredArchive> RequiredArchives { get { return requiredarchives; } }
// Defaults
internal List<DefinedTextureSet> TextureSets { get { return texturesets; } }
public List<ThingsFilter> ThingsFilters { get { return thingfilters; } }
@ -477,6 +487,9 @@ namespace CodeImp.DoomBuilder.Config
planeequationsupport = cfg.ReadSetting("planeequationsupport", false);
distinctfloorandceilingbrightness = cfg.ReadSetting("distinctfloorandceilingbrightness", false);
distinctwallbrightness = cfg.ReadSetting("distinctwallbrightness", false);
distinctsidedefpartbrightness = cfg.ReadSetting("distinctsidedefpartbrightness", false);
sectormultitag = cfg.ReadSetting("sectormultitag", false);
for (int i = 0; i < Linedef.NUM_ARGS; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0);
maxcolormapalpha = cfg.ReadSetting("maxcolormapalpha", 25);
numbrightnesslevels = cfg.ReadSetting("numbrightnesslevels", 32);
for (int i = 0; i < makedoorargs.Length; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0);
@ -547,6 +560,25 @@ namespace CodeImp.DoomBuilder.Config
ignoreddirectories = new HashSet<string>(cfg.ReadSetting("ignoreddirectories", string.Empty).Split(splitter, StringSplitOptions.RemoveEmptyEntries), StringComparer.OrdinalIgnoreCase);
ignoredextensions = new HashSet<string>(cfg.ReadSetting("ignoredextensions", string.Empty).Split(splitter, StringSplitOptions.RemoveEmptyEntries), StringComparer.OrdinalIgnoreCase);
// [ZZ]
IDictionary requiredArchives = cfg.ReadSetting("requiredarchives", new Hashtable());
requiredarchives = new List<RequiredArchive>();
foreach (DictionaryEntry cde in requiredArchives)
{
string filename = cfg.ReadSetting("requiredarchives." + cde.Key + ".filename", "gzdoom.pk3");
bool exclude = cfg.ReadSetting("requiredarchives." + cde.Key + ".need_exclude", true);
IDictionary entries = cfg.ReadSetting("requiredarchives." + cde.Key, new Hashtable());
List<RequiredArchiveEntry> reqEntries = new List<RequiredArchiveEntry>();
foreach (DictionaryEntry cde2 in entries)
{
if ((string)cde2.Key == "filename") continue;
string lumpname = cfg.ReadSetting("requiredarchives." + cde.Key + "." + cde2.Key + ".lump", (string)null);
string classname = cfg.ReadSetting("requiredarchives." + cde.Key + "." + cde2.Key + ".class", (string)null);
reqEntries.Add(new RequiredArchiveEntry(classname, lumpname));
}
requiredarchives.Add(new RequiredArchive((string)cde.Key, filename, exclude, reqEntries));
}
// Things
LoadThingFlags();
LoadDefaultThingFlags();

53
Source/Core/Config/ProgramConfiguration.cs Executable file → Normal file
View file

@ -98,6 +98,8 @@ namespace CodeImp.DoomBuilder.Config
private bool showfps;
private int[] colordialogcustomcolors;
private bool autolaunchontest;
private bool parallelizedlinedefplotting;
private bool parallelizedvertexplotting;
//mxd. Script editor settings
private string scriptfontname;
@ -148,7 +150,9 @@ namespace CodeImp.DoomBuilder.Config
//volte
private bool classicRendering;
private bool flatShadeVertices;
private bool alwaysShowVertices;
// These are not stored in the configuration, only used at runtime
private int defaultbrightness;
private int defaultfloorheight;
@ -212,6 +216,8 @@ namespace CodeImp.DoomBuilder.Config
public bool ShowFPS { get { return showfps; } internal set { showfps = value; } }
public int[] ColorDialogCustomColors { get { return colordialogcustomcolors; } internal set { colordialogcustomcolors = value; } }
public bool AutoLaunchOnTest { get { return autolaunchontest; } internal set { autolaunchontest = value; } }
public bool ParallelizedLinedefPlotting { get { return parallelizedlinedefplotting; } internal set { parallelizedlinedefplotting = value; } }
public bool ParallelizedVertexPlotting { get { return parallelizedvertexplotting; } internal set { parallelizedvertexplotting = value; } }
//mxd. Highlight mode
public bool UseHighlight
@ -277,6 +283,10 @@ namespace CodeImp.DoomBuilder.Config
//volte
public bool ClassicRendering { get { return classicRendering; } internal set { classicRendering = value; } }
public bool FlatShadeVertices { get { return flatShadeVertices; } internal set { flatShadeVertices = value; } }
public bool AlwaysShowVertices { get { return alwaysShowVertices; } internal set { alwaysShowVertices = value; } }
//mxd. Left here for compatibility reasons...
public string DefaultTexture { get { return General.Map != null ? General.Map.Options.DefaultWallTexture : "-"; } set { if(General.Map != null) General.Map.Options.DefaultWallTexture = value; } }
public string DefaultFloorTexture { get { return General.Map != null ? General.Map.Options.DefaultFloorTexture : "-"; } set { if(General.Map != null) General.Map.Options.DefaultFloorTexture = value; } }
@ -363,6 +373,8 @@ namespace CodeImp.DoomBuilder.Config
switchviewmodes = cfg.ReadSetting("switchviewmodes", false); //mxd
showfps = cfg.ReadSetting("showfps", false);
autolaunchontest = cfg.ReadSetting("autolaunchontest", false);
parallelizedlinedefplotting = cfg.ReadSetting("parallelizedlinedefplotting", true);
parallelizedvertexplotting = cfg.ReadSetting("parallelizedvertexplotting", false);
//mxd. Script editor
scriptfontname = cfg.ReadSetting("scriptfontname", "Courier New");
@ -412,7 +424,9 @@ namespace CodeImp.DoomBuilder.Config
// volte
classicRendering = cfg.ReadSetting("classicrendering", false);
alwaysShowVertices = cfg.ReadSetting("alwaysshowvertices", true);
flatShadeVertices = cfg.ReadSetting("flatshadevertices", false);
//mxd. Sector defaults
defaultceilheight = cfg.ReadSetting("defaultceilheight", 128);
defaultfloorheight = cfg.ReadSetting("defaultfloorheight", 0);
@ -555,6 +569,11 @@ namespace CodeImp.DoomBuilder.Config
//volte
cfg.WriteSetting("classicrendering", classicRendering);
cfg.WriteSetting("alwaysshowvertices", alwaysShowVertices);
cfg.WriteSetting("flatshadevertices", flatShadeVertices);
// Toasts
General.ToastManager.WriteSettings(cfg);
//mxd. Sector defaults
cfg.WriteSetting("defaultceilheight", defaultceilheight);
@ -736,6 +755,21 @@ namespace CodeImp.DoomBuilder.Config
{
for (int i = 0; i < t.Args.Length; i++)
t.Args[i] = (int)tti.Args[i].DefaultValue;
// Add user vars
if (tti.Actor != null)
{
Dictionary<string, UniversalType> uservars = tti.Actor.GetAllUserVars();
Dictionary<string, object> uservardefaults = tti.Actor.GetAllUserVarDefaults();
t.BeforeFieldsChange();
foreach (string fname in uservars.Keys)
{
if (uservardefaults.ContainsKey(fname))
t.Fields[fname] = new UniValue(uservars[fname], uservardefaults[fname]);
}
}
}
}
@ -763,6 +797,21 @@ namespace CodeImp.DoomBuilder.Config
{
for (int i = 0; i < t.Args.Length; i++)
t.Args[i] = (int)tti.Args[i].DefaultValue;
// Add user vars
if (tti.Actor != null)
{
Dictionary<string, UniversalType> uservars = tti.Actor.GetAllUserVars();
Dictionary<string, object> uservardefaults = tti.Actor.GetAllUserVarDefaults();
t.BeforeFieldsChange();
foreach (string fname in uservars.Keys)
{
if (uservardefaults.ContainsKey(fname))
t.Fields[fname] = new UniValue(uservars[fname], uservardefaults[fname]);
}
}
}
}

View file

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeImp.DoomBuilder.Config
{
class RequiredArchiveEntry
{
private string reqClass;
private string reqLump;
public RequiredArchiveEntry(string reqClass, string reqLump)
{
this.reqClass = reqClass;
this.reqLump = reqLump;
}
public string Class { get { return reqClass; } }
public string Lump { get { return reqLump; } }
}
class RequiredArchive
{
private string id;
private string filename;
private bool excludeFromTesting;
private List<RequiredArchiveEntry> entries;
public RequiredArchive(string id, string filename, bool excludeFromTesting, List<RequiredArchiveEntry> entries)
{
this.id = id;
this.filename = filename;
this.excludeFromTesting = excludeFromTesting;
this.entries = entries;
}
public string ID { get { return id; } }
public string FileName { get { return filename; } }
public bool ExcludeFromTesting { get { return excludeFromTesting; } }
public IReadOnlyCollection<RequiredArchiveEntry> Entries { get { return entries; } }
}
}

View file

@ -111,7 +111,7 @@ namespace CodeImp.DoomBuilder.Config
// Add textures to flats
foreach(KeyValuePair<long, ImageData> t in textures)
{
if(!flats.ContainsKey(t.Key)) flats.Add(t.Key, t.Value);
if(!flats.ContainsKey(t.Key) || t.Value.TextureNamespace == TextureNamespace.TEXTURE) flats[t.Key] = t.Value;
}
// Add flats to textures

View file

@ -91,6 +91,7 @@ namespace CodeImp.DoomBuilder.Config
private string obsoletemessage; //mxd
private Dictionary<string, Dictionary<string, string>> flagsrename; //mxd. <MapSetIOName, <flag, title>>
private int thinglink;
private List<string> adduniversalfields;
//mxd. GZDoom rendering properties
private ThingRenderMode rendermode;
@ -200,6 +201,7 @@ namespace CodeImp.DoomBuilder.Config
this.flagsrename = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); //mxd
this.thinglink = 0;
this.optional = false; // [ZZ]
this.adduniversalfields = new List<string>();
// We have no destructor
GC.SuppressFinalize(this);
@ -242,6 +244,16 @@ namespace CodeImp.DoomBuilder.Config
this.classname = cfg.ReadSetting("thingtypes." + cat.Name + "." + key + ".class", String.Empty); //mxd
this.thinglink = cfg.ReadSetting("thingtypes." + cat.Name + "." + key + ".thinglink", 0);
// Read universal fields that should be added to this thing type
adduniversalfields = new List<string>();
IDictionary adduniversalfieldsdic = cfg.ReadSetting("thingtypes." + cat.Name + "." + key + ".adduniversalfields", new Hashtable());
foreach(DictionaryEntry de in adduniversalfieldsdic)
{
string addname = de.Key.ToString().ToLowerInvariant();
if (!adduniversalfields.Contains(addname))
adduniversalfields.Add(addname);
}
//mxd. Read flagsrename
this.flagsrename = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
IDictionary maindic = cfg.ReadSetting("thingtypes." + cat.Name + "." + key + ".flagsrename", new Hashtable());
@ -322,6 +334,7 @@ namespace CodeImp.DoomBuilder.Config
this.spritescale = new SizeF(cat.SpriteScale, cat.SpriteScale);
this.locksprite = false; //mxd
this.flagsrename = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); //mxd
this.adduniversalfields = new List<string>();
// Safety
if(this.radius < 4f || this.fixedsize) this.radius = THING_FIXED_SIZE;
@ -370,6 +383,7 @@ namespace CodeImp.DoomBuilder.Config
this.absolutez = cat.AbsoluteZ;
this.spritescale = new SizeF(cat.SpriteScale, cat.SpriteScale);
this.flagsrename = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); //mxd
this.adduniversalfields = new List<string>();
// Safety
if(this.hangs && this.absolutez) this.hangs = false; //mxd
@ -422,6 +436,7 @@ namespace CodeImp.DoomBuilder.Config
this.absolutez = cat.AbsoluteZ;
this.spritescale = new SizeF(cat.SpriteScale, cat.SpriteScale);
this.flagsrename = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); //mxd
this.adduniversalfields = new List<string>();
// Safety
if(this.hangs && this.absolutez) this.hangs = false; //mxd
@ -478,6 +493,7 @@ namespace CodeImp.DoomBuilder.Config
this.xybillboard = other.xybillboard; //mxd
this.spritescale = new SizeF(other.spritescale.Width, other.spritescale.Height);
this.flagsrename = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); //mxd
this.adduniversalfields = new List<string>(other.adduniversalfields);
//mxd. Copy GZDoom rendering properties
this.rendermode = other.rendermode;
@ -502,6 +518,13 @@ namespace CodeImp.DoomBuilder.Config
ModifyByDehackedThing(thing);
}
internal ThingTypeInfo(ThingCategory cat, ActorStructure actor, ThingTypeInfo other) : this(actor.DoomEdNum, other)
{
category = cat;
ModifyByDecorateActor(actor);
}
#endregion
#region ================== Methods
@ -969,6 +992,11 @@ namespace CodeImp.DoomBuilder.Config
{
return title + " (" + index + ")";
}
public bool HasAddUniversalField(string fieldname)
{
return adduniversalfields != null && adduniversalfields.Contains(fieldname);
}
#endregion
}

View file

@ -60,6 +60,7 @@ namespace CodeImp.DoomBuilder.Config
private string name;
private int type;
private object defaultvalue;
private bool thingtypespecific;
private EnumList enumlist;
private Dictionary<string, UDMFFieldAssociation> associations;
@ -70,6 +71,7 @@ namespace CodeImp.DoomBuilder.Config
public string Name { get { return name; } }
public int Type { get { return type; } }
public object Default { get { return defaultvalue; } }
public bool ThingTypeSpecific { get { return thingtypespecific; } }
public EnumList Enum { get { return enumlist; } }
public Dictionary<string, UDMFFieldAssociation> Associations { get { return associations; } }
@ -87,16 +89,40 @@ namespace CodeImp.DoomBuilder.Config
associations = new Dictionary<string, UDMFFieldAssociation>();
// Read type
this.type = cfg.ReadSetting(setting + ".type", int.MinValue);
this.defaultvalue = cfg.ReadSettingObject(setting + ".default", null);
type = cfg.ReadSetting(setting + ".type", int.MinValue);
defaultvalue = cfg.ReadSettingObject(setting + ".default", null);
thingtypespecific = cfg.ReadSetting(setting + ".thingtypespecific", false);
// Read enum
object enumsetting = cfg.ReadSettingObject(setting + ".enum", null);
if (enumsetting != null)
{
// Reference to existing enums list?
if (enumsetting is string)
{
// Link to it
enumlist = enums[enumsetting.ToString()];
}
else if (enumsetting is IDictionary)
{
// Make list
enumlist = new EnumList(enumsetting as IDictionary);
}
}
//mxd. Check type
if(this.type == int.MinValue)
if (this.type == int.MinValue)
{
General.ErrorLogger.Add(ErrorType.Warning, "No type is defined for universal field \"" + name + "\" defined in \"" + configname + "\". Integer type will be used.");
this.type = (int)UniversalType.Integer;
}
if(type == (int)UniversalType.EnumOption && enumsetting == null)
{
General.ErrorLogger.Add(ErrorType.Warning, "Universal field \"" + name + "\" defined in \"" + configname + "\" is of type enum (" + this.type + "), but has no enum values set. Falling back to integer type");
type = (int)UniversalType.Integer;
}
TypeHandler th = General.Types.GetFieldHandler(this);
if(th is NullHandler)
{
@ -107,23 +133,6 @@ namespace CodeImp.DoomBuilder.Config
//mxd. Default value is missing? Get it from typehandler
if(this.defaultvalue == null) this.defaultvalue = th.GetDefaultValue();
// Read enum
object enumsetting = cfg.ReadSettingObject(setting + ".enum", null);
if(enumsetting != null)
{
// Reference to existing enums list?
if(enumsetting is string)
{
// Link to it
enumlist = enums[enumsetting.ToString()];
}
else if(enumsetting is IDictionary)
{
// Make list
enumlist = new EnumList(enumsetting as IDictionary);
}
}
// Read associations
IDictionary assocdict = cfg.ReadSetting(setting + ".associations", new Hashtable());
@ -152,6 +161,13 @@ namespace CodeImp.DoomBuilder.Config
GC.SuppressFinalize(this);
}
internal UniversalFieldInfo(string name, int type, object defaultvalue)
{
this.name = name.ToLowerInvariant();
this.type = type;
this.defaultvalue = defaultvalue;
}
#endregion
#region ================== Methods

View file

@ -45,6 +45,11 @@ namespace CodeImp.DoomBuilder.Controls
public override string Text { get { return combobox.Text; } } //mxd
[Browsable(true)]
[Category("Action")]
[Description("Invoked when user clicks button")]
public event EventHandler ValueChanged;
#endregion
#region ================== Constructor
@ -142,6 +147,8 @@ namespace CodeImp.DoomBuilder.Controls
forcevalidate = false;
combobox_Validating(sender, new CancelEventArgs());
}
ValueChanged?.Invoke(sender, EventArgs.Empty);
}
// Mouse wheel used

View file

@ -0,0 +1,136 @@

namespace CodeImp.DoomBuilder.Controls
{
partial class CommandPaletteControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("Recent", System.Windows.Forms.HorizontalAlignment.Left);
System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Usable actions", System.Windows.Forms.HorizontalAlignment.Left);
System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup("Not usable in this context", System.Windows.Forms.HorizontalAlignment.Left);
this.commandsearch = new System.Windows.Forms.TextBox();
this.noresults = new System.Windows.Forms.Label();
this.commandlist = new CodeImp.DoomBuilder.Controls.OptimizedListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.SuspendLayout();
//
// commandsearch
//
this.commandsearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.commandsearch.Location = new System.Drawing.Point(3, 2);
this.commandsearch.Name = "commandsearch";
this.commandsearch.Size = new System.Drawing.Size(864, 20);
this.commandsearch.TabIndex = 2;
this.commandsearch.TextChanged += new System.EventHandler(this.commandsearch_TextChanged);
this.commandsearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.commandsearch_KeyDown);
//
// noresults
//
this.noresults.AutoSize = true;
this.noresults.Location = new System.Drawing.Point(6, 28);
this.noresults.Name = "noresults";
this.noresults.Size = new System.Drawing.Size(84, 13);
this.noresults.TabIndex = 4;
this.noresults.Text = "No results found";
this.noresults.Visible = false;
//
// commandlist
//
this.commandlist.Activation = System.Windows.Forms.ItemActivation.OneClick;
this.commandlist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.commandlist.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader3,
this.columnHeader2});
this.commandlist.FullRowSelect = true;
listViewGroup1.Header = "Recent";
listViewGroup1.Name = "recent";
listViewGroup2.Header = "Usable actions";
listViewGroup2.Name = "usableactions";
listViewGroup3.Header = "Not usable in this context";
listViewGroup3.Name = "notusableactions";
this.commandlist.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] {
listViewGroup1,
listViewGroup2,
listViewGroup3});
this.commandlist.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.commandlist.Location = new System.Drawing.Point(3, 25);
this.commandlist.MultiSelect = false;
this.commandlist.Name = "commandlist";
this.commandlist.Size = new System.Drawing.Size(864, 173);
this.commandlist.TabIndex = 3;
this.commandlist.TabStop = false;
this.commandlist.UseCompatibleStateImageBehavior = false;
this.commandlist.View = System.Windows.Forms.View.Details;
this.commandlist.ItemActivate += new System.EventHandler(this.commandlist_ItemActivate);
//
// columnHeader1
//
this.columnHeader1.Text = "Action";
this.columnHeader1.Width = 275;
//
// columnHeader3
//
this.columnHeader3.Text = "Section";
this.columnHeader3.Width = 196;
//
// columnHeader2
//
this.columnHeader2.Text = "Key";
this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.columnHeader2.Width = 117;
//
// CommandPaletteControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.noresults);
this.Controls.Add(this.commandlist);
this.Controls.Add(this.commandsearch);
this.DoubleBuffered = true;
this.Name = "CommandPaletteControl";
this.Size = new System.Drawing.Size(870, 201);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private OptimizedListView commandlist;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.TextBox commandsearch;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.Label noresults;
}
}

View file

@ -0,0 +1,461 @@
#region ================== Copyright (c) 2022 Boris Iwanski
/*
* This program is free software: you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program.If not, see<http://www.gnu.org/licenses/>.
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
#endregion
namespace CodeImp.DoomBuilder.Controls
{
public partial class CommandPaletteControl : UserControl
{
#region ================== Constants
private const int MAX_ITEMS = 20;
private const int MAX_RECENT_ACTIONS = 5;
private const int GROUP_RECENT = 0;
private const int GROUP_USABLE = 1;
private const int GROUP_UNUSABLE = 2;
#endregion
#region ================== Variables
private readonly List<Actions.Action> recentactions;
#endregion
#region ================== Constructor
public CommandPaletteControl()
{
InitializeComponent();
recentactions = new List<Actions.Action>();
Enabled = false;
}
#endregion
#region ================== Methods
/// <summary>
/// Hides the palette. Disabled it and sends it to the background.
/// </summary>
/// <param name="sender">The sender</param>
/// <param name="e">The event args</param>
private void HidePalette(object sender, EventArgs e)
{
commandsearch.LostFocus -= HidePalette;
Enabled = false;
if (Parent is MainForm mf)
{
mf.Resize -= Reposition;
mf.Controls.SetChildIndex(this, 0xffff);
mf.ActiveControl = null;
mf.Focus();
}
}
/// <summary>
/// Sets the color of the currently selected item.
/// </summary>
private void HighlightSelectedItem()
{
if (commandlist.SelectedItems.Count > 0)
{
commandlist.SelectedItems[0].BackColor = SystemColors.Highlight;
commandlist.SelectedItems[0].ForeColor = SystemColors.HighlightText;
}
}
/// <summary>
/// Shows the palette
/// </summary>
public void MakeVisible()
{
if (Parent is MainForm mf)
{
// Reset everything to a blank slate
commandsearch.Text = string.Empty;
// commandsearch_TextChanged(this, EventArgs.Empty);
FillCommandList(withrecent: true);
HighlightSelectedItem();
// Set the width of each column to the max width of its fields
commandlist.Columns[0].Width = -1;
commandlist.Columns[1].Width = -1;
commandlist.Columns[2].Width = -1;
// Compute the new width. It's the width of the columns, the vertical scroll bar and some buffer
Width = commandlist.Columns[0].Width + commandlist.Columns[1].Width + commandlist.Columns[2].Width + SystemInformation.VerticalScrollBarWidth + commandlist.Location.X * 4;
// Center the control at the top middle
Location = new Point(mf.Display.Width / 2 - Width / 2, mf.Display.Location.Y + 5);
Enabled = true;
commandsearch.Focus();
// We want to hide the control when the focus is lost
commandsearch.LostFocus += HidePalette;
// Bring it to the foreground
mf.Controls.SetChildIndex(this, 0);
// Always keep the control in the center
mf.Resize += Reposition;
}
}
/// <summary>
/// Keeps the control positioned in the top middle of the window when it is rezied.
/// </summary>
/// <param name="sender">The sender</param>
/// <param name="e">The event args</param>
private void Reposition(object sender, EventArgs e)
{
// Center the control at the top middle
if (Parent is MainForm mf)
Location = new Point(mf.Display.Width / 2 - Width / 2, mf.Display.Location.Y + 5);
}
/// <summary>
/// Selects the item before or after the current item in the command list.
/// </summary>
/// <param name="changeindexby">By how much the index should be changed. Positive numbers mean that it will scroll up, negative numbers will scroll down.</param>
/// <param name="wraparound">If the selection should wrap around to the opposite side if the top or bottom of the list is reached</param>
private void SetSelectedItem(int changeindexby, bool wraparound)
{
if (commandlist.Items.Count > 1)
{
int newindex = commandlist.SelectedIndices[0] + changeindexby;
if (newindex >= commandlist.Items.Count)
{
if (wraparound)
newindex = 0;
else
newindex = commandlist.Items.Count - 1;
}
else if (newindex < 0)
{
if (wraparound)
newindex = commandlist.Items.Count - 1;
else
newindex = 0;
}
// Reset the colors of the currently selected item to the defaults
commandlist.SelectedItems[0].BackColor = SystemColors.Window;
commandlist.SelectedItems[0].ForeColor = SystemColors.WindowText;
// Set the new item, scroll the list to it, and set the highlight color
commandlist.Items[newindex].Selected = true;
commandlist.EnsureVisible(newindex);
HighlightSelectedItem();
}
}
/// <summary>
/// Checks if a search string matches a text. It replicates the behavior of Visual Stuido Code.
/// At first it tries to match the whole search string. If that didn't produce a result it'll try to match as much of the search
/// string at the *beginning* of a word in the text. If that worked the matching characters are removed from the search text and
/// all words in the text up to (including) the found word are removed. This is repeated until all characters in the search string
/// are gone. This means:
/// "le cl" matches "Toggle classic rendering"
/// ^^^^^
/// "tore" matches "Toggle classic rendering"
/// ^^ ^^
/// "tcl" matches "Toggle classic rendering"
/// ^ ^ ^
/// "tof" matches "Toggle Full Brightness"
/// ^^ ^
/// "Align Floor Textures to Front Side"
/// ^^ ^
/// "Reset Texture Offsets"
/// ^ ^^
/// (and a couple other)
/// </summary>
/// <param name="text">The string to search in</param>
/// <param name="search">The string to search for</param>
/// <returns></returns>
private bool MatchText(string text, string search)
{
text = text.ToLowerInvariant().Trim();
text = Regex.Replace(text, @"\s+", " ");
search = search.ToLowerInvariant().Trim();
search = Regex.Replace(search, @"\s+", " ");
// Check if the search string is empty or the whole search string is in the text to search
if (string.IsNullOrWhiteSpace(search) || text.Contains(search))
return true;
// No match yet, so let's check if all search tokens are at the beginning of a text token. This is the same(ish?) behavior as Visual Studio Code.
// This means that searching for "op ma" will match "Open Map", but not "Open Command Palette", because the "ma" in "Command" is not in the beginning.
List<string> textitems = text.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
string[] searchitems = search.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
for(int i=0; i < searchitems.Length; i++)
{
string si = searchitems[i];
// If the search item is empty it means we processed all its characters, so go to the next search item
if (string.IsNullOrEmpty(si))
continue;
string result = null;
// Search token not found, so try to match parts of the search token
while (si.Length > 0)
{
// Try to find the first text token that starts with the search token
result = textitems.FirstOrDefault(ti => ti.StartsWith(si));
// We found something, so remove the matching part of the search token and prepare processing this search token again
if (result != null)
{
searchitems[i] = searchitems[i].Remove(0, si.Length);
i--;
break;
}
// Nothing found, so remove the last character and keep going
si = si.Remove(si.Length - 1);
}
// Nothing found, so abort
if (result == null)
return false;
// We found a search token (or part of it), so remove all text tokens up to including the found text token
int index = textitems.IndexOf(result);
textitems.RemoveRange(0, index + 1);
}
// We didn't return yet, so we must have found everything
return true;
}
/// <summary>
/// Adds an action to the command list, either in the "usable" or "unsuable" group.
/// </summary>
/// <param name="action">The action to add</param>
private void AddActionToList(Actions.Action action, bool isrecent = false)
{
string actiontitle = action.Title;
string catname = string.Empty;
bool isbound = action.BeginBound || action.EndBound;
if (General.Actions.Categories.ContainsKey(action.Category))
catname = General.Actions.Categories[action.Category];
ListViewItem item = commandlist.Items.Add(action.Name, actiontitle, 0);
// Store the action in the tag, so we can invoke the action later
item.Tag = action;
// Add the item to the appropriate group, either the "usable" (0) or "unusable" (1) one
if (isrecent)
item.Group = commandlist.Groups[GROUP_RECENT];
else
item.Group = commandlist.Groups[isbound ? GROUP_USABLE : GROUP_UNUSABLE];
item.SubItems.Add(catname);
item.SubItems.Add(Actions.Action.GetShortcutKeyDesc(action.ShortcutKey));
}
/// <summary>
/// Runs an action and adds it to the list of recent actions
/// </summary>
/// <param name="action"></param>
private void RunAction(Actions.Action action)
{
// Remove the action (if it's in the list) and then insert it at the beginning
recentactions.Remove(action);
recentactions.Insert(0, action);
// Remove all actions that exceed the limit of the max number of recent actions
if (recentactions.Count > MAX_RECENT_ACTIONS)
recentactions.RemoveRange(4, recentactions.Count - MAX_RECENT_ACTIONS);
General.Actions.InvokeAction(action.Name);
}
/// <summary>
/// Fills the control, filtering it so that only the actions that match the search string are shown.
/// </summary>
/// <param name="searchtext">Text to search for in the action name</param>
/// <param name="withrecent">If recently shown actions should be shown or not</param>
private void FillCommandList(string searchtext = "", bool withrecent = false)
{
List<Actions.Action> usableactions = new List<Actions.Action>();
List<Actions.Action> unusableactions = new List<Actions.Action>();
commandlist.BeginUpdate();
commandlist.Items.Clear();
Actions.Action[] actions = General.Actions.GetAllActions();
// Crawl through all actions and check if they are usable or not in the current context
foreach (Actions.Action a in actions)
{
if (MatchText(a.Title, searchtext))
{
if (a.BeginBound || a.EndBound)
usableactions.Add(a);
else
unusableactions.Add(a);
}
}
// If there are matching actions we have to change the control's height and set the default selection
if (usableactions.Count + unusableactions.Count > 0)
{
noresults.Visible = false;
commandlist.Visible = true;
if (withrecent)
foreach (Actions.Action a in recentactions) if (a != null) AddActionToList(a, true);
// We have to do the sorting on our own, because otherwise the groups will screw with the selection logic when pressing the up/down keys
foreach (Actions.Action a in usableactions.OrderBy(o => o.Title)) AddActionToList(a);
foreach (Actions.Action a in unusableactions.OrderBy(o => o.Title)) AddActionToList(a);
// We want to show at most MAX_ITEMS items before having a scroll bar
int numitems = commandlist.Items.Count > MAX_ITEMS ? MAX_ITEMS : commandlist.Items.Count;
// Get the height of a row
int itemheight = commandlist.Items[0].GetBounds(ItemBoundsPortion.Entire).Height;
// Get the number of shown groups
int numgroups = (usableactions.Count == 0 ? 0 : 1) + (unusableactions.Count == 0 ? 0 : 1);
// Set the new height, which is the number of items times the row height, the groups, the search textbox and some buffer
Height = itemheight * numitems + commandsearch.Height + numgroups * (int)(itemheight * 1.4) + commandlist.Location.X * 5;
// Select the topmost item and highlight it
commandlist.Items[0].Selected = true;
HighlightSelectedItem();
noresults.Visible = false;
}
else // No matching actions, hide line command list and tell the user that there are no matches
{
commandlist.Visible = false;
noresults.Visible = true;
Height = noresults.Location.Y + noresults.Height + noresults.Margin.Left * 2;
}
commandlist.EndUpdate();
}
#endregion
#region ================== Events
private void commandsearch_TextChanged(object sender, EventArgs e)
{
string searchtext = commandsearch.Text.Trim();
if (string.IsNullOrWhiteSpace(searchtext))
FillCommandList(withrecent: true);
else
FillCommandList(searchtext);
}
/// <summary>
/// Handles certain special keys. Esc will close the palette, the Up and Down keys will change the selection, and Enter will start the command.
/// </summary>
/// <param name="sender">The sender</param>
/// <param name="e">The event args</param>
private void commandsearch_KeyDown(object sender, KeyEventArgs e)
{
switch(e.KeyCode)
{
case Keys.Escape:
case Keys.Down:
case Keys.Up:
case Keys.PageDown:
case Keys.PageUp:
//case Keys.End:
//case Keys.Home:
case Keys.Enter:
e.Handled = true;
e.SuppressKeyPress = true;
break;
}
if (e.KeyCode == Keys.Escape)
HidePalette(this, EventArgs.Empty);
else if (e.KeyCode == Keys.Down)
SetSelectedItem(1, true);
else if (e.KeyCode == Keys.Up)
SetSelectedItem(-1, true);
else if (e.KeyCode == Keys.PageDown)
SetSelectedItem(MAX_ITEMS - 1, false);
else if (e.KeyCode == Keys.PageUp)
SetSelectedItem(-MAX_ITEMS + 1, false);
//else if (e.KeyCode == Keys.End)
// SetSelectedItem(commandlist.Items.Count, false);
//else if (e.KeyCode == Keys.Home)
// SetSelectedItem(0, false);
else if (e.KeyCode == Keys.Enter)
{
if (commandlist.Items.Count > 0)
{
HidePalette(this, EventArgs.Empty);
RunAction((Actions.Action)commandlist.SelectedItems[0].Tag);
}
}
}
/// <summary>
/// Run the command that was clicked on
/// </summary>
/// <param name="sender">The sender</param>
/// <param name="e">The event args</param>
private void commandlist_ItemActivate(object sender, EventArgs e)
{
HidePalette(this, EventArgs.Empty);
RunAction((Actions.Action)commandlist.SelectedItems[0].Tag);
}
#endregion
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -417,7 +417,7 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd
public void ApplyUserVars(Dictionary<string, UniversalType> vars, UniFields tofields)
public void ApplyUserVars(Dictionary<string, UniversalType> vars, Dictionary<string, object> vardefaults, UniFields tofields)
{
// Apply user variables when target map element contains user var definition and the value is not default
foreach(DataGridViewRow row in fieldslist.Rows)
@ -434,8 +434,11 @@ namespace CodeImp.DoomBuilder.Controls
// Skip field when mixed values
if(newvalue == null) continue;
// Remove field
if(newvalue.Equals(frow.TypeHandler.GetDefaultValue()))
object typedefault = frow.TypeHandler.GetDefaultValue();
object userdefault = vardefaults.ContainsKey(frow.Name) ? vardefaults[frow.Name] : typedefault;
// Remove field, but only if the type's default value is the same as the user var's default value
if (newvalue.Equals(typedefault) && typedefault.Equals(userdefault))
{
if(tofields.ContainsKey(frow.Name)) tofields.Remove(frow.Name);
}
@ -981,6 +984,50 @@ namespace CodeImp.DoomBuilder.Controls
if(frow != null && frow.RowType == FieldsEditorRowType.FIXED) frow.Visible = showfixedfields;
}
}
/// <summary>
/// Removes an field by its name.
/// </summary>
/// <param name="name">Name of the field to remove</param>
public void RemoveField(string name)
{
int index = -1;
foreach(DataGridViewRow dgvr in fieldslist.Rows)
{
if(dgvr.Cells[0].Value.ToString().ToLowerInvariant() == name.ToLowerInvariant())
{
index = dgvr.Index;
break;
}
}
if (index >= 0)
fieldslist.Rows.RemoveAt(index);
}
/// <summary>
/// Removes all user vars that have their default values.
/// </summary>
public void RemoveUserVarsWithDefaultValue()
{
List<int> removeindices = new List<int>();
// Go through all rows and find the ones to remove. We can't remove them immediately since that would
// change the collection while the loop is going through it.
foreach (DataGridViewRow dgvr in fieldslist.Rows)
{
if(dgvr is FieldsEditorRow frow)
{
if (frow.RowType == FieldsEditorRowType.USERVAR && frow.Info != null && frow.TypeHandler.GetValue().Equals(frow.Info.Default))
removeindices.Add(dgvr.Index);
}
}
// Remove rows. Do it from behind since otherwise the indices would not match
for (int i = removeindices.Count - 1; i >= 0; i--)
fieldslist.Rows.RemoveAt(removeindices[i]);
}
#endregion
}

View file

@ -132,6 +132,9 @@ namespace CodeImp.DoomBuilder.Controls
isdefined = false;
//fieldtype.ApplyDefaultValue(); // [ZZ] don't do this. this is only done for int, and not a very good place to do it...
// We need to remember the default value of the user var
fieldinfo = new UniversalFieldInfo(name, type, value);
// Setup property cell
this.Cells[0].Value = name;
this.Cells[0].ReadOnly = true;

View file

@ -202,6 +202,7 @@ namespace CodeImp.DoomBuilder.Controls
General.Settings.WriteSetting(settingpath + ".classicview", classicview.Checked);
General.Settings.WriteSetting(settingpath + ".verticallycenteritem", list.CenterItem);
General.Settings.WriteSetting(settingpath + ".imagesize", list.ImageSize);
General.Settings.WriteSetting(settingpath + ".texturetype", texturetype);
if (General.Map.Config.UseLongTextureNames) General.Map.Options.UseLongTextureNames = uselongtexturenames;
@ -661,9 +662,9 @@ namespace CodeImp.DoomBuilder.Controls
//if (!splitter.Panel2Collapsed)
{
if (texturetype == 0 && previtem != null && item.TextureName == previtem.TextureName) return false;
if (texturetype == 1 && item.Icon.IsFlat) return false;
if (texturetype == 2 && !item.Icon.IsFlat) return false;
if (texturetype == 3 && (browseflats != item.Icon.IsFlat)) return false;
if (texturetype == 1 && item.Icon.TextureNamespace == TextureNamespace.FLAT) return false;
if (texturetype == 2 && !(item.Icon.TextureNamespace == TextureNamespace.FLAT)) return false;
if (texturetype == 3 && (browseflats != (item.Icon.TextureNamespace == TextureNamespace.FLAT))) return false;
}
//else if (previtem != null && item.TextureName == previtem.TextureName) return false;

View file

@ -7,6 +7,7 @@ using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Data;
#endregion
@ -732,7 +733,7 @@ namespace CodeImp.DoomBuilder.Controls
private static Image GetPreview(ImageBrowserItem item, int imagesize)
{
if(!item.IsPreviewLoaded) return item.Icon.GetPreview();
Dictionary<int, Dictionary<long, Image>> cache = item.Icon.IsFlat ? flatcache : texturecache;
Dictionary<int, Dictionary<long, Image>> cache = (item.Icon.TextureNamespace == TextureNamespace.FLAT) ? flatcache : texturecache;
if(!cache.ContainsKey(imagesize)) cache.Add(imagesize, new Dictionary<long, Image>());

View file

@ -28,100 +28,68 @@ namespace CodeImp.DoomBuilder.Controls
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResourceListEditor));
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
"C:\\Windows\\Doom\\Doom2.wad"}, 3, System.Drawing.SystemColors.GrayText, System.Drawing.SystemColors.Window, null);
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
"C:\\My\\Little\\Textures\\"}, 2, System.Drawing.SystemColors.GrayText, System.Drawing.SystemColors.Window, null);
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("C:\\My\\Little\\Pony.wad", 1);
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResourceListEditor));
this.editresource = new System.Windows.Forms.Button();
this.deleteresources = new System.Windows.Forms.Button();
this.addresource = new System.Windows.Forms.Button();
this.resourceitems = new CodeImp.DoomBuilder.Controls.ResourceListView();
this.column = new System.Windows.Forms.ColumnHeader();
this.copypastemenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.copyresources = new System.Windows.Forms.ToolStripMenuItem();
this.cutresources = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.pasteresources = new System.Windows.Forms.ToolStripMenuItem();
this.replaceresources = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.removeresources = new System.Windows.Forms.ToolStripMenuItem();
this.images = new System.Windows.Forms.ImageList(this.components);
this.copypastemenu.SuspendLayout();
this.SuspendLayout();
//
// editresource
//
this.editresource.Enabled = false;
this.editresource.Location = new System.Drawing.Point(122, 140);
this.editresource.Name = "editresource";
this.editresource.Size = new System.Drawing.Size(136, 24);
this.editresource.TabIndex = 0;
this.editresource.Text = "Resource options...";
this.editresource.UseVisualStyleBackColor = true;
this.editresource.Click += new System.EventHandler(this.editresource_Click);
//
// deleteresources
//
this.deleteresources.Enabled = false;
this.deleteresources.Location = new System.Drawing.Point(259, 140);
this.deleteresources.Name = "deleteresources";
this.deleteresources.Size = new System.Drawing.Size(88, 24);
this.deleteresources.TabIndex = 0;
this.deleteresources.Text = "Remove";
this.deleteresources.UseVisualStyleBackColor = true;
this.deleteresources.Click += new System.EventHandler(this.deleteresources_Click);
//
// addresource
//
this.addresource.Location = new System.Drawing.Point(3, 140);
this.addresource.Name = "addresource";
this.addresource.Size = new System.Drawing.Size(118, 24);
this.addresource.TabIndex = 0;
this.addresource.Text = "Add resource...";
this.addresource.UseVisualStyleBackColor = true;
this.addresource.Click += new System.EventHandler(this.addresource_Click);
//
// resourceitems
//
this.resourceitems.AllowDrop = true;
this.resourceitems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.column});
this.resourceitems.ContextMenuStrip = this.copypastemenu;
this.resourceitems.FullRowSelect = true;
this.resourceitems.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.resourceitems.HideSelection = false;
this.resourceitems.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2,
listViewItem3});
this.resourceitems.Location = new System.Drawing.Point(0, 0);
this.resourceitems.Name = "resourceitems";
this.resourceitems.ShowGroups = false;
this.resourceitems.ShowItemToolTips = true;
this.resourceitems.Size = new System.Drawing.Size(350, 138);
this.resourceitems.SmallImageList = this.images;
this.resourceitems.TabIndex = 0;
this.resourceitems.UseCompatibleStateImageBehavior = false;
this.resourceitems.View = System.Windows.Forms.View.Details;
this.resourceitems.ClientSizeChanged += new System.EventHandler(this.resourceitems_ClientSizeChanged);
this.resourceitems.SizeChanged += new System.EventHandler(this.resources_SizeChanged);
this.resourceitems.DoubleClick += new System.EventHandler(this.resourceitems_DoubleClick);
this.resourceitems.DragDrop += new System.Windows.Forms.DragEventHandler(this.resourceitems_DragDrop);
this.resourceitems.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.resourceitems_ItemSelectionChanged);
this.resourceitems.KeyUp += new System.Windows.Forms.KeyEventHandler(this.resourceitems_KeyUp);
this.resourceitems.DragOver += new System.Windows.Forms.DragEventHandler(this.resourceitems_DragOver);
//
// column
//
this.column.Text = "Resource location";
this.column.Width = 200;
//
// copypastemenu
//
this.copypastemenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("C:\\My\\Little\\Pony.wad", 1);
this.editresource = new System.Windows.Forms.Button();
this.deleteresources = new System.Windows.Forms.Button();
this.addresource = new System.Windows.Forms.Button();
this.copypastemenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.copyresources = new System.Windows.Forms.ToolStripMenuItem();
this.cutresources = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.pasteresources = new System.Windows.Forms.ToolStripMenuItem();
this.replaceresources = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.removeresources = new System.Windows.Forms.ToolStripMenuItem();
this.images = new System.Windows.Forms.ImageList(this.components);
this.resourceitems = new CodeImp.DoomBuilder.Controls.ResourceListView();
this.column = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.copypastemenu.SuspendLayout();
this.SuspendLayout();
//
// editresource
//
this.editresource.Anchor = System.Windows.Forms.AnchorStyles.None;
this.editresource.Enabled = false;
this.editresource.Location = new System.Drawing.Point(122, 140);
this.editresource.Name = "editresource";
this.editresource.Size = new System.Drawing.Size(136, 24);
this.editresource.TabIndex = 0;
this.editresource.Text = "Resource options...";
this.editresource.UseVisualStyleBackColor = true;
this.editresource.Click += new System.EventHandler(this.editresource_Click);
//
// deleteresources
//
this.deleteresources.Anchor = System.Windows.Forms.AnchorStyles.None;
this.deleteresources.Enabled = false;
this.deleteresources.Location = new System.Drawing.Point(259, 140);
this.deleteresources.Name = "deleteresources";
this.deleteresources.Size = new System.Drawing.Size(88, 24);
this.deleteresources.TabIndex = 0;
this.deleteresources.Text = "Remove";
this.deleteresources.UseVisualStyleBackColor = true;
this.deleteresources.Click += new System.EventHandler(this.deleteresources_Click);
//
// addresource
//
this.addresource.Anchor = System.Windows.Forms.AnchorStyles.None;
this.addresource.Location = new System.Drawing.Point(3, 140);
this.addresource.Name = "addresource";
this.addresource.Size = new System.Drawing.Size(118, 24);
this.addresource.TabIndex = 0;
this.addresource.Text = "Add resource...";
this.addresource.UseVisualStyleBackColor = true;
this.addresource.Click += new System.EventHandler(this.addresource_Click);
//
// copypastemenu
//
this.copypastemenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.copyresources,
this.cutresources,
this.toolStripSeparator1,
@ -129,85 +97,121 @@ namespace CodeImp.DoomBuilder.Controls
this.replaceresources,
this.toolStripSeparator2,
this.removeresources});
this.copypastemenu.Name = "copypastemenu";
this.copypastemenu.Size = new System.Drawing.Size(118, 126);
this.copypastemenu.Opening += new System.ComponentModel.CancelEventHandler(this.copypastemenu_Opening);
//
// copyresources
//
this.copyresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
this.copyresources.Name = "copyresources";
this.copyresources.Size = new System.Drawing.Size(117, 22);
this.copyresources.Text = "Copy";
this.copyresources.Click += new System.EventHandler(this.copyresources_Click);
//
// cutresources
//
this.cutresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
this.cutresources.Name = "cutresources";
this.cutresources.Size = new System.Drawing.Size(117, 22);
this.cutresources.Text = "Cut";
this.cutresources.Click += new System.EventHandler(this.cutresources_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(114, 6);
//
// pasteresources
//
this.pasteresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
this.pasteresources.Name = "pasteresources";
this.pasteresources.Size = new System.Drawing.Size(117, 22);
this.pasteresources.Text = "Paste";
this.pasteresources.Click += new System.EventHandler(this.pasteresources_Click);
//
// replaceresources
//
this.replaceresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Replace;
this.replaceresources.Name = "replaceresources";
this.replaceresources.Size = new System.Drawing.Size(117, 22);
this.replaceresources.Text = "Replace";
this.replaceresources.Click += new System.EventHandler(this.replaceresources_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(114, 6);
//
// removeresources
//
this.removeresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear;
this.removeresources.Name = "removeresources";
this.removeresources.Size = new System.Drawing.Size(117, 22);
this.removeresources.Text = "Remove";
this.removeresources.Click += new System.EventHandler(this.removeresources_Click);
//
// images
//
this.images.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("images.ImageStream")));
this.images.TransparentColor = System.Drawing.Color.Transparent;
this.images.Images.SetKeyName(0, "Folder.ico");
this.images.Images.SetKeyName(1, "File.ico");
this.images.Images.SetKeyName(2, "PK3.ico");
this.images.Images.SetKeyName(3, "FolderLocked.ico");
this.images.Images.SetKeyName(4, "FileLocked.ico");
this.images.Images.SetKeyName(5, "PK3Locked.ico");
//
// ResourceListEditor
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.resourceitems);
this.Controls.Add(this.addresource);
this.Controls.Add(this.editresource);
this.Controls.Add(this.deleteresources);
this.Name = "ResourceListEditor";
this.Size = new System.Drawing.Size(350, 166);
this.Resize += new System.EventHandler(this.ResourceListEditor_Resize);
this.copypastemenu.ResumeLayout(false);
this.ResumeLayout(false);
this.copypastemenu.Name = "copypastemenu";
this.copypastemenu.Size = new System.Drawing.Size(118, 126);
this.copypastemenu.Opening += new System.ComponentModel.CancelEventHandler(this.copypastemenu_Opening);
//
// copyresources
//
this.copyresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
this.copyresources.Name = "copyresources";
this.copyresources.Size = new System.Drawing.Size(117, 22);
this.copyresources.Text = "Copy";
this.copyresources.Click += new System.EventHandler(this.copyresources_Click);
//
// cutresources
//
this.cutresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
this.cutresources.Name = "cutresources";
this.cutresources.Size = new System.Drawing.Size(117, 22);
this.cutresources.Text = "Cut";
this.cutresources.Click += new System.EventHandler(this.cutresources_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(114, 6);
//
// pasteresources
//
this.pasteresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
this.pasteresources.Name = "pasteresources";
this.pasteresources.Size = new System.Drawing.Size(117, 22);
this.pasteresources.Text = "Paste";
this.pasteresources.Click += new System.EventHandler(this.pasteresources_Click);
//
// replaceresources
//
this.replaceresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.Replace;
this.replaceresources.Name = "replaceresources";
this.replaceresources.Size = new System.Drawing.Size(117, 22);
this.replaceresources.Text = "Replace";
this.replaceresources.Click += new System.EventHandler(this.replaceresources_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(114, 6);
//
// removeresources
//
this.removeresources.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear;
this.removeresources.Name = "removeresources";
this.removeresources.Size = new System.Drawing.Size(117, 22);
this.removeresources.Text = "Remove";
this.removeresources.Click += new System.EventHandler(this.removeresources_Click);
//
// images
//
this.images.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("images.ImageStream")));
this.images.TransparentColor = System.Drawing.Color.Transparent;
this.images.Images.SetKeyName(0, "Folder.ico");
this.images.Images.SetKeyName(1, "File.ico");
this.images.Images.SetKeyName(2, "PK3.ico");
this.images.Images.SetKeyName(3, "FolderLocked.ico");
this.images.Images.SetKeyName(4, "FileLocked.ico");
this.images.Images.SetKeyName(5, "PK3Locked.ico");
this.images.Images.SetKeyName(6, "Loader.gif");
//
// resourceitems
//
this.resourceitems.AllowDrop = true;
this.resourceitems.Anchor = System.Windows.Forms.AnchorStyles.None;
this.resourceitems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.column});
this.resourceitems.ContextMenuStrip = this.copypastemenu;
this.resourceitems.FullRowSelect = true;
this.resourceitems.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.resourceitems.HideSelection = false;
this.resourceitems.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2,
listViewItem3});
this.resourceitems.Location = new System.Drawing.Point(0, 0);
this.resourceitems.Name = "resourceitems";
this.resourceitems.ShowGroups = false;
this.resourceitems.ShowItemToolTips = true;
this.resourceitems.Size = new System.Drawing.Size(350, 138);
this.resourceitems.SmallImageList = this.images;
this.resourceitems.TabIndex = 0;
this.resourceitems.UseCompatibleStateImageBehavior = false;
this.resourceitems.View = System.Windows.Forms.View.Details;
this.resourceitems.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.resourceitems_ItemSelectionChanged);
this.resourceitems.ClientSizeChanged += new System.EventHandler(this.resourceitems_ClientSizeChanged);
this.resourceitems.SizeChanged += new System.EventHandler(this.resources_SizeChanged);
this.resourceitems.DragDrop += new System.Windows.Forms.DragEventHandler(this.resourceitems_DragDrop);
this.resourceitems.DragOver += new System.Windows.Forms.DragEventHandler(this.resourceitems_DragOver);
this.resourceitems.DoubleClick += new System.EventHandler(this.resourceitems_DoubleClick);
this.resourceitems.KeyUp += new System.Windows.Forms.KeyEventHandler(this.resourceitems_KeyUp);
//
// column
//
this.column.Text = "Resource location";
this.column.Width = 200;
//
// ResourceListEditor
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.resourceitems);
this.Controls.Add(this.addresource);
this.Controls.Add(this.editresource);
this.Controls.Add(this.deleteresources);
this.Name = "ResourceListEditor";
this.Size = new System.Drawing.Size(350, 166);
this.copypastemenu.ResumeLayout(false);
this.ResumeLayout(false);
}

View file

@ -20,7 +20,10 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Windows;
@ -30,11 +33,30 @@ namespace CodeImp.DoomBuilder.Controls
{
internal partial class ResourceListEditor : UserControl
{
#region ================== Internal warning struct
class Warning
{
public Panel Wrapper;
public PictureBox Picture;
public Label Text;
public Warning(Panel wrapper, PictureBox picture, Label text)
{
Wrapper = wrapper;
Picture = picture;
Text = text;
}
}
#endregion
#region ================== Delegates / Events
public delegate void ContentChanged();
public delegate void WarningsChanged(int size);
public event ContentChanged OnContentChanged;
public event WarningsChanged OnWarningsChanged;
public string StartPath; //mxd
public bool IsMapControl = false;
#endregion
@ -47,12 +69,15 @@ namespace CodeImp.DoomBuilder.Controls
private readonly int pasteactionkey;
private readonly int pastespecialactionkey;
private readonly int deleteactionkey;
private readonly Dictionary<string, CancellationTokenSource> loadingrequiredarchives;
private readonly List<Warning> warnings;
#endregion
#region ================== Properties
public Point DialogOffset { get { return dialogoffset; } set { dialogoffset = value; } }
public GameConfiguration GameConfiguration { get; set; }
#endregion
@ -64,8 +89,11 @@ namespace CodeImp.DoomBuilder.Controls
// Initialize
InitializeComponent();
ResizeColumnHeader();
if(General.Actions != null)
loadingrequiredarchives = new Dictionary<string, CancellationTokenSource>();
warnings = new List<Warning>();
if (General.Actions != null)
{
// Get key shortcuts (mxd)
copyactionkey = General.Actions.GetActionByName("builder_copyselection").ShortcutKey;
@ -85,6 +113,9 @@ namespace CodeImp.DoomBuilder.Controls
// Start with a clear list
resourceitems.Items.Clear();
copiedresources = new DataLocationList(); //mxd
Resize += HandleResize;
HandleResize(null, null);
}
#endregion
@ -109,6 +140,257 @@ namespace CodeImp.DoomBuilder.Controls
default: return -1;
}
}
private List<string> RunCheckRequiredArchives(DataLocation loc, CancellationToken token)
{
return ResourceOptionsForm.CheckRequiredArchives(GameConfiguration, loc, token);
}
private async void StartRequiredArchivesCheck(string location)
{
if (GameConfiguration == null) return;
DataLocation loc = new DataLocation();
bool found = false;
foreach (ListViewItem item in resourceitems.Items)
{
DataLocation dl = (DataLocation)item.Tag;
if (dl.location == location)
{
loc = dl;
found = true;
break;
}
}
if (!found) return;
var cancellation = new CancellationTokenSource();
General.WriteLogLine(string.Format("Resource check started for: {0}", loc.location));
loadingrequiredarchives.Add(location, cancellation);
RefreshLoading();
try
{
loc.requiredarchives = await Task.Run(() => RunCheckRequiredArchives(loc, cancellation.Token));
// in case of dir, option1/2 should be erased
if (loc.type == DataLocation.RESOURCE_DIRECTORY)
loc.option1 = loc.option2 = false;
// check if it has to be force-excluded from testing
foreach (var arc in GameConfiguration.RequiredArchives)
{
if (loc.requiredarchives.Contains(arc.ID) && arc.ExcludeFromTesting)
loc.notfortesting = true;
}
foreach (ListViewItem item in resourceitems.Items)
{
if (((DataLocation)item.Tag).location == location)
{
item.Tag = loc;
if (OnContentChanged != null) OnContentChanged();
break;
}
}
}
catch (Exception e)
{
loc.requiredarchives = new List<string>();
General.WriteLogLine(e.ToString());
}
cancellation.Dispose();
// Loading might have been canceled outside of here, so make sure that the location is still in the list.
// See https://github.com/jewalky/UltimateDoomBuilder/issues/813
if (loadingrequiredarchives.ContainsKey(location) && loadingrequiredarchives[location] == cancellation)
{
General.WriteLogLine(string.Format("Resource check completed for: {0} (Match = {1}, RequiredArchives = {2})", location, loadingrequiredarchives[location] == cancellation, string.Join(",", loc.requiredarchives)));
loadingrequiredarchives.Remove(location);
RefreshLoading();
}
// if nothing is loading, update warnings if any
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
}
private void ShowWarning(string text, bool loading)
{
Panel p = new Panel();
Controls.Add(p);
// find offset
int lastTop = 0;
foreach (Warning w in warnings)
lastTop = Math.Max(lastTop, w.Wrapper.Bottom + 8);
p.Top = lastTop;
p.Left = 0;
p.Width = Width;
p.Height = 48;
p.BackColor = SystemColors.Info;
p.BorderStyle = BorderStyle.FixedSingle;
p.ForeColor = SystemColors.InfoText;
PictureBox pb = new PictureBox();
pb.Width = 16;
pb.Height = 16;
pb.Left = 8;
pb.Top = 8;
pb.Image = loading ? Properties.Resources.Loader: Properties.Resources.Warning;
p.Controls.Add(pb);
Label l = new Label();
l.Left = 8 + 16 + 8;
l.Top = 10;
l.MinimumSize = new Size(Width - 32 - 8, 0);
l.MaximumSize = new Size(Width - 32 - 8, 640);
l.Width = l.MinimumSize.Width;
l.Height = 48;
l.Text = text;
l.AutoSize = true;
p.Controls.Add(l);
// resize panel
p.Height = 22 + l.Height;
Controls.SetChildIndex(p, 0);
warnings.Add(new Warning(p, pb, l));
lastTop = p.Bottom + 8;
resourceitems.Height = Height - lastTop - 32;
resourceitems.Top = lastTop;
}
private int GetWarningsHeight()
{
int lastTop = 0;
foreach (Warning w in warnings)
lastTop = Math.Max(lastTop, w.Wrapper.Bottom + 8);
return lastTop;
}
private void UpdateWarnings()
{
int lastH = GetWarningsHeight();
foreach (Warning w in warnings)
w.Wrapper.Dispose();
warnings.Clear();
HandleResize(this, null);
List<string> requiredarchives = new List<string>();
foreach (ListViewItem item in resourceitems.Items)
{
DataLocation loc = (DataLocation)item.Tag;
if (loc.requiredarchives != null)
requiredarchives.AddRange(loc.requiredarchives);
}
General.WriteLogLine(string.Format("Archive check: RequiredArchives = {0}", string.Join(",", requiredarchives)));
// warning 1: you do not have a required file
if (GameConfiguration != null)
{
foreach (RequiredArchive arc in GameConfiguration.RequiredArchives)
{
if (!requiredarchives.Contains(arc.ID))
ShowWarning(string.Format("Warning: a resource archive is required for this game configuration, but not present:\n \"{0}\"\nWithout it, UDB will have severely limited capabilities.", arc.FileName), false);
}
}
// warning 2: map without any resources. this makes sense only on map open dialog and not game configurations dialog
if (IsMapControl)
{
if (resourceitems.Items.Count == 0)
ShowWarning("Warning: you are about to edit a map without any resources.\nTextures, flats and sprites may not be shown correctly or may not show up at all.", false);
}
// warning 3: multiple instances of the same required file
if (GameConfiguration != null)
{
for (int i = 0; i < requiredarchives.Count; i++)
{
if (requiredarchives.IndexOf(requiredarchives[i]) != i)
{
foreach (RequiredArchive arc in GameConfiguration.RequiredArchives)
{
if (arc.ID == requiredarchives[i])
ShowWarning(string.Format("Warning: required archive was added more than once:\n \"{0}\"\nThis will most likely not work.", arc.FileName), false);
}
}
}
}
int h = GetWarningsHeight();
if (lastH != h && OnWarningsChanged != null)
{
OnWarningsChanged(h);
// possibly recalculate size
HandleResize(this, null);
}
}
private void RefreshLoading()
{
resourceitems.BeginUpdate();
bool anyLoading = false;
foreach (ListViewItem item in resourceitems.Items)
{
DataLocation dl = (DataLocation)item.Tag;
if (IsLoading(dl.location))
{
item.ImageIndex = GetLoaderIndex();
anyLoading |= true;
}
else item.ImageIndex = GetIconIndex(dl.type, item.ForeColor != SystemColors.WindowText);
}
resourceitems.EndUpdate();
if (anyLoading)
{
foreach (Warning w in warnings)
w.Picture.Image = Properties.Resources.Loader;
}
else
{
foreach (Warning w in warnings)
w.Picture.Image = Properties.Resources.Warning;
}
}
private void CancelLoading(string location)
{
General.WriteLogLine(string.Format("Resource check cancelled for: {0}", location));
if (loadingrequiredarchives.ContainsKey(location))
{
loadingrequiredarchives[location].Cancel();
loadingrequiredarchives.Remove(location);
}
}
private bool IsLoading(string location)
{
return loadingrequiredarchives.ContainsKey(location);
}
private int GetLoaderIndex()
{
return 6;
}
// This will show a fixed list
public void FixedResourceLocationList(DataLocationList list)
@ -123,8 +405,11 @@ namespace CodeImp.DoomBuilder.Controls
for(int i = resourceitems.Items.Count - 1; i >= 0; i--)
{
// Remove item if not fixed
if(resourceitems.Items[i].ForeColor != SystemColors.WindowText)
if (resourceitems.Items[i].ForeColor != SystemColors.WindowText)
{
CancelLoading(((DataLocation)resourceitems.Items[i].Tag).location);
resourceitems.Items.RemoveAt(i);
}
else
currentitems.Add((DataLocation)resourceitems.Items[i].Tag); //mxd
}
@ -138,17 +423,25 @@ namespace CodeImp.DoomBuilder.Controls
// Add item as fixed
resourceitems.Items.Insert(0, new ListViewItem(list[i].location));
resourceitems.Items[0].Tag = list[i];
resourceitems.Items[0].ImageIndex = GetIconIndex(list[i].type, true);
resourceitems.Items[0].ImageIndex = IsLoading(list[i].location) ? GetLoaderIndex() : GetIconIndex(list[i].type, true);
// Set disabled
resourceitems.Items[0].ForeColor = SystemColors.GrayText;
// Validate path (mxd)
resourceitems.Items[0].BackColor = (list[i].IsValid() ? resourceitems.BackColor : Color.MistyRose);
// Check if resource has no info about membership in Game configuration's requiredarchives
// This normally happens if it was imported from old DBS or drag-dropped
if (list[i].requiredarchives == null)
StartRequiredArchivesCheck(list[i].location);
}
// Done
resourceitems.EndUpdate();
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
}
// This will edit the given list
@ -165,8 +458,11 @@ namespace CodeImp.DoomBuilder.Controls
for(int i = resourceitems.Items.Count - 1; i >= 0; i--)
{
// Remove item unless fixed
if(resourceitems.Items[i].ForeColor == SystemColors.WindowText)
if (resourceitems.Items[i].ForeColor == SystemColors.WindowText)
{
CancelLoading(((DataLocation)resourceitems.Items[i].Tag).location);
resourceitems.Items.RemoveAt(i);
}
}
// Go for all items
@ -176,6 +472,9 @@ namespace CodeImp.DoomBuilder.Controls
AddItem(dl);
}
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
// Done
resourceitems.EndUpdate();
ResizeColumnHeader();
@ -208,7 +507,7 @@ namespace CodeImp.DoomBuilder.Controls
int index = resourceitems.Items.Count;
resourceitems.Items.Add(new ListViewItem(rl.location));
resourceitems.Items[index].Tag = rl;
resourceitems.Items[index].ImageIndex = GetIconIndex(rl.type, false);
resourceitems.Items[index].ImageIndex = IsLoading(rl.location) ? GetLoaderIndex() : GetIconIndex(rl.type, false);
// Set normal color
resourceitems.Items[index].ForeColor = SystemColors.WindowText;
@ -218,6 +517,12 @@ namespace CodeImp.DoomBuilder.Controls
// Done
resourceitems.EndUpdate();
// Check if resource has no info about membership in Game configuration's requiredarchives
// This normally happens if it was imported from old DBS or drag-dropped
if (rl.requiredarchives == null)
StartRequiredArchivesCheck(rl.location);
return true;
}
@ -240,6 +545,7 @@ namespace CodeImp.DoomBuilder.Controls
{
// Open resource options dialog
ResourceOptionsForm resoptions = new ResourceOptionsForm(new DataLocation(), "Add Resource", StartPath);
resoptions.GameConfiguration = GameConfiguration;
resoptions.StartPosition = FormStartPosition.Manual;
Rectangle startposition = new Rectangle(dialogoffset.X, dialogoffset.Y, 1, 1);
startposition = this.RectangleToScreen(startposition);
@ -257,6 +563,9 @@ namespace CodeImp.DoomBuilder.Controls
General.Interface.DisplayStatus(StatusType.Warning, "Resource already added!"); //mxd
return; //mxd
}
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
}
// Raise content changed event
@ -274,6 +583,7 @@ namespace CodeImp.DoomBuilder.Controls
// Open resource options dialog
ResourceOptionsForm resoptions = new ResourceOptionsForm((DataLocation)selecteditem.Tag, "Resource Options", StartPath);
resoptions.GameConfiguration = GameConfiguration;
resoptions.StartPosition = FormStartPosition.Manual;
Rectangle startposition = new Rectangle(dialogoffset.X, dialogoffset.Y, 1, 1);
startposition = this.RectangleToScreen(startposition);
@ -292,13 +602,20 @@ namespace CodeImp.DoomBuilder.Controls
DataLocation rl = resoptions.ResourceLocation;
selecteditem.Text = rl.location;
selecteditem.Tag = rl;
selecteditem.ImageIndex = GetIconIndex(rl.type, false);
selecteditem.ImageIndex = IsLoading(rl.location) ? GetLoaderIndex() : GetIconIndex(rl.type, false);
// Done
resourceitems.EndUpdate();
// Check if resource has no info about membership in Game configuration's requiredarchives
// This normally happens if it was imported from old DBS or drag-dropped
if (rl.requiredarchives == null)
StartRequiredArchivesCheck(rl.location);
else if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
if (OnContentChanged != null) OnContentChanged();
}
}
}
@ -402,19 +719,19 @@ namespace CodeImp.DoomBuilder.Controls
{
case ".wad":
case ".iwad":
if(AddItem(new DataLocation(DataLocation.RESOURCE_WAD, path, false, false, false))) addedfiles++;
if(AddItem(new DataLocation(DataLocation.RESOURCE_WAD, path, false, false, false, null))) addedfiles++;
break;
case ".pk7":
case ".pk3":
case ".ipk3":
case ".ipk7":
if(AddItem(new DataLocation(DataLocation.RESOURCE_PK3, path, false, false, false))) addedfiles++;
if(AddItem(new DataLocation(DataLocation.RESOURCE_PK3, path, false, false, false, null))) addedfiles++;
break;
}
}
else if(Directory.Exists(path))
{
if(AddItem(new DataLocation(DataLocation.RESOURCE_DIRECTORY, path, false, false, false))) addedfiles++;
if(AddItem(new DataLocation(DataLocation.RESOURCE_DIRECTORY, path, false, false, false, null))) addedfiles++;
}
}
@ -424,9 +741,12 @@ namespace CodeImp.DoomBuilder.Controls
return;
}
}
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
if (OnContentChanged != null) OnContentChanged();
}
// Client size changed
@ -469,8 +789,11 @@ namespace CodeImp.DoomBuilder.Controls
// Display notification
General.Interface.DisplayStatus(StatusType.Info, pastedcount + " Resource" + (pastedcount > 1 ? "s" : "") + " Pasted");
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
if (OnContentChanged != null) OnContentChanged();
}
}
@ -500,8 +823,11 @@ namespace CodeImp.DoomBuilder.Controls
// Display notification
General.Interface.DisplayStatus(StatusType.Info, pastedcount + " Resource" + (pastedcount > 1 ? "s" : "") + " Replaced");
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
if (OnContentChanged != null) OnContentChanged();
}
}
@ -519,8 +845,11 @@ namespace CodeImp.DoomBuilder.Controls
ResizeColumnHeader();
if (loadingrequiredarchives.Count == 0)
UpdateWarnings();
// Raise content changed event
if(OnContentChanged != null) OnContentChanged();
if (OnContentChanged != null) OnContentChanged();
}
#endregion
@ -580,14 +909,19 @@ namespace CodeImp.DoomBuilder.Controls
#endregion
#region ================== Events (mxd)
//mxd. Because anchor-based alignment fails when using high-Dpi settings...
private void ResourceListEditor_Resize(object sender, EventArgs e)
private void HandleResize(object sender, EventArgs e)
{
int warningsH = GetWarningsHeight();
resourceitems.Width = this.Width;
resourceitems.Height = this.Height - addresource.Height - addresource.Margin.Top - addresource.Margin.Bottom;
resourceitems.Top = warningsH;
resourceitems.Left = 0;
resourceitems.Height = this.Height - addresource.Height - addresource.Margin.Top - addresource.Margin.Bottom - resourceitems.Top;
addresource.Top = resourceitems.Bottom + addresource.Margin.Top;
editresource.Top = addresource.Top;
deleteresources.Top = addresource.Top;

View file

@ -112,120 +112,141 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="copypastemenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="copypastemenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>195, 17</value>
</metadata>
<metadata name="images.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="images.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="images.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAi
FgAAAk1TRnQBSQFMAgEBBgEAAZwBAAGcAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABIAMAAQEBAAEgBgABIDcAApYB/wEAApYB/wEAAkAB/wEAAkAB/wEAAkAB/wEAAkAB/y0AApYB/wEA
ApYB/wEAAkAB/wEAAkAB/wEAAkAB/wEAAkAB/5QAA4UB/wOFAf8DhQH/A4UB/wEAArkB/wEAApYB/wEA
ApYB/wEAAoEB/wEAAoEB/wEAAkAB/xAAA4AB/wOBAf8DgAH/A4AB/wOBAf8DgQH/A4AB/wEAArkB/wEA
ApYB/wEAApYB/wEAAoEB/wEAAoEB/wEAAkAB/5AAA4UB/wOFAf8DxgH/A8kB/wPGAf8BAAK5Af8DoAH/
A2oB/wNqAf8BAAKBAf8BAAJAAf8MAAOAAf8DVAH/A4AB/wOVAf8DyQH/A9oB/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8DCAH/AwgB/wMIAf8DCAH/FwAB/wE+ASIBAAH/AZ8BggEhAf8B2wHH
AZAB/wHmAdcBtAH/AeYB1wG0Af8B5gHXAbQB/wHmAdcBtAH/AeAB1QGxAf8BtAGuAY8B/wFLAT8BHAH/
AQ4BAQEAAf8DAAH/0wAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf9IAAFC
AU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/AQAB/wGBAf8BwAH4AR8CAAH4AQEB4AEA
AeABBwIAAfABAQHAAQABwAEDAgAB4AEBAYABAAGAAQECAAHAAQEB4AEAAYMBwQIAAcABAQHAAQABBwHg
AgABwAEBAcABAAEPAfACAAHAAQMBwAEhAQ8B8AIAAcABBwHAASMBDwHwAgABwAEHAcABIwEPAfACAAHA
AQcBwAEjAQcB4AIAAcABBwHAASMBgwHBAgABwAEHAcABIwGAAQECAAHAAQcBgAEBAcABAwIAAcABBwHA
AQEB4AEHAgAC/wHgAQMB+AEfAgAF/wHDAf8BgQL/AfgBBwHgAQEB/wGBAQABBwHwAQcBwAEBAQABAQEA
AQMB4AEHAYABAQEAAQEBAAEDAcABBwHgASMBAAEBAQABAQHAAQcBwAEjAQABAQEAAQEBwAEHAcABIwEA
AQECAAHAAQcBwAEjBAABwAEHAcABIwQAAcABBwHAASMDAAEHAcABBwHAASMBAAEHAQABBwHAAQcBwAEj
AQABBwEAAf8BwAEHAcABIwEAAf8BgQH/AcABBwGAAQEBgQP/AcABBwHAAQEG/wHgAQMC/ws=
</value>
</data>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,111 @@
namespace CodeImp.DoomBuilder.Controls
{
partial class SidedefPartLightControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lbLight = new System.Windows.Forms.Label();
this.cbAbsolute = new System.Windows.Forms.CheckBox();
this.reset = new System.Windows.Forms.Button();
this.light = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.SuspendLayout();
//
// lbLight
//
this.lbLight.Location = new System.Drawing.Point(3, 6);
this.lbLight.Name = "lbLight";
this.lbLight.Size = new System.Drawing.Size(92, 14);
this.lbLight.TabIndex = 29;
this.lbLight.Tag = "";
this.lbLight.Text = "Brightness:";
this.lbLight.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// cbAbsolute
//
this.cbAbsolute.AutoSize = true;
this.cbAbsolute.Location = new System.Drawing.Point(167, 7);
this.cbAbsolute.Name = "cbAbsolute";
this.cbAbsolute.Size = new System.Drawing.Size(67, 17);
this.cbAbsolute.TabIndex = 31;
this.cbAbsolute.Tag = "lightabsolute";
this.cbAbsolute.Text = "Absolute";
this.cbAbsolute.UseVisualStyleBackColor = true;
this.cbAbsolute.CheckedChanged += new System.EventHandler(this.cbAbsolute_CheckedChanged);
//
// reset
//
this.reset.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset;
this.reset.Location = new System.Drawing.Point(236, 3);
this.reset.Name = "reset";
this.reset.Size = new System.Drawing.Size(23, 23);
this.reset.TabIndex = 32;
this.reset.UseVisualStyleBackColor = true;
this.reset.Click += new System.EventHandler(this.reset_Click);
//
// light
//
this.light.AllowDecimal = false;
this.light.AllowExpressions = false;
this.light.AllowNegative = true;
this.light.AllowRelative = true;
this.light.ButtonStep = 16;
this.light.ButtonStepBig = 32F;
this.light.ButtonStepFloat = 1F;
this.light.ButtonStepSmall = 1F;
this.light.ButtonStepsUseModifierKeys = true;
this.light.ButtonStepsWrapAround = false;
this.light.Location = new System.Drawing.Point(99, 2);
this.light.Name = "light";
this.light.Size = new System.Drawing.Size(62, 24);
this.light.StepValues = null;
this.light.TabIndex = 30;
this.light.Tag = "";
this.light.WhenTextChanged += new System.EventHandler(this.light_WhenTextChanged);
//
// SidedefPartLightControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.reset);
this.Controls.Add(this.light);
this.Controls.Add(this.lbLight);
this.Controls.Add(this.cbAbsolute);
this.Name = "SidedefPartLightControl";
this.Size = new System.Drawing.Size(262, 29);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button reset;
private ButtonsNumericTextbox light;
private System.Windows.Forms.Label lbLight;
private System.Windows.Forms.CheckBox cbAbsolute;
}
}

View file

@ -0,0 +1,250 @@
#region ================== Copyright (c) 2020 Boris Iwanski
/*
* This program is free software: you can redistribute it and/or modify
*
* it under the terms of the GNU General Public License as published by
*
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program.If not, see<http://www.gnu.org/licenses/>.
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Types;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.VisualModes;
using CodeImp.DoomBuilder.Windows;
#endregion
namespace CodeImp.DoomBuilder.Controls
{
public partial class SidedefPartLightControl : UserControl
{
#region ================== Variables
private string fieldname;
private string fieldabsolutename;
private List<Sidedef> sidedefs;
private Dictionary<Sidedef, int> originallight;
private Dictionary<Sidedef, bool> originalabsolute;
private bool preventchanges;
#endregion
#region ================== Constructors
public SidedefPartLightControl()
{
InitializeComponent();
}
#endregion
#region ================== Methods
/// <summary>
/// Sets up the control for the specified geometry type.
/// </summary>
/// <param name="geometrytype">Geometry type to set up the control with</param>
public void Setup(VisualGeometryType geometrytype)
{
fieldname = string.Empty;
fieldabsolutename = string.Empty;
sidedefs = new List<Sidedef>();
originallight = new Dictionary<Sidedef, int>();
originalabsolute = new Dictionary<Sidedef, bool>();
// Do not trigger the events that usually fire when textboxes or checkboxes are changed
preventchanges = true;
switch (geometrytype)
{
case VisualGeometryType.WALL_UPPER:
fieldname = "light_top";
fieldabsolutename = "lightabsolute_top";
lbLight.Text = "Upper brightness:";
break;
case VisualGeometryType.WALL_MIDDLE:
case VisualGeometryType.WALL_MIDDLE_3D:
fieldname = "light_mid";
fieldabsolutename = "lightabsolute_mid";
lbLight.Text = "Middle brightness:";
break;
case VisualGeometryType.WALL_LOWER:
fieldname = "light_bottom";
fieldabsolutename = "lightabsolute_bottom";
lbLight.Text = "Lower brightness:";
break;
default:
throw new NotImplementedException("Unsupported geometry type: " + Enum.GetName(typeof(VisualGeometryType), geometrytype));
}
}
/// <summary>
/// Sets the light value and absolute stats of the control.
/// </summary>
/// <param name="sidedef">Sidedef to use the values of</param>
/// <param name="first">If this is the first sidedef</param>
public void SetValues(Sidedef sidedef, bool first)
{
if (!sidedefs.Contains(sidedef))
sidedefs.Add(sidedef);
originallight[sidedef] = sidedef.Fields.GetValue(fieldname, 0);
originalabsolute[sidedef] = sidedef.Fields.GetValue(fieldabsolutename, false);
string lightvalue = originallight[sidedef].ToString();
bool isabsolute = sidedef.Fields.GetValue(fieldabsolutename, false);
if (first)
{
light.Text = lightvalue;
cbAbsolute.Checked = isabsolute;
}
else
{
if (light.Text != lightvalue)
light.Text = string.Empty;
if (cbAbsolute.Checked != isabsolute)
{
cbAbsolute.ThreeState = true;
cbAbsolute.CheckState = CheckState.Indeterminate;
}
}
}
/// <summary>
/// Finalize the control's setup, setting visibility of child controls and enable state
/// </summary>
public void FinalizeSetup()
{
reset.Visible = (cbAbsolute.CheckState != CheckState.Unchecked || light.GetResult(0) != 0);
if (!General.Map.Config.DistinctSidedefPartBrightness)
{
lbLight.Enabled = false;
light.Enabled = false;
cbAbsolute.Enabled = false;
reset.Enabled = false;
}
preventchanges = false;
}
#endregion
#region ================== Events
private void reset_Click(object sender, EventArgs e)
{
light.Text = "0";
cbAbsolute.Checked = false;
reset.Visible = false;
}
private void light_WhenTextChanged(object sender, EventArgs e)
{
if (preventchanges)
return;
((LinedefEditFormUDMF)ParentForm).MakeUndo();
// Reset the increment step for +++/---
light.ResetIncrementStep();
if (string.IsNullOrEmpty(light.Text))
{
// Text is empty, use each sidedef's original light value
foreach (Sidedef sd in sidedefs)
{
if (sd == null || sd.IsDisposed)
continue;
UniFields.SetInteger(sd.Fields, fieldname, originallight[sd]);
}
}
else
{
foreach (Sidedef sd in sidedefs)
{
if (sd == null || sd.IsDisposed)
continue;
bool absolute = false;
switch (cbAbsolute.CheckState)
{
case CheckState.Checked:
absolute = true;
break;
case CheckState.Indeterminate:
absolute = sd.Fields.GetValue(fieldabsolutename, false);
break;
}
int value = General.Clamp(light.GetResult(originallight[sd]), absolute ? 0 : -255, 255);
UniFields.SetInteger(sd.Fields, fieldname, value);
}
}
reset.Visible = (cbAbsolute.CheckState != CheckState.Unchecked || light.Text != "0");
General.Map.IsChanged = true;
((LinedefEditFormUDMF)ParentForm).ValuesChangedExternal();
}
private void cbAbsolute_CheckedChanged(object sender, EventArgs e)
{
if (preventchanges)
return;
((LinedefEditFormUDMF)ParentForm).MakeUndo();
if (cbAbsolute.Checked)
{
foreach(Sidedef sd in sidedefs)
{
sd.Fields[fieldabsolutename] = new UniValue(UniversalType.Boolean, true);
}
}
else if(cbAbsolute.CheckState == CheckState.Indeterminate)
{
foreach(Sidedef sd in sidedefs)
{
if (originalabsolute[sd])
sd.Fields[fieldabsolutename] = new UniValue(UniversalType.Boolean, true);
else if (sd.Fields.ContainsKey(fieldabsolutename))
sd.Fields.Remove(fieldabsolutename);
}
}
else
{
foreach (Sidedef sd in sidedefs)
if (sd.Fields.ContainsKey(fieldabsolutename))
sd.Fields.Remove(fieldabsolutename);
}
((LinedefEditFormUDMF)ParentForm).ValuesChangedExternal();
}
#endregion
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

0
Source/Core/Controls/ThingInfoPanel.cs Executable file → Normal file
View file

View file

@ -0,0 +1,104 @@

namespace CodeImp.DoomBuilder.Controls
{
partial class ToastControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lbText = new System.Windows.Forms.Label();
this.icon = new System.Windows.Forms.Panel();
this.lbTitle = new System.Windows.Forms.Label();
this.btnClose = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lbText
//
this.lbText.AutoSize = true;
this.lbText.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbText.Location = new System.Drawing.Point(48, 28);
this.lbText.MaximumSize = new System.Drawing.Size(200, 0);
this.lbText.Name = "lbText";
this.lbText.Size = new System.Drawing.Size(46, 18);
this.lbText.TabIndex = 0;
this.lbText.Text = "label1";
//
// icon
//
this.icon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.icon.Location = new System.Drawing.Point(10, 10);
this.icon.Name = "icon";
this.icon.Size = new System.Drawing.Size(32, 32);
this.icon.TabIndex = 1;
//
// lbTitle
//
this.lbTitle.AutoSize = true;
this.lbTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTitle.Location = new System.Drawing.Point(48, 10);
this.lbTitle.Name = "lbTitle";
this.lbTitle.Size = new System.Drawing.Size(40, 18);
this.lbTitle.TabIndex = 2;
this.lbTitle.Text = "Title";
//
// btnClose
//
this.btnClose.BackgroundImage = global::CodeImp.DoomBuilder.Properties.Resources.Close;
this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnClose.Location = new System.Drawing.Point(385, 3);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(16, 16);
this.btnClose.TabIndex = 3;
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// ToastControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(this.btnClose);
this.Controls.Add(this.lbTitle);
this.Controls.Add(this.icon);
this.Controls.Add(this.lbText);
this.DoubleBuffered = true;
this.Margin = new System.Windows.Forms.Padding(6);
this.Name = "ToastControl";
this.Size = new System.Drawing.Size(404, 49);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lbText;
private System.Windows.Forms.Panel icon;
private System.Windows.Forms.Label lbTitle;
private System.Windows.Forms.Button btnClose;
}
}

Some files were not shown because too many files have changed in this diff Show more