aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dists/engine-data/fonts.datbin1852144 -> 1996401 bytes
-rw-r--r--gui/ThemeEngine.h6
-rw-r--r--gui/ThemeParser.cpp3
-rw-r--r--gui/console.cpp18
-rw-r--r--gui/console.h2
-rw-r--r--gui/themes/default.inc3
-rw-r--r--gui/themes/scummclassic.zipbin131157 -> 131213 bytes
-rw-r--r--gui/themes/scummclassic/THEMERC2
-rw-r--r--gui/themes/scummclassic/classic_gfx.stx3
-rw-r--r--gui/themes/scummmodern.zipbin403036 -> 403472 bytes
-rw-r--r--gui/themes/scummmodern/THEMERC2
-rw-r--r--gui/themes/scummmodern/scummmodern_gfx.stx17
-rw-r--r--gui/themes/scummremastered.zipbin402977 -> 403413 bytes
-rw-r--r--gui/themes/scummremastered/THEMERC2
-rw-r--r--gui/themes/scummremastered/remastered_gfx.stx17
15 files changed, 57 insertions, 18 deletions
diff --git a/dists/engine-data/fonts.dat b/dists/engine-data/fonts.dat
index ea964c23f4..ddc25a5644 100644
--- a/dists/engine-data/fonts.dat
+++ b/dists/engine-data/fonts.dat
Binary files differ
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 7f13f3b3e4..0fd7e9ecb5 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -37,7 +37,7 @@
#include "graphics/pixelformat.h"
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.26"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.27"
class OSystem;
@@ -131,6 +131,7 @@ enum TextData {
kTextDataButton,
kTextDataNormalFont,
kTextDataTooltip,
+ kTextDataConsole,
kTextDataMAX
};
@@ -220,6 +221,7 @@ public:
kFontStyleFixedBold = 4, ///< Fixed size bold font.
kFontStyleFixedItalic = 5, ///< Fixed size italic font.
kFontStyleTooltip = 6, ///< Tiny console font
+ kFontStyleConsole = 7, ///< Debug console font
kFontStyleMax
};
@@ -361,6 +363,8 @@ public:
return kTextDataNormalFont;
if (font == kFontStyleTooltip)
return kTextDataTooltip;
+ if (font == kFontStyleConsole)
+ return kTextDataConsole;
return kTextDataDefault;
}
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 64a9aa7849..bf62bcc792 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -40,7 +40,8 @@ static const TextDataInfo kTextDataDefaults[] = {
{ kTextDataDefault, "text_default" },
{ kTextDataButton, "text_button" },
{ kTextDataNormalFont, "text_normal" },
- { kTextDataTooltip, "tooltip_normal" }
+ { kTextDataTooltip, "tooltip_normal" },
+ { kTextDataConsole, "console" }
};
diff --git a/gui/console.cpp b/gui/console.cpp
index 5e9def8740..79df413534 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -33,8 +33,8 @@
namespace GUI {
-#define kConsoleCharWidth (_font->getMaxCharWidth())
-#define kConsoleLineHeight (_font->getFontHeight() + 2)
+#define kConsoleCharWidth (_font->getCharWidth('M'))
+#define kConsoleLineHeight (_font->getFontHeight())
enum {
kConsoleSlideDownDuration = 200 // Time in milliseconds
@@ -93,8 +93,7 @@ void ConsoleDialog::init() {
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
- _font = FontMan.getFontByUsage((Graphics::FontManager::FontUsage)
- g_gui.xmlEval()->getVar("Console.Font", Graphics::FontManager::kConsoleFont));
+ _font = &g_gui.getFont(ThemeEngine::kFontStyleConsole);
_leftPadding = g_gui.xmlEval()->getVar("Globals.Console.Padding.Left", 0);
_rightPadding = g_gui.xmlEval()->getVar("Globals.Console.Padding.Right", 0);
@@ -167,10 +166,10 @@ void ConsoleDialog::drawDialog(DrawLayer layerToDraw) {
Dialog::drawDialog(layerToDraw);
for (int line = 0; line < _linesPerPage; line++)
- drawLine(line, false);
+ drawLine(line);
}
-void ConsoleDialog::drawLine(int line, bool restoreBg) {
+void ConsoleDialog::drawLine(int line) {
int x = _x + 1 + _leftPadding;
int start = _scrollLine - _linesPerPage + 1;
int y = _y + 2 + _topPadding;
@@ -178,11 +177,6 @@ void ConsoleDialog::drawLine(int line, bool restoreBg) {
y += line * kConsoleLineHeight;
- if (restoreBg) {
- Common::Rect r(_x, y - 2, _x + _pageWidth * kConsoleCharWidth, y+kConsoleLineHeight);
- g_gui.theme()->restoreBackground(r);
- }
-
for (int column = 0; column < limit; column++) {
#if 0
int l = (start + line) % _linesInBuffer;
@@ -726,7 +720,7 @@ void ConsoleDialog::drawCaret(bool erase) {
}
int x = _x + 1 + _leftPadding + (_currentPos % kCharsPerLine) * kConsoleCharWidth;
- int y = _y + _topPadding + displayLine * kConsoleLineHeight;
+ int y = _y + 2 + _topPadding + displayLine * kConsoleLineHeight;
_caretVisible = !erase;
g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + kConsoleLineHeight), erase);
diff --git a/gui/console.h b/gui/console.h
index 2445005afc..8a9659c1e9 100644
--- a/gui/console.h
+++ b/gui/console.h
@@ -167,7 +167,7 @@ protected:
int pos2line(int pos) { return (pos - (_scrollLine - _linesPerPage + 1) * kCharsPerLine) / kCharsPerLine; }
- void drawLine(int line, bool restoreBg = true);
+ void drawLine(int line);
void drawCaret(bool erase);
void printCharIntern(int c);
void insertIntoPrompt(const char *str);
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 312f410b32..49f5e05d7b 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -43,6 +43,9 @@ const char *defaultXML1 = "<?xml version = '1.0'?>"
"<font id='tooltip_normal' "
"file='fixed5x8.bdf' "
"/>"
+"<font id='console' "
+"file='builtinConsole' "
+"/>"
"<text_color id='color_normal' "
"color='green' "
"/>"
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index a71e815e42..6bd0fc9522 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index 2523c45755..a2cc42e1b7 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.26:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.27:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_gfx.stx b/gui/themes/scummclassic/classic_gfx.stx
index 1311345621..8b72802ef7 100644
--- a/gui/themes/scummclassic/classic_gfx.stx
+++ b/gui/themes/scummclassic/classic_gfx.stx
@@ -64,6 +64,9 @@
<font id = 'tooltip_normal'
file = 'fixed5x8.bdf'
/>
+ <font id = 'console'
+ file = 'builtinConsole'
+ />
<text_color id = 'color_normal'
color = 'green'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 919d955b8c..686716cdc2 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 458e66808f..9bf2fac6f9 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.26:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.27:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx
index e3d2152e4b..8b884abcc2 100644
--- a/gui/themes/scummmodern/scummmodern_gfx.stx
+++ b/gui/themes/scummmodern/scummmodern_gfx.stx
@@ -161,6 +161,23 @@
scalable_file = 'FreeMonoBold.ttf'
point_size = '8'
/>
+ <font id = 'console'
+ file = 'builtinConsole'
+ scalable_file = 'SourceCodeVariable-Roman.ttf'
+ point_size = '12'
+ />
+ <font resolution = 'y<800'
+ id = 'console'
+ file = 'builtinConsole'
+ scalable_file = 'SourceCodeVariable-Roman.ttf'
+ point_size = '10'
+ />
+ <font resolution = 'y<400'
+ id = 'console'
+ file = 'builtinConsole'
+ scalable_file = 'SourceCodeVariable-Roman.ttf'
+ point_size = '8'
+ />
<text_color id = 'color_normal'
color = 'black'
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 058a460955..e60ea04a3a 100644
--- a/gui/themes/scummremastered.zip
+++ b/gui/themes/scummremastered.zip
Binary files differ
diff --git a/gui/themes/scummremastered/THEMERC b/gui/themes/scummremastered/THEMERC
index 4d281d7b5e..0f8b7055b7 100644
--- a/gui/themes/scummremastered/THEMERC
+++ b/gui/themes/scummremastered/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.26:ScummVM Modern Theme Remastered:No Author]
+[SCUMMVM_STX0.8.27:ScummVM Modern Theme Remastered:No Author]
diff --git a/gui/themes/scummremastered/remastered_gfx.stx b/gui/themes/scummremastered/remastered_gfx.stx
index d65896d3a6..f5144321a0 100644
--- a/gui/themes/scummremastered/remastered_gfx.stx
+++ b/gui/themes/scummremastered/remastered_gfx.stx
@@ -162,6 +162,23 @@
scalable_file = 'FreeSans.ttf'
point_size = '11'
/>
+ <font id = 'console'
+ file = 'builtinConsole'
+ scalable_file = 'SourceCodeVariable-Roman.ttf'
+ point_size = '12'
+ />
+ <font resolution = 'y<800'
+ id = 'console'
+ file = 'builtinConsole'
+ scalable_file = 'SourceCodeVariable-Roman.ttf'
+ point_size = '10'
+ />
+ <font resolution = 'y<400'
+ id = 'console'
+ file = 'builtinConsole'
+ scalable_file = 'SourceCodeVariable-Roman.ttf'
+ point_size = '8'
+ />
<text_color id = 'color_normal'
color = 'black'