add optional pre-access function for SVARs
allows a SVAR to be assembled when needed also: * mapmsg is now a SVAR * getmapmsg was removed (now: $mapmsg) * new editsvar script to edit any SVAR in the console buffer * nonfunctional menu removed DOCREF mapmsg getmapmsg editsvar
This commit is contained in:
+8
-13
@@ -315,23 +315,18 @@ void inputcommand(char *init, char *action, char *prompt)
|
||||
}
|
||||
COMMAND(inputcommand, "sss");
|
||||
|
||||
void mapmsg(char *s)
|
||||
{
|
||||
SVARFF(mapmsg,
|
||||
{ // read mapmsg
|
||||
hdr.maptitle[127] = '\0';
|
||||
mapmsg = exchangestr(mapmsg, hdr.maptitle);
|
||||
},
|
||||
{ // set new mapmsg
|
||||
string text;
|
||||
filterrichtext(text, s);
|
||||
filterrichtext(text, mapmsg);
|
||||
filtertext(text, text, FTXT__MAPMSG);
|
||||
copystring(hdr.maptitle, text, 128);
|
||||
if(editmode) unsavededits++;
|
||||
}
|
||||
COMMAND(mapmsg, "s");
|
||||
|
||||
void getmapmsg(void)
|
||||
{
|
||||
string text;
|
||||
copystring(text, hdr.maptitle, 128);
|
||||
result(text);
|
||||
}
|
||||
COMMAND(getmapmsg, "");
|
||||
});
|
||||
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
Reference in New Issue
Block a user