Slightly nicer syntax highlighting

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@376 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-14 19:30:23 +00:00
parent f21f11ac87
commit 82f3dc42c7
7 changed files with 69 additions and 36 deletions
+11 -4
View File
@@ -160,10 +160,17 @@ struct TextElementsFromString {
e = new SymbolTextElement(text, pos, pos + 1, style.symbol_font, &ctx);
bracket = false;
} else {
FontP font = style.font.make(bold > 0, italic > 0, soft > 0 || kwpph > 0, code > 0,
param > 0 || param_ref > 0
? &param_colors[(param_id++) % param_colors_count]
: nullptr);
FontP font = style.font.make(
(bold > 0 ? FONT_BOLD : FONT_NORMAL) |
(italic > 0 ? FONT_ITALIC : FONT_NORMAL) |
(soft > 0 ? FONT_SOFT : FONT_NORMAL) |
(kwpph > 0 ? FONT_SOFT : FONT_NORMAL) |
(code > 0 ? FONT_CODE : FONT_NORMAL) |
(code_kw > 0 ? FONT_CODE_KW : FONT_NORMAL) |
(code_string > 0 ? FONT_CODE_STRING : FONT_NORMAL),
param > 0 || param_ref > 0
? &param_colors[(param_id++) % param_colors_count]
: nullptr);
bracket = kwpph > 0 || param > 0;
e = new FontTextElement(
text,