From 92aec168a6618ef7114828964553fa5a3e315f79 Mon Sep 17 00:00:00 2001 From: RandumKiwi Date: Mon, 2 Mar 2009 00:02:09 +0000 Subject: [PATCH] Edit/create mapmessage menu git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4235 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/menus_edit.cfg | 15 ++++++++++++++- config/scripts.cfg | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/config/menus_edit.cfg b/config/menus_edit.cfg index f0559068..031d0f89 100644 --- a/config/menus_edit.cfg +++ b/config/menus_edit.cfg @@ -121,12 +121,25 @@ newmenu "Map operations" menuitem "Newmap (128x128 cubes - recommended)" "newmap 7" menuitem "Newmap (256x256 cubes)" "newmap 8" menuitem "Increase mapsize (2x)" [ mapenlarge; echo "The map size has been increased by 2. However, the new space is solid. To utilize it, you will need to turn it into space, by selecting it and pressing G" ] -menuitem "Create a map message" [ saycommand /mapmsg ] +menuitem "Create/edit a map message" "menumapmsg" menuitem "Change waterlevel" "saycommand /waterlevel " menuitem "Change watercolour" [ showmenu "Water colour" ] menuitem "Print entity stats" "entstats" menuitemcheckbox "Show mapmodel clippings: " "$showmodelclipping" "showmodelclipping $arg1" +// Map-message edit/creation menu +alias menumapmsg [ if (= (strcmp (getmapmsg) "Untitled Map by Unknown") 1) [ showmenu "Create a map message" ] [ showmenu "Edit a map message" ] ] + +newmenu "Create a map message" +menuinit [ alias menumapmsgtext "" ] +menuitemtextinput "Enter your map message: " "" "alias menumapmsgtext $arg1" "" 256 +menuitem " 2 [ OK ]" "mapmsg $menumapmsgtext" + +newmenu "Edit a map message" +menuinit [ alias menumapmsgtext "" ] +menuitemtextinput "Edit your map message: " "(getmapmsg)" "alias menumapmsgtext $arg1" "" 256 +menuitem " 2 [ OK ]" "mapmsg $menumapmsgtext" + alias redw 1 alias greenw 1 diff --git a/config/scripts.cfg b/config/scripts.cfg index f309259e..b6977adb 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -8,7 +8,7 @@ alias editent [ ] ] -alias editmapmsg [ saycommand ( concatword [/mapmsg ] "[" (getmapmsg) "]" ) ] +alias editmapmsg [ saycommand ( concatword [/mapmsg ] ["] (getmapmsg) ["] ) ] // Auto-completions alias mapcomplete [complete $arg1 "packages/maps/official packages/maps" cgz]