/******************************************\
	Doom Builder Actions Configuration
\******************************************/

// Categories for the Controls preferences
categories
{
	drawing = "Drawing";
	linedefs = "Lines";
	sectors = "Sectors";
}

// This just defines which actions there are, what description they have and
// some behaviour options. The Doom Builder core will bind to these actions
// with delegates (function pointers) where you use the BeginAction and
// EndAction attributes.

// Behaviour options:
//
// allowkeys: Allows the user to bind standard keys to this action.
// allowmouse: Allows the user to bind mouse buttons to this action.
// allowscroll: Allows the user to bind the scrollwheel to this action.
// disregardshift: This action will be triggered regardless if Shift is used.
// disregardcontrol: This action will be triggered regardless if Control is used.
// repeat: BeginAction will be called for automatic key repetition.
//
// allowkeys and allowmouse are true by default, the others are false by default.
//

verticesmode
{
	title = "Vertices Mode";
	category = "modes";
	description = "Switches to vertices editing mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

linedefsmode
{
	title = "Linedefs Mode";
	category = "modes";
	description = "Switches to linedefs editing mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

sectorsmode
{
	title = "Sectors Mode";
	category = "modes";
	description = "Switches to sectors editing mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

brightnessmode
{
	title = "Sectors Brightness Mode";
	category = "modes";
	description = "Switches to sectors brightness editing mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

thingsmode
{
	title = "Things Mode";
	category = "modes";
	description = "Switches to things editing mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

/*
triangulatormode
{
	title = "Triangulator Mode";
	category = "modes";
	description = "Debug stuff";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}
*/

drawlinesmode
{
	title = "Start Drawing";
	category = "drawing";
	description = "Starts drawing lines. See the Drawing category for actions available during drawing mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

drawpoint
{
	title = "Draw Vertex";
	category = "drawing";
	description = "Draws a vertex at the mousecursor position.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	disregardshift = true;
	disregardcontrol = true;
}

removepoint
{
	title = "Remove Previous Vertex";
	category = "drawing";
	description = "Removes the previously drawn vertex from the drawing session.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

finishdraw
{
	title = "Finish Drawing";
	category = "drawing";
	description = "Finishes the drawing and creates the geometry.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

visualmode
{
	title = "Visual Mode";
	category = "modes";
	description = "Switches to visual editing mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

selectsinglesided
{
	title = "Select Single-sided";
	category = "linedefs";
	description = "This keeps only the single-sided lines in your selection selected.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	default = 65585;
}

selectdoublesided
{
	title = "Select Double-sided";
	category = "linedefs";
	description = "This keeps only the double-sided lines in your selection selected.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	default = 65586;
}

fliplinedefs
{
	title = "Flip Linedefs";
	category = "linedefs";
	description = "This flips the selected linedefs around and keeps sidedefs on the correct side.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

flipsidedefs
{
	title = "Flip Sidedefs";
	category = "linedefs";
	description = "This flips the sidedefs on the selected linedefs around, keeping the line in the same direction.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

curvelinesmode
{
	title = "Curve Linedefs";
	category = "linedefs";
	description = "Curves the selected linedefs with a given number of vertices and distance from the line.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

splitlinedefs
{
	title = "Split Linedefs";
	category = "linedefs";
	description = "Splits the selected linedefs in the middle, or splits the highlighted linedef at the mouse position.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

joinsectors
{
	title = "Join Sectors";
	category = "sectors";
	description = "Joins two or more selected sectors together and keeps all linedefs.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

mergesectors
{
	title = "Merge Sectors";
	category = "sectors";
	description = "Joins two or more selected sectors together and removes the shared linedefs.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

makesectormode
{
	title = "Make Sector Mode";
	category = "modes";
	description = "Switches to the Make Sector editing mode. This mode allows creating and/or fixing split sectors by clicking within a closed region.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

findmode
{
	title = "Find and Replace Mode";
	category = "modes";
	description = "Finds vertices, linedefs, sectors or things with a specific property, selects them and optionally replaces them with a given setting.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

editselectionmode
{
	title = "Edit Selection Mode";
	category = "modes";
	description = "Allows rotating, resizing and moving a selection.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

gradientbrightness
{
	title = "Make Brightness Gradient";
	category = "sectors";
	description = "Creates a brightness gradient over all selected sectors from the first to the last selected sector.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

gradientfloors
{
	title = "Make Floors Gradient";
	category = "sectors";
	description = "Creates a floor heights gradient over all selected sectors from the first to the last selected sector.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

gradientceilings
{
	title = "Make Ceilings Gradient";
	category = "sectors";
	description = "Creates a ceiling heights gradient over all selected sectors from the first to the last selected sector.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

makedoor
{
	title = "Make Door";
	category = "sectors";
	description = "Creates doors from the highlighted or selected sectors.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

lowerfloor8
{
	title = "Lower Floor by 8 mp";
	category = "sectors";
	description = "Lowers the highlighted or selected floor heights by 8 mp.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 131067;
}

raisefloor8
{
	title = "Raise Floor by 8 mp";
	category = "sectors";
	description = "Raises the highlighted or selected floor heights by 8 mp.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 131066;
}

lowerceiling8
{
	title = "Lower Ceiling by 8 mp";
	category = "sectors";
	description = "Lowers the highlighted or selected ceiling heights by 8 mp.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 196603;
}

raiseceiling8
{
	title = "Raise Ceiling by 8 mp";
	category = "sectors";
	description = "Raises the highlighted or selected ceiling heights by 8 mp.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 196602;
}

errorcheckmode
{
	title = "Map Analysis Mode";
	category = "modes";
	description = "Checks your map for errors and mistakes and reports the results.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

lowersector8
{
	title = "Lower Floor/Ceiling by 8 mp";
	category = "visual";
	description = "Lowers the targeted or selected floors/ceilings by 8 mp. This also lowers selected or targeted things.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

raisesector8
{
	title = "Raise Floor/Ceiling by 8 mp";
	category = "visual";
	description = "Raises the targeted or selected floors/ceilings by 8 mp. This also raises selected or targeted things.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

lowersector1
{
	title = "Lower Floor/Ceiling by 1 mp";
	category = "visual";
	description = "Lowers the targeted or selected floors/ceilings by 1 mp. This also lowers selected or targeted things.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

raisesector1
{
	title = "Raise Floor/Ceiling by 1 mp";
	category = "visual";
	description = "Raises the targeted or selected floors/ceilings by 1 mp. This also raises selected or targeted things.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

showvisualthings
{
	title = "Show Things";
	category = "visual";
	description = "Cycles through the different ways the things are shown in Visual Mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

raisebrightness8
{
	title = "Increase Brightness by 8";
	category = "visual";
	description = "Increases the targeted or selected sector brightness level by 8.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

lowerbrightness8
{
	title = "Decrease Brightness by 8";
	category = "visual";
	description = "Decreases the targeted or selected sector brightness level by 8.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

movetextureleft
{
	title = "Move Texture Left by 1";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures to the left by 1 pixel.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

movetextureright
{
	title = "Move Texture Right by 1";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures to the right by 1 pixel.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

movetextureup
{
	title = "Move Texture Up by 1";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures up by 1 pixel.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

movetexturedown
{
	title = "Move Texture Down by 1";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures down by 1 pixel.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
}

movetextureleft8
{
	title = "Move Texture Left by 8";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures to the left by 8 pixels.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 65573;
}

movetextureright8
{
	title = "Move Texture Right by 8";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures to the right by 8 pixels.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 65575;
}

movetextureup8
{
	title = "Move Texture Up by 8";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures up by 8 pixels.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 65574;
}

movetexturedown8
{
	title = "Move Texture Down by 8";
	category = "visual";
	description = "Moves the offset of the targeted or selected textures down by 8 pixels.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	repeat = true;
	default = 65576;
}

textureselect
{
	title = "Select Texture";
	category = "visual";
	description = "Opens the texture browser to select a texture for the targeted or selected walls, floors or ceilings.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

texturecopy
{
	title = "Copy Texture";
	category = "visual";
	description = "Copies the targeted texture or flat for pasting.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

texturepaste
{
	title = "Paste Texture";
	category = "visual";
	description = "Pastes the copied texture onto the targeted or selected walls, floors or ceilings.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

visualautoalignx
{
	title = "Auto-align Textures X";
	category = "visual";
	description = "Automatically aligns the neighbouring textures X offsets until another texture is encountered.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

visualautoaligny
{
	title = "Auto-align Textures Y";
	category = "visual";
	description = "Automatically aligns the neighbouring textures Y offsets until another texture is encountered. The Y alignment only takes the ceiling height for each sidedef into account.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

toggleupperunpegged
{
	title = "Toggle Upper Unpegged";
	category = "visual";
	description = "Toggles the Upper Unpegged setting on the selected or targeted linedef.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

togglelowerunpegged
{
	title = "Toggle Lower Unpegged";
	category = "visual";
	description = "Toggles the Lower Unpegged setting on the selected or targeted linedef.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

togglegravity
{
	title = "Toggle Gravity";
	category = "visual";
	description = "Toggles the use of gravity while moving around in visual mode. Turn gravity off to fly around, turn gravity on to walk on the sector floors.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

togglebrightness
{
	title = "Toggle Full Brightness";
	category = "visual";
	description = "Toggles the use of sector brightness on and off. When sector brightness is off, the world is displayed fully bright, without lighting effects.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

togglehighlight
{
	title = "Toggle Highlight";
	category = "visual";
	description = "Toggles the highlight of the targeted object in visual mode.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	default = 72;	// H
}

resettexture
{
	title = "Reset Texture Offsets";
	category = "visual";
	description = "Resets the texture offsets on the targeted or selected sidedef to 0, 0.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

texturecopyoffsets
{
	title = "Copy Offsets";
	category = "visual";
	description = "Copies the targeted texture offsets for pasting.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

texturepasteoffsets
{
	title = "Paste Offsets";
	category = "visual";
	description = "Pastes the copied texture offsets onto the targeted or selected walls.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

copyproperties
{
	title = "Copy Properties";
	category = "visual";
	description = "Copies the targeted object properties for pasting.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

pasteproperties
{
	title = "Paste Properties";
	category = "visual";
	description = "Pastes the copied properties onto the targeted or selected object.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

placevisualstart
{
	title = "Place Visual Mode Camera";
	category = "classic";
	description = "Places a new, or moves the existing, Visual Mode start thing to the mouse position. This thing will keep track where you left Visual Mode so that you return to Visual Mode in the same location.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

classiccopyproperties
{
	title = "Copy Properties";
	category = "classic";
	description = "Copies the properties of the highlighted or selected object for pasting.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	default = 196675;	// CTRL+SHIFT+C
}

classicpasteproperties
{
	title = "Paste Properties";
	category = "classic";
	description = "Pastes the copied properties onto the highlighted or selected objects.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	default = 196694;	// CTRL+SHIFT+V
}

floodfilltextures
{
	title = "Paste Texture Flood-Fill";
	category = "visual";
	description = "This allows you to flood-fill all adjacent textures or flats that are identical to the original with the copied texture.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
	default = 65540;
}

flipselectionv
{
	title = "Flip Selection Vertically";
	category = "edit";
	description = "Flips the selection in Edit Selection mode vertically.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}

flipselectionh
{
	title = "Flip Selection Horizontally";
	category = "edit";
	description = "Flips the selection in Edit Selection mode horizontally.";
	allowkeys = true;
	allowmouse = true;
	allowscroll = true;
}