diff --git a/Build/Scripting/Hexen_ACS.cfg b/Build/Scripting/Hexen_ACS.cfg index 2adef600..c42b04b7 100644 --- a/Build/Scripting/Hexen_ACS.cfg +++ b/Build/Scripting/Hexen_ACS.cfg @@ -19,6 +19,7 @@ functionclose = ")"; argumentdelimiter = ","; terminator = ";"; keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; +snippetsdir = "acs"; keywords { diff --git a/Build/Scripting/Skulltag_ACS.cfg b/Build/Scripting/Skulltag_ACS.cfg index 10257def..8cf5ddfa 100644 --- a/Build/Scripting/Skulltag_ACS.cfg +++ b/Build/Scripting/Skulltag_ACS.cfg @@ -19,6 +19,7 @@ functionclose = ")"; argumentdelimiter = ","; terminator = ";"; keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; +snippetsdir = "acs"; keywords { diff --git a/Build/Scripting/ZDoom_ACS.cfg b/Build/Scripting/ZDoom_ACS.cfg index cdd36355..be8f2545 100644 --- a/Build/Scripting/ZDoom_ACS.cfg +++ b/Build/Scripting/ZDoom_ACS.cfg @@ -19,6 +19,7 @@ functionclose = ")"; argumentdelimiter = ","; terminator = ";"; keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; +snippetsdir = "acs"; keywords { @@ -84,6 +85,8 @@ keywords Ceiling_RaiseInstant = "Ceiling_RaiseInstant(tag, unused, height)"; Ceiling_RaiseToNearest = "Ceiling_RaiseToNearest(tag, speed)"; Ceiling_Waggle = "Ceiling_Waggle(tag, amp, freq, offset, time)"; + ChangeActorAngle = "ChangeActorAngle(int tid, fixed angle, bool interpolate = false)"; + ChangeActorPitch = "ChangeActorPitch(int tid, fixed pitch, bool interpolate = false)"; ChangeCamera = "ChangeCamera(tid, who, revert)"; ChangeCeiling = "ChangeCeiling(tag, flat)"; ChangeFloor = "ChangeFloor(tag, flat)"; diff --git a/Build/Snippets/acs/dountil.txt b/Build/Snippets/acs/dountil.txt new file mode 100644 index 00000000..674191f9 --- /dev/null +++ b/Build/Snippets/acs/dountil.txt @@ -0,0 +1,3 @@ +do { + +} until ($EP); \ No newline at end of file diff --git a/Build/Snippets/acs/dowhile.txt b/Build/Snippets/acs/dowhile.txt new file mode 100644 index 00000000..a75ae734 --- /dev/null +++ b/Build/Snippets/acs/dowhile.txt @@ -0,0 +1,3 @@ +do { + +} while ($EP); \ No newline at end of file diff --git a/Build/Snippets/acs/for.txt b/Build/Snippets/acs/for.txt new file mode 100644 index 00000000..5b627014 --- /dev/null +++ b/Build/Snippets/acs/for.txt @@ -0,0 +1,3 @@ +for (int i = 0; i < $EP; i++) { + +} diff --git a/Build/Snippets/acs/if.txt b/Build/Snippets/acs/if.txt new file mode 100644 index 00000000..7619da51 --- /dev/null +++ b/Build/Snippets/acs/if.txt @@ -0,0 +1,3 @@ +if ($EP) { + +} \ No newline at end of file diff --git a/Build/Snippets/acs/ifelse.txt b/Build/Snippets/acs/ifelse.txt new file mode 100644 index 00000000..0f434e5d --- /dev/null +++ b/Build/Snippets/acs/ifelse.txt @@ -0,0 +1,5 @@ +if ($EP) { + +} else { + +} \ No newline at end of file diff --git a/Build/Snippets/acs/include.txt b/Build/Snippets/acs/include.txt new file mode 100644 index 00000000..a42605cb --- /dev/null +++ b/Build/Snippets/acs/include.txt @@ -0,0 +1,5 @@ +#include "zcommon.acs" + +script 1 OPEN { + $EP +} \ No newline at end of file diff --git a/Build/Snippets/acs/script.txt b/Build/Snippets/acs/script.txt new file mode 100644 index 00000000..df9a30b3 --- /dev/null +++ b/Build/Snippets/acs/script.txt @@ -0,0 +1,3 @@ +script $EP (void) { + +} \ No newline at end of file diff --git a/Build/Snippets/acs/until.txt b/Build/Snippets/acs/until.txt new file mode 100644 index 00000000..6c90ca51 --- /dev/null +++ b/Build/Snippets/acs/until.txt @@ -0,0 +1,3 @@ +until ($EP) { + +} \ No newline at end of file diff --git a/Build/Snippets/acs/while.txt b/Build/Snippets/acs/while.txt new file mode 100644 index 00000000..f01f9a82 --- /dev/null +++ b/Build/Snippets/acs/while.txt @@ -0,0 +1,3 @@ +while ($EP) { + +} \ No newline at end of file diff --git a/CompileHelp.bat b/CompileHelp.bat index 37284568..0524eb53 100644 --- a/CompileHelp.bat +++ b/CompileHelp.bat @@ -10,7 +10,6 @@ IF NOT EXIST "Build\Refmanual.chm" GOTO FILEFAIL ECHO. ECHO. BUILD DONE ! ECHO. -PAUSE > NUL GOTO LEAVE :ERRORFAIL diff --git a/Help/Contents.hhc b/Help/Contents.hhc index 6c87bd22..0135999d 100644 --- a/Help/Contents.hhc +++ b/Help/Contents.hhc @@ -235,10 +235,6 @@ +
  • + + + +
  • diff --git a/Help/gzdb/features/features.html b/Help/gzdb/features/features.html index 559810dc..97d31f4f 100644 --- a/Help/gzdb/features/features.html +++ b/Help/gzdb/features/features.html @@ -14,9 +14,16 @@ color: #336600; font-weight: bold; } -.style5 {color: #990000; font-weight: bold; } -.style7 {color: #6600CC} -.style9 {color: #003300} +.style5 { + color: #990000; + font-weight: bold; +} +.style7 { + color: #6600CC +} +.style9 { + color: #003300 +} --> @@ -27,18 +34,11 @@

    GZDoom Builder features

    -
    -Jump to: General interface | - - Classic and Visual modes | - Classic modes - | Sectors mode | Linedefs mode | Things mode | Vertices mode | GZDB Visual mode | Custom Fields | Map Analysis mode | Find and Replace mode - | Misc. | (G)ZDoom features support +
    Jump to: General interface | Classic and Visual modes | Classic modes | Sectors mode | Linedefs mode | Things mode | Vertices mode | GZDB Visual mode | Custom Fields | Map Analysis mode | Find and Replace mode | Misc. | (G)ZDoom features support
    • General interface:

        -
      • Enhanced scripting workflow.
      • [new] Help side panel, which shows most of actions, available in current mode.
      • [new] Maps can now be loaded by dragging wad files on top of GZDB's main window.
      • [new] Open Map Options, Map Options and Game Configurations forms: resources can be added by dragging them on top of resources list.
      • @@ -59,25 +59,34 @@ Jump to: General interface |
        -
      • [new] Texture size is now shown in texture previews. You can disable this feature by unchecking "Preferences -> Interface -> Show texture and flat sizes in browsers" checkbox. +
      • [new] Texture size is now shown in texture previews. You can disable this feature by unchecking "Preferences -> Interface -> Show texture and flat sizes in browsers" checkbox. -
      • +
        +
      • Several game engines can be used per game configuration.
      • Size of vertex handles in 2D modes can be changed in preferences.
      • [new] Script editor: pressing "F1" opens keyword help instead of program manual.
      • -
      • [new] Side panel auto hiding can be now toggled much easier. -
        +
      • [new] Side panel auto hiding can be now toggled much easier. + +
      • [new] Things can be filtered in Thing Edit form.
      • [new] Added "Hints" side panel, which shows the list of actions, available in current editing mode.
      • -
      • Actions and Effects can be filtered (useful when you remember action/effect name, but don't remember it's number or category). +
      • Actions and Effects can be filtered (useful when you remember action/effect name, but don't remember it's number or category). -
        +
      • Actions can be filtered in Preferences form.
      • Added errors and warnings indicator to main window (bottom-right corner). You can click on it to open Errors and warnings window.
    • +
    • +

      Scripting

      + +
    • Classic and Visual modes:

        @@ -91,8 +100,10 @@ Jump to: General interface |
      • Camera position can be synchronized between Classic and Visual modes. More info.
      • You can use Color Picker plugin to edit dynamic light properties and sector's fog and tint colors in Classic and Visual modes.
      • You can use Tag Explorer plugin to view all tags and actions used in current map.
      • -
      • [new] You can pick, which properties are pasted by "Paste Properties" action using "Paste Properties Options" window. -
      • +
      • [new] You can pick, which properties are pasted by "Paste Properties" action using "Paste Properties Options" window. + +
        +
      • [new] You can apply randomized transformations to any map element.
      • Image browser shows directory structure of Folder, PK3 and PK7 resources and can filter images by texture type and size. More info.
      • [new] Most controls of Edit Sector/Linedef/Thing forms now work in realtime (e.g. you can immediately see texture offset/scale/rotation changes while you are changing appropriate values). Action and Tag changes are still applied only after you press "OK" button.
      • @@ -123,13 +134,13 @@ Jump to: General interface |
      • [new] Selected things are now dragged while dragging vertices, linedefs and sectors.
      • [new] You can place things on top of selected vertices in Vertices and Linedefs modes and inside of selected sectors in Sectors mode using "Place Things" action.
      • [new] You can view all loaded thing types and some additional info using Thing Statistics form (Edit -> View Thing Types...). - +
        -
      • +
      • [new] You can override default sector properties, which are used to create new geometry, using "Draw Settings" panel (by default, when the new sector overlaps or touches existing sector, the editor uses textures, brighntess and floor/ceiling heights from that sector when drawing the new one).
      • [new] You can disable Doom Builder's auto-clear textures behaviour by using this button in the toolbar:
      • [new] You can change default sector brightness and floor/ceiling height (Preferences -> Editing -> Default sector settings). These settings are used when the new sector doesn't touch or overlap already existing sectors.
      • -
      • [new] 3D floor indication (color can be changed in Preferences -> Appearance -> 3D Floors, the setting can be disabled in Preferences). +
      • [new] 3D floor indication (color can be changed in Preferences -> Appearance -> 3D Floors, the setting can be disabled in Preferences).
      • @@ -143,54 +154,56 @@ Jump to: General interface |
      • Center of map is shown in Classic modes using Highlight color.
    • - -
    • Sectors mode:

      +
    • +

      Sectors mode:

        -
      • [new] Hold Alt while (de)selecting sectors to (de)select things inside of them.
      • -
      • [new] Sector Tag and Effect can now be shown on top of sectors. You can use "View Tags and Effects" button to toggle this overlay. - -
        -
      • -
      • [new] [UDMF] Create Brightness Gradient option can work in 5 modes: - -
        -
      • -
      • [new] Sector Info panel shows the number of sector's sidedefs as well as light and fade colors (UDMF only): -
      • +
      • [new] Hold Alt while (de)selecting sectors to (de)select things inside of them.
      • +
      • [new] Sector Tag and Effect can now be shown on top of sectors. You can use "View Tags and Effects" button to toggle this overlay. + +
        +
      • +
      • [new] [UDMF] Create Brightness Gradient option can work in 5 modes: + +
        +
      • +
      • [new] Sector Info panel shows the number of sector's sidedefs as well as light and fade colors (UDMF only): + +
        +
    • - -
    • Linedefs mode:

      +
    • +

      Linedefs mode:

        -
      • [new] [UDMF] New actions: "Align Ceiling Texture to Back Side", "Align Ceiling Texture to Front Side", "Align Floor Texture to Back Side" and "Align Floor Texture to Front Side" (available in Linedefs -> Align Textures menu).
      • -
      • [new] [UDMF] "Make brightness gradient" command is available in Linedefs mode.
      • -
      • [UDMF] Linedef info panel: relative UDMF light values are shown like this: 16 (128), which means "UDMF light value" ("total surface brightness"). Total surface brightness is UDMF light value + sector brightness.
      • -
      • [new] When a linedef is within Split Linedefs range, it is highlighted using Info line color
      • +
      • [new] [UDMF] New actions: "Align Ceiling Texture to Back Side", "Align Ceiling Texture to Front Side", "Align Floor Texture to Back Side" and "Align Floor Texture to Front Side" (available in Linedefs -> Align Textures menu).
      • +
      • [new] [UDMF] "Make brightness gradient" command is available in Linedefs mode.
      • +
      • [UDMF] Linedef info panel: relative UDMF light values are shown like this: 16 (128), which means "UDMF light value" ("total surface brightness"). Total surface brightness is UDMF light value + sector brightness.
      • +
      • [new] When a linedef is within Split Linedefs range, it is highlighted using Info line color
    • - -
    • Things mode:

      +
    • +

      Things mode:

        -
      • [new] Several thing types can now be selected at once in Thing Edit form. If you do so, a type randomly chosen from selected ones will be assigned to each selected thing. More info.
      • -
      • [new] You can filter selected things by type using Filter Things form (Things -> Filter Things...). - -
        -
      • -
      • [new] You can clone selected/highlighted things by holding "Shift" before starting to drag them.
      • -
      • [new] New action: "Point Thing to cursor". More info.
      • -
      • [new] New action: "Select Things in Selected Sectors" (Default key is Shift+T).
      • -
      • [new] New action: "Align Things To Linedef".
      • -
      • Z-height of a thing can be changed in absolute and relative mode in Thing Edit form.
      • -
      • Thing's X and Y position can be edited in Edit Thing form.
      • +
      • [new] Several thing types can now be selected at once in Thing Edit form. If you do so, a type randomly chosen from selected ones will be assigned to each selected thing. More info.
      • +
      • [new] You can filter selected things by type using Filter Things form (Things -> Filter Things...). + +
        +
      • +
      • [new] You can clone selected/highlighted things by holding "Shift" before starting to drag them.
      • +
      • [new] New action: "Point Thing to cursor". More info.
      • +
      • [new] New action: "Select Things in Selected Sectors" (Default key is Shift+T).
      • +
      • [new] New action: "Align Things To Linedef".
      • +
      • Z-height of a thing can be changed in absolute and relative mode in Thing Edit form.
      • +
      • Thing's X and Y position can be edited in Edit Thing form.
    • - -
    • Vertices mode:

      +
    • +

      Vertices mode:

      • [UDMF] Vertical offsets of a vertex can be edited in Vertex Edit form and are shown in Vertex Info panel.
      • When a linedef is within Split Linedefs range, it is highlighted using Info line color.
      • -
    • - +
    +
  • GZDB Visual mode:

      @@ -227,7 +240,7 @@ Jump to: General interface | New editing features avaliable in this mode:
      • [new] You can Shift-Select (usually Select action = LMB) to select all adjacent surfaces with same texture, Ctrl-Select to select all adjacent surfaces with same height. Ctrl-Shift-Select will also work as expected.
      • -
      • [UDMF] Vertex height offsets ("zfloor" and "zceiling") can be edited.
      • +
      • [UDMF] Vertex height offsets ("zfloor" and "zceiling") can be edited.
      • [UDMF] Using "Increase/Decrease brightness" actions (bound to Ctrl+Mouse Wheel by default) on walls and ceilings will change sidedef/ceiling brightness, using them on floors will change sector brightness, using them on 3d floors will change brightness of 3d floor.
      • You can use "Toggle geometry effects" action (default key is Tab) to toggle GZDoom's geometry effects, such as slopes, 3D-floors, transfer brightness effects etc.
      • [new] You can hold Shift while dragging a texture to lock movement to horizontal axis, and Ctrl to lock it to vertical axis.
      • @@ -244,7 +257,7 @@ Jump to: General interface |
      • [new] New action: "Toggle slope" (default key is Alt-S). Select or highlight upper/lower walls then call this action to add slopes. Select or highlight floors or ceilings then call this action to remove slopes.
      • [new] New action: "Look Through Selection" (default key is "Y"). This action places visual camera at the same position as selected/highlighted thing and rotates it to match thing's angle. Special handling is available if targeted thing is AimingCamera, MovingCamera, SecurityCamera or InterpolationPoint.
      • [new] New actions: "Auto-align Textures to Selection (X)", "Auto-align Textures to Selection (Y)" and "Auto-align Textures to Selection (X and Y)".
      • -
      • New actions: "Rotate Clockwise" and "Rotate Counterclockwise", which can be used to rotate things and [new][UDMF] floor/ceiling textures.
      • +
      • New actions: "Rotate Clockwise" and "Rotate Counterclockwise", which can be used to rotate things and [new][UDMF] floor/ceiling textures.
      • Things can be moved horizontally using "Move Thing Forward/Backward/Left/Right" actions.
      • Things can be moved to cursor position using "Move Thing To Cursor Location" (default key is Ctrl + Middle mouse) action.
      • Things can be inserted at cursor position using "Insert Item" action (default key is Insert).
      • @@ -254,7 +267,7 @@ Jump to: General interface |
      • [new] [UDMF] New action: "Reset Local Texture Offsets (UDMF)". It will reset upper/middle/lower texture offsets, texture scale and rotation.
      • [new] [UDMF] "Reset Texture Offsets" action works on floors and ceilings.
      - +
  • @@ -269,7 +282,7 @@ Jump to: General interface |
    • [new] Map Analysis mode can check the map for unconnected vertices.
    • [new] "Check overlapping lines" finds duplicate linedefs (e.g. when 2 lines have the same start and end positions).
    • -
    • [new] Map Analysis mode can check the map for overlapping vertices. This will check if a vertex is on top of a linedef or another vertex.
    • +
    • [new] Map Analysis mode can check the map for overlapping vertices. This will check if a vertex is on top of a linedef or another vertex.
    • [new] Map Analysis mode can check the map for invalid sectors (sectors with less than 3 sidedefs or sectors without area).
    • [new] Map Analysis mode can check the map for unused textures.
    • [new] Map Analysis mode can check the map for missing flats.
    • @@ -281,11 +294,11 @@ Jump to: General interface |
    • Find and Replace mode:

        -
      • Find and Replace mode now have "Sector Brightness" search mode.
      • -
      • Find and Replace Mode can find things and linedefs by their flags.
      • -
      • Find and Replace Mode can find Action with specific argunemts. Syntax is "[Action]; [arg1] [...]".
      • +
      • Find and Replace mode now have "Sector Brightness" search mode.
      • +
      • Find and Replace Mode can find things and linedefs by their flags.
      • +
      • Find and Replace Mode can find Action with specific argunemts. Syntax is "[Action]; [arg1] [...]".
      -
    • +
    • Misc. features:

        diff --git a/Help/gzdb/features/general/acs.html b/Help/gzdb/features/scripting/acs.html similarity index 100% rename from Help/gzdb/features/general/acs.html rename to Help/gzdb/features/scripting/acs.html diff --git a/Help/gzdb/features/general/acs_infoex.jpg b/Help/gzdb/features/scripting/acs_infoex.jpg similarity index 100% rename from Help/gzdb/features/general/acs_infoex.jpg rename to Help/gzdb/features/scripting/acs_infoex.jpg diff --git a/Help/gzdb/features/general/acs_scripteditor.jpg b/Help/gzdb/features/scripting/acs_scripteditor.jpg similarity index 100% rename from Help/gzdb/features/general/acs_scripteditor.jpg rename to Help/gzdb/features/scripting/acs_scripteditor.jpg diff --git a/Help/gzdb/features/general/acs_thing1.jpg b/Help/gzdb/features/scripting/acs_thing1.jpg similarity index 100% rename from Help/gzdb/features/general/acs_thing1.jpg rename to Help/gzdb/features/scripting/acs_thing1.jpg diff --git a/Help/gzdb/features/general/acs_thing2.jpg b/Help/gzdb/features/scripting/acs_thing2.jpg similarity index 100% rename from Help/gzdb/features/general/acs_thing2.jpg rename to Help/gzdb/features/scripting/acs_thing2.jpg diff --git a/Help/gzdb/features/scripting/snippets.html b/Help/gzdb/features/scripting/snippets.html new file mode 100644 index 00000000..ee298dcf --- /dev/null +++ b/Help/gzdb/features/scripting/snippets.html @@ -0,0 +1,44 @@ + + + + + GZDoom Builder features + + + + + + + + + + + +
        +

        Code Snippets

        +
        + +
        +

        +

        In the Script Editor you can use and create code snippets, which are small blocks of reusable code that you can insert where you need it in your code.

        +

        Using code snippets:
        + To use a snippet, just pick it from the drop-down menu.

        +

        Creating new code snippets:
        + Code snippets are plain text files stored in [GZDB]\Snippets\[category], so just create a new text file there and add the code you want into it. Currently the only supported "special" token is $EP (Entry Point) - that's the place where the cursor will be placed after inserting a snippet.
        + Warning: snippet's file name should not contain spaces.

        +

        Creating new code snippets for custom scripting configurations:
        + To add snippets to a scripting configuration, which doesn't already have existing snippets ("Insert a Code Snippet" drop-down is disabled in the Script Editor), you'll have to:

        +
          +
        1. Add a new folder inside of "Snippets" folder (for example, "[GZDB]\Snippets\Decorate").
        2. +
        3. Add the "snippetsdir" parameter to a scripting configuration, in which you want to use snippets, and set it to the folder name you've just created (for example, snippetsdir = "Decorate";).
        4. +
        5. Add the snippets to the folder you've created.
        6. +
        +
        + diff --git a/Help/gzdb/features/scripting/snippets1.jpg b/Help/gzdb/features/scripting/snippets1.jpg new file mode 100644 index 00000000..fde576a7 Binary files /dev/null and b/Help/gzdb/features/scripting/snippets1.jpg differ diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 2a6b7657..ea4cd6de 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -995,6 +995,7 @@ + diff --git a/Source/Core/Config/ScriptConfiguration.cs b/Source/Core/Config/ScriptConfiguration.cs index f5ffa3a1..02a18fca 100644 --- a/Source/Core/Config/ScriptConfiguration.cs +++ b/Source/Core/Config/ScriptConfiguration.cs @@ -19,6 +19,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.IO; using CodeImp.DoomBuilder.IO; #endregion @@ -32,34 +33,32 @@ namespace CodeImp.DoomBuilder.Config #endregion #region ================== Variables - - // Original configuration - //private Configuration cfg; // Compiler settings - private CompilerInfo compiler; - private string parameters; - private string resultlump; + private readonly CompilerInfo compiler; + private readonly string parameters; + private readonly string resultlump; // Editor settings - private string description; - private int codepage; - private string[] extensions; - private bool casesensitive; - private int insertcase; - private int lexer; - private string keywordhelp; - private string functionopen; - private string functionclose; - private string argumentdelimiter; - private string terminator; - private string functionregex; + private readonly string description; + private readonly int codepage; + private readonly string[] extensions; + private readonly bool casesensitive; + private readonly int insertcase; + private readonly int lexer; + private readonly string keywordhelp; + private readonly string functionopen; + private readonly string functionclose; + private readonly string argumentdelimiter; + private readonly string terminator; + private readonly string functionregex; // Collections - private Dictionary keywords; - private Dictionary lowerkeywords; - private List constants; - private Dictionary lowerconstants; + private readonly Dictionary keywords; + private readonly Dictionary lowerkeywords; + private readonly List constants; + private readonly Dictionary lowerconstants; + private readonly Dictionary snippets; //mxd #endregion @@ -83,7 +82,8 @@ namespace CodeImp.DoomBuilder.Config public string ArgumentDelimiter { get { return argumentdelimiter; } } public string Terminator { get { return terminator; } } public string FunctionRegEx { get { return functionregex; } } - + public Dictionary Snippets { get { return snippets; } } //mxd + // Collections public ICollection Keywords { get { return keywords.Keys; } } public ICollection Constants { get { return constants; } } @@ -117,6 +117,7 @@ namespace CodeImp.DoomBuilder.Config functionregex = ""; description = "Plain text"; extensions = new[] { "txt" }; + snippets = new Dictionary(StringComparer.Ordinal); //mxd } // Constructor @@ -127,6 +128,7 @@ namespace CodeImp.DoomBuilder.Config this.constants = new List(); this.lowerkeywords = new Dictionary(StringComparer.Ordinal); this.lowerconstants = new Dictionary(StringComparer.Ordinal); + this.snippets = new Dictionary(StringComparer.Ordinal); //mxd // Read settings description = cfg.ReadSetting("description", "Untitled script"); @@ -183,6 +185,29 @@ namespace CodeImp.DoomBuilder.Config // No compiler found? if(this.compiler == null) throw new Exception("No such compiler defined: '" + compilername + "'"); } + + //mxd. Load Snippets + string snippetsdir = cfg.ReadSetting("snippetsdir", ""); + if (!string.IsNullOrEmpty(snippetsdir)) { + string snippetspath = Path.Combine(General.SnippetsPath, snippetsdir); + if (Directory.Exists(snippetspath)) { + string[] files = Directory.GetFiles(snippetspath, "*.txt", SearchOption.TopDirectoryOnly); + + foreach (string file in files) { + string name = Path.GetFileNameWithoutExtension(file); + if (name.Contains(" ")) { + General.ErrorLogger.Add(ErrorType.Warning, "Failed to load snippet '" + file + "' for '" + description + "' script configuration: snippet file name must not contain spaces!"); + } else { + string[] lines = File.ReadAllLines(file); + if (lines.Length > 0) { + snippets.Add(name, lines); + } else { + General.ErrorLogger.Add(ErrorType.Warning, "Failed to load snippet '" + file + "' for '" + description + "' script configuration: file is empty!"); + } + } + } + } + } } #endregion diff --git a/Source/Core/Controls/ScriptDocumentTab.cs b/Source/Core/Controls/ScriptDocumentTab.cs index 8d866e80..211c3075 100644 --- a/Source/Core/Controls/ScriptDocumentTab.cs +++ b/Source/Core/Controls/ScriptDocumentTab.cs @@ -307,7 +307,8 @@ namespace CodeImp.DoomBuilder.Controls } //mxd - protected void updateNavigator() { + protected void updateNavigator() + { //mxd. known script type? if (Array.IndexOf(ScriptTypes.TYPES, config.Description) != -1) { updateNavigator(new MemoryStream(editor.GetText()), config.Description); @@ -319,7 +320,8 @@ namespace CodeImp.DoomBuilder.Controls } //mxd - private void updateNavigator(MemoryStream stream, string scriptType) { + private void updateNavigator(MemoryStream stream, string scriptType) + { if (scriptType == ScriptTypes.TYPES[(int)ScriptType.ACS]) { updateNavigatorAcs(stream); } else if (scriptType == ScriptTypes.TYPES[(int)ScriptType.MODELDEF]) { @@ -330,7 +332,8 @@ namespace CodeImp.DoomBuilder.Controls } //mxd - private void updateNavigatorDecorate(MemoryStream stream) { + private void updateNavigatorDecorate(MemoryStream stream) + { if (stream == null) return; navigator.Items.Clear(); @@ -344,7 +347,8 @@ namespace CodeImp.DoomBuilder.Controls } //mxd - private void updateNavigatorModeldef(MemoryStream stream) { + private void updateNavigatorModeldef(MemoryStream stream) + { if (stream == null) return; navigator.Items.Clear(); @@ -358,7 +362,8 @@ namespace CodeImp.DoomBuilder.Controls } //mxd - private void updateNavigatorAcs(MemoryStream stream) { + private void updateNavigatorAcs(MemoryStream stream) + { if (stream == null) return; navigator.Items.Clear(); @@ -375,7 +380,8 @@ namespace CodeImp.DoomBuilder.Controls } //mxd - internal ScriptType VerifyScriptType() { + internal ScriptType VerifyScriptType() + { ScriptTypeParserSE parser = new ScriptTypeParserSE(); if (parser.Parse(new MemoryStream(editor.GetText()), config.Description)) { if (parser.ScriptType != (int)ScriptType.UNKNOWN && config.Description != ScriptTypes.TYPES[(int)parser.ScriptType]) @@ -384,6 +390,12 @@ namespace CodeImp.DoomBuilder.Controls return ScriptType.UNKNOWN; } + //mxd + internal void InsertSnippet(string[] lines) + { + editor.InsertSnippet(lines); + } + #endregion #region ================== Events diff --git a/Source/Core/Controls/ScriptEditorControl.cs b/Source/Core/Controls/ScriptEditorControl.cs index 480fa91b..a1494c9b 100644 --- a/Source/Core/Controls/ScriptEditorControl.cs +++ b/Source/Core/Controls/ScriptEditorControl.cs @@ -244,19 +244,17 @@ namespace CodeImp.DoomBuilder.Controls Stream lexersdata; StreamReader lexersreader; Configuration lexercfg = new Configuration(); - SortedList autocompletelist; - string[] resnames; int imageindex; // Make collections stylelookup = new Dictionary(); - autocompletelist = new SortedList(StringComparer.Ordinal); + SortedList autocompletelist = new SortedList(StringComparer.Ordinal); // Keep script configuration if(scriptconfig != config) scriptconfig = config; // Find a resource named Lexers.cfg - resnames = General.ThisAssembly.GetManifestResourceNames(); + string[] resnames = General.ThisAssembly.GetManifestResourceNames(); foreach(string rn in resnames) { // Found one? @@ -440,7 +438,6 @@ namespace CodeImp.DoomBuilder.Controls { int bracketlevel = 0; // bracket level counting int argindex = 0; // function argument counting - int limitpos; // lowest position we'll backtrack to int pos = scriptedit.CurrentPos; // Decode the text @@ -454,7 +451,7 @@ namespace CodeImp.DoomBuilder.Controls curfunctionstartpos = 0; // Determine lowest backtrack position - limitpos = scriptedit.CurrentPos - MAX_BACKTRACK_LENGTH; + int limitpos = scriptedit.CurrentPos - MAX_BACKTRACK_LENGTH; if(limitpos < 0) limitpos = 0; // We can only do this when we have function syntax information @@ -635,6 +632,34 @@ namespace CodeImp.DoomBuilder.Controls scriptedit.SetText(text); } + //mxd + public void InsertSnippet(string[] lines) + { + //insert the snippet + int curline = scriptedit.LineFromPosition(scriptedit.SelectionStart); + int numtabs = scriptedit.GetLineIndentation(curline); + string tabs = Environment.NewLine + new String(' ', numtabs); + string spaces = new String(' ', General.Settings.ScriptTabWidth); + for (int i = 0; i < lines.Length; i++) { + lines[i] = lines[i].Replace("\t", spaces); + } + string text = string.Join(tabs, lines); + scriptedit.InsertText(scriptedit.SelectionStart, text); + + //check if we have the $EP marker + for(int i = 0; i < lines.Length; i++) { + int pos = lines[i].IndexOf("$EP"); + if(pos != -1) { + MoveToLine(curline + i); + pos += scriptedit.PositionFromLine(curline + i); + scriptedit.SelectionStart = pos + numtabs; + scriptedit.SelectionEnd = pos + numtabs + 3; + ReplaceSelection(""); + break; + } + } + } + #endregion #region ================== Events diff --git a/Source/Core/Controls/ScriptEditorPanel.Designer.cs b/Source/Core/Controls/ScriptEditorPanel.Designer.cs index deb0b70d..4446d97a 100644 --- a/Source/Core/Controls/ScriptEditorPanel.Designer.cs +++ b/Source/Core/Controls/ScriptEditorPanel.Designer.cs @@ -44,6 +44,8 @@ namespace CodeImp.DoomBuilder.Controls this.buttoncopy = new System.Windows.Forms.ToolStripButton(); this.buttonpaste = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.buttonsnippets = new System.Windows.Forms.ToolStripDropDownButton(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.buttonscriptconfig = new System.Windows.Forms.ToolStripDropDownButton(); this.buttoncompile = new System.Windows.Forms.ToolStripButton(); this.buttonclose = new System.Windows.Forms.ToolStripButton(); @@ -97,6 +99,8 @@ namespace CodeImp.DoomBuilder.Controls this.buttoncopy, this.buttonpaste, this.toolStripSeparator3, + this.buttonsnippets, + this.toolStripSeparator4, this.buttonscriptconfig, this.buttoncompile, this.buttonclose, @@ -220,6 +224,22 @@ namespace CodeImp.DoomBuilder.Controls this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); // + // buttonsnippets + // + this.buttonsnippets.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.buttonsnippets.Enabled = false; + this.buttonsnippets.Image = global::CodeImp.DoomBuilder.Properties.Resources.PuzzlePiece; + this.buttonsnippets.ImageTransparentColor = System.Drawing.Color.Magenta; + this.buttonsnippets.Name = "buttonsnippets"; + this.buttonsnippets.Size = new System.Drawing.Size(29, 22); + this.buttonsnippets.Text = "Intert a Code Snippet"; + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25); + // // buttonscriptconfig // this.buttonscriptconfig.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -414,5 +434,7 @@ namespace CodeImp.DoomBuilder.Controls private System.Windows.Forms.ImageList errorimages; private System.Windows.Forms.ToolStripButton buttonkeywordhelp; private System.Windows.Forms.ToolStripButton buttonsearch; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripDropDownButton buttonsnippets; } } diff --git a/Source/Core/Controls/ScriptEditorPanel.cs b/Source/Core/Controls/ScriptEditorPanel.cs index b003d445..24141854 100644 --- a/Source/Core/Controls/ScriptEditorPanel.cs +++ b/Source/Core/Controls/ScriptEditorPanel.cs @@ -475,6 +475,8 @@ namespace CodeImp.DoomBuilder.Controls buttoncut.Enabled = (t != null); buttonpaste.Enabled = (t != null); buttonclose.Enabled = (t != null) && t.IsClosable; + buttonsnippets.DropDownItems.Clear(); //mxd + buttonsnippets.Enabled = (t != null) && t.Config.Snippets.Count > 0; //mxd if(t != null) { @@ -484,6 +486,13 @@ namespace CodeImp.DoomBuilder.Controls ScriptConfiguration config = (item.Tag as ScriptConfiguration); item.Checked = (config == t.Config); } + + //mxd. Add snippets + if(t.Config.Snippets.Count > 0) { + foreach(KeyValuePair group in t.Config.Snippets) { + buttonsnippets.DropDownItems.Add(group.Key).Click += OnInsertSnippetClick; + } + } // Focus to script editor if(focuseditor) ForceFocus(); @@ -788,6 +797,13 @@ namespace CodeImp.DoomBuilder.Controls { OpenFindAndReplace(); } + + //mxd + private void OnInsertSnippetClick(object sender, EventArgs eventArgs) + { + ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab); + t.InsertSnippet( t.Config.Snippets[((ToolStripItem)sender).Text] ); + } // Mouse released on tabs private void tabs_MouseUp(object sender, MouseEventArgs e) diff --git a/Source/Core/Controls/ScriptEditorPanel.resx b/Source/Core/Controls/ScriptEditorPanel.resx index 5f3541b7..0ff8976c 100644 --- a/Source/Core/Controls/ScriptEditorPanel.resx +++ b/Source/Core/Controls/ScriptEditorPanel.resx @@ -149,29 +149,29 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADI - BQAAAk1TRnQBSQFMAwEBAAEUAQABFAEAARABAAEQAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABQAM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BLAFfAv8BGwFSAf0B/wEJAUQB+gH/ARwBQQG4Af8BZAGAAboB/8gA + Ac8B2AHyAf8BlwGnAd0B/wGVAasB8QH/AZcBsQL/AY0BqAL/AakBvgL/A/4B/wP+Af8BgwGhAv8BLQFh + Av8BGwFSAf0B/wEcAUwB3QH/AS4BTQGsAf8BzwHYAfIB/8wAAbQBwgHsAf8BmwGqAd0B/wGVAasB8QH/ + AYcBpAL/AXkBmgL/AWUBiwL/AVIBgQL/AT4BbQL/AS0BYQL/AS4BWgHjAf8BOwFaAbsB/wF1AYwB1AH/ + 1AABtAHCAewB/wGXAacB3QH/AY0BowHlAf8BeQGWAfIB/wFgAYYB+wH/AVABeQH7Af8BTAFzAe4B/wFN + AXAB2QH/AVABawHGAf8BgQGVAdwB/9wAAcwB2AH+Af8BnQGtAeAB/wGJAZ0B3AH/AYoBmwHUAf8BgQGU + AdEB/wFwAYkB1QH/AYEBlAHRAf8BzAHYAf4B//8A0QABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEA AQEFAAGAFwAD/wEAAv8GAAHwAQ8GAAHgAQcGAAHAAQMGAAGAAQEGAAGAAQEGAAGAAQEGAAGAAQEGAAGA AQEGAAGAAQEGAAGAAQEGAAGAAQEGAAHAAQMGAAHgAQcGAAHwAQ8GAAL/BgAL diff --git a/Source/Core/General/General.cs b/Source/Core/General/General.cs index 3c7c641c..a31d8751 100644 --- a/Source/Core/General/General.cs +++ b/Source/Core/General/General.cs @@ -122,6 +122,7 @@ namespace CodeImp.DoomBuilder private const string COMPILERS_DIR = "Compilers"; private const string PLUGINS_DIR = "Plugins"; private const string SCRIPTS_DIR = "Scripting"; + private const string SNIPPETS_DIR = "Snippets"; //mxd private const string SETUP_DIR = "Setup"; private const string SPRITES_DIR = "Sprites"; private const string HELP_FILE = "Refmanual.chm"; @@ -151,6 +152,7 @@ namespace CodeImp.DoomBuilder private static string configspath; private static string compilerspath; private static string scriptspath; + private static string snippetspath; //mxd private static string pluginspath; private static string spritespath; @@ -204,6 +206,7 @@ namespace CodeImp.DoomBuilder public static string CompilersPath { get { return compilerspath; } } public static string PluginsPath { get { return pluginspath; } } public static string SpritesPath { get { return spritespath; } } + public static string SnippetsPath { get { return snippetspath; } } //mxd public static ICollection CommandArgs { get { return Array.AsReadOnly(cmdargs); } } internal static MainForm MainWindow { get { return mainwindow; } } public static IMainForm Interface { get { return mainwindow; } } @@ -569,6 +572,7 @@ namespace CodeImp.DoomBuilder compilerspath = Path.Combine(apppath, COMPILERS_DIR); pluginspath = Path.Combine(apppath, PLUGINS_DIR); scriptspath = Path.Combine(apppath, SCRIPTS_DIR); + snippetspath = Path.Combine(apppath, SNIPPETS_DIR); //mxd spritespath = Path.Combine(apppath, SPRITES_DIR); logfile = Path.Combine(settingspath, LOG_FILE); diff --git a/Source/Core/Properties/Resources.Designer.cs b/Source/Core/Properties/Resources.Designer.cs index 895c8855..5dc14d47 100644 --- a/Source/Core/Properties/Resources.Designer.cs +++ b/Source/Core/Properties/Resources.Designer.cs @@ -466,6 +466,13 @@ namespace CodeImp.DoomBuilder.Properties { } } + internal static System.Drawing.Bitmap PuzzlePiece { + get { + object obj = ResourceManager.GetObject("PuzzlePiece", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap Question { get { object obj = ResourceManager.GetObject("Question", resourceCulture); diff --git a/Source/Core/Properties/Resources.resx b/Source/Core/Properties/Resources.resx index e0de2b51..1be80854 100644 --- a/Source/Core/Properties/Resources.resx +++ b/Source/Core/Properties/Resources.resx @@ -175,18 +175,21 @@ ..\Resources\Marine.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ThingStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Splash3_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Model.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ScriptPalette.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\Splash3_trans.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -196,11 +199,17 @@ ..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Unpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Status0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Model.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\mergegeometry.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -268,8 +277,8 @@ ..\Resources\Prefab2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Grid2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Brightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\fog.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -283,9 +292,6 @@ ..\Resources\ErrorLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -295,9 +301,6 @@ ..\Resources\Zoom_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\Model_selected.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -325,6 +328,9 @@ ..\Resources\Prefab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ImageStack.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Hourglass.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -343,8 +349,8 @@ ..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Brightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\TagStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -358,8 +364,11 @@ ..\Resources\Undo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Unpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Angle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -376,20 +385,17 @@ ..\Resources\ViewNormal.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\MissingThing.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\Monster3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Grid2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Help.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -397,8 +403,8 @@ ..\Resources\OpenScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\MissingThing.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Status11.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -409,19 +415,16 @@ ..\Resources\WarningLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ImageStack.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ThingStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/Source/Core/Resources/PuzzlePiece.png b/Source/Core/Resources/PuzzlePiece.png new file mode 100644 index 00000000..6d488334 Binary files /dev/null and b/Source/Core/Resources/PuzzlePiece.png differ