MapEditor
Map editing context for the currently open map editor in SLADE.
Properties
Property | Type | Description |
---|---|---|
The current edit mode (see MODE_ constants below) |
||
The current sector edit mode (see SECTORMODE_ constants below) |
||
The current grid size | ||
The map associated with this editor |
Constants
Name | Value |
---|---|
MODE_VERTICES |
0 |
MODE_LINES |
1 |
MODE_SECTORS |
2 |
MODE_THINGS |
3 |
MODE_VISUAL |
4 |
SECTORMODE_BOTH |
0 |
SECTORMODE_FLOOR |
1 |
SECTORMODE_CEILING |
2 |
Constructors
No Constructors
This type can not be created directly in scripts.
See:
Functions
Overview
General
Selection
SetEditMode
Sets the edit mode to the given MODE_SECTORS
, the
Parameters
mode (integer ): The edit mode to switch to (seeMODE_
constants)[sectorMode] (integer ): The sector edit mode to switch to (seeSECTORMODE_
constants). Default isSECTORMODE_BOTH
ClearSelection
Deselects all currently selected items
Select
Selects or deselects the given
Parameters
object (MapObject ): TheMapObject to (de)select[add] (boolean ): Whether to add (true
) or remove (false
) from the current selection. Default istrue
SelectedLines
Parameters
[tryHighlight] (boolean ): Whether to get the current highlight if nothing is selected. Default isfalse
Returns
MapLine[] : An array of all currently selected lines
Notes
If nothing is selected and true
, the currently highlighted line is returned in the array.
SelectedSectors
Parameters
[tryHighlight] (boolean ): Whether to get the current highlight if nothing is selected. Default isfalse
Returns
MapSector[] : An array of all currently selected sectors
Notes
If nothing is selected and true
, the currently highlighted sector is returned in the array.
SelectedThings
Parameters
[tryHighlight] (boolean ): Whether to get the current highlight if nothing is selected. Default isfalse
Returns
MapThing[] : An array of all currently selected things
Notes
If nothing is selected and true
, the currently highlighted thing is returned in the array.
SelectedVertices
Parameters
[tryHighlight] (boolean ): Whether to get the current highlight if nothing is selected. Default isfalse
Returns
MapVertex[] : An array of all currently selected vertices
Notes
If nothing is selected and true
, the currently highlighted vertex is returned in the array.