(svn r24632) -Feature: Add text filtering to advanced settings.
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "string_func.h"
|
||||
#include "strings_func.h"
|
||||
#include "stringfilter_type.h"
|
||||
#include "gfx_func.h"
|
||||
|
||||
static const WChar STATE_WHITESPACE = ' ';
|
||||
static const WChar STATE_WORD = 'w';
|
||||
@@ -117,4 +119,17 @@ void StringFilter::AddLine(const char *str)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Pass another text line from the current item to the filter.
|
||||
*
|
||||
* You can call this multiple times for a single item, if the filter shall apply to multiple things.
|
||||
* Before processing the next item you have to call ResetState().
|
||||
*
|
||||
* @param str Another line from the item.
|
||||
*/
|
||||
void StringFilter::AddLine(StringID str)
|
||||
{
|
||||
char buffer[DRAW_STRING_BUFFER];
|
||||
GetString(buffer, str, lastof(buffer));
|
||||
AddLine(buffer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user