diff --git a/config/menus_edit.cfg b/config/menus_edit.cfg index ba4b8b1a..10eec191 100644 --- a/config/menus_edit.cfg +++ b/config/menus_edit.cfg @@ -9,7 +9,7 @@ menuitem "Pickups..." [ showmenu Pickups ] menuitem "Textures..." [ showmenu textures ] menuitem "Skymaps..." [ showmenu skymaps ] menuitem "Ambient sounds..." [ showmenu [Ambient sounds] ] -menuitem "Arches and slopes..." [ showmenu Arches ] +menuitem "Arches, slopes and stairs..." [ showmenu Arches ] menuitem "Map operations..." [ showmenu [Map operations] ] menuitem "Map settings..." [ showmenu [Map settings] ] menuitem "Map config operations..." [ showmenu [Map config operations] ] @@ -94,24 +94,23 @@ menuitem "Akimbo" [ newent akimbo ] menuitem "Grenades" [ newent grenades ] //Arch and slope menu +looplist [__slopeaxis 0 __slopeinc 4 __stairaxis 0 __stairwidth 1 __undoarch "" __archside 1] [n v] [tempalias $n $v] +tempalias __setundoarch [ __undoarch = (concat select (at (selx) 0) (at (sely) 0) (at (selxs) 0) (at (selys) 0) "; if (= (undolevel)" (+ (undolevel) 2) ") [ undolevel" (undolevel) "]") ] newmenu Arches - -menuitem "Arch with no sideways curves" [ heightfield 2; arch 0 ] -menuitem "Arch with sideways curves (delta 1)" [ heightfield 2; arch 1 ] -menuitem "Arch with sideways curves (delta 2)" [ heightfield 2; arch 2 ] -menuitem "Arch with sideways curves (delta 3)" [ heightfield 2; arch 3 ] -menuitem "Arch with sideways curves (delta 4)" [ heightfield 2; arch 4 ] +menuinit [ chmenutexture (curmenu) map_editor/axes.png " " ] +menuitemslider "Arch sideways curve delta: " 0 5 "$__archside" 1 [] [ __archside = $arg1 ] +menuitem "\t[ Place arch ]" [ __setundoarch ; heightfield 2; arch $__archside ] menuitem "" -1 -menuitem "Slope increase 2 left-right" [ heightfield 0; slope 2 0 ] -menuitem "Slope decrease 2 left-right" [ heightfield 0; slope -2 0 ] -menuitem "Slope increase 2 top-bottom" [ heightfield 0; slope 0 2 ] -menuitem "Slope decrease 2 top-bottom" [ heightfield 0; slope 0 -2 ] -menuitem "Slope increase 1 left-right" [ heightfield 0; slope 1 0 ] -menuitem "Slope decrease 1 left-right" [ heightfield 0; slope -1 0 ] -menuitem "Slope increase 1 top-bottom" [ heightfield 0; slope 0 1 ] -menuitem "Slope decrease 1 top-bottom" [ heightfield 0; slope 0 -1 ] +menuitemslider "Slope axis: " 0 1 "$__slopeaxis" 1 ["West to East (X)" "North to South (Y)"] [ __slopeaxis = $arg1 ] +menuitemslider "Slope increment: " 0 5 "$__slopeinc" 1 ["downwards 3" "downwards 2" "downwards 1" "upwards 1" "upwards 2" "upwards 3"] [ __slopeinc = $arg1 ] +menuitem "\t[ Place slope ]" [ __setundoarch ; heightfield 0; push i (at "-3 -2 -1 1 2 3" $__slopeinc) ; slope (if $__slopeaxis 0 $i) (if $__slopeaxis $i 0) ; pop i ; 0] menuitem "" -1 -menuitem "Fix heightfielding" [ solid 0; slope 0 0 ] +menuitem "Clear heightfielding" [ solid 0; slope 0 0 ] +menuitem "Undo last placed arch or slope" [ __undoarch ; -1 ] +menuitem "" -1 +menuitemslider "Stairs axis: " 0 1 "$__stairaxis" 1 ["West to East (X)" "North to South (Y)"] [ __stairaxis = $arg1 ] +menuitemslider "Step width: " 0 5 "$__stairwidth" 1 ["downwards 3" "downwards 2" "downwards 1" "upwards 1" "upwards 2" "upwards 3"] [ __stairwidth = $arg1 ] +menuitem "\t[ Place stairs ]" [ selectionwalk [ += sw_floor (div (if $__stairaxis $sw_rel_y $sw_rel_x) (at "-3 -2 -1 1 2 3" $__stairwidth)) ] ] newmenu skymaps menuinit [ diff --git a/packages/textures/map_editor/axes.png b/packages/textures/map_editor/axes.png new file mode 100644 index 00000000..78fe910a Binary files /dev/null and b/packages/textures/map_editor/axes.png differ