mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
Expose Print Flags to ZScript
This commit is contained in:
parent
aae1d1439a
commit
03c8da8a44
2 changed files with 26 additions and 0 deletions
|
@ -1009,6 +1009,16 @@ DEFINE_ACTION_FUNCTION(_Console, Printf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Console, PrintString)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(printlevel);
|
||||
PARAM_STRING(str);
|
||||
|
||||
Printf(printlevel,"%s\n", str.GetChars());
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void StopAllSounds()
|
||||
{
|
||||
soundEngine->StopAllChannels();
|
||||
|
|
|
@ -600,6 +600,22 @@ struct Console native
|
|||
{
|
||||
native static void HideConsole();
|
||||
native static vararg void Printf(string fmt, ...);
|
||||
|
||||
enum EPrintLevel {
|
||||
PRINT_LOW, // pickup messages
|
||||
PRINT_MEDIUM, // death messages
|
||||
PRINT_HIGH, // critical messages
|
||||
PRINT_CHAT, // chat messages
|
||||
PRINT_TEAMCHAT, // chat messages from a teammate
|
||||
PRINT_LOG, // only to logfile
|
||||
PRINT_BOLD = 200, // What Printf_Bold used
|
||||
PRINT_TYPES = 1023, // Bitmask.
|
||||
PRINT_NONOTIFY = 1024, // Flag - do not add to notify buffer
|
||||
PRINT_NOLOG = 2048, // Flag - do not print to log file
|
||||
PRINT_NOTIFY = 4096, // Flag - add to game-native notify display - messages without this only go to the generic notification buffer.
|
||||
};
|
||||
|
||||
native static void PrintString(int printlevel, string str);
|
||||
}
|
||||
|
||||
struct CVar native
|
||||
|
|
Loading…
Reference in a new issue