summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Günther <tom@toms-cafe.de>2008-01-07 01:04:25 +0100
committerThomas Günther <tom@toms-cafe.de>2008-01-07 01:04:25 +0100
commit1fb307a1eb363d08e847dcef8433fd0a537ee8b8 (patch)
tree2d3ece35221777e412eee1478a3d293f66f25fb4
parentbc3202042e4b378c1e5719a80bd7ae0868aa9cbe (diff)
downloadvdr-plugin-sudoku-1fb307a1eb363d08e847dcef8433fd0a537ee8b8.tar.gz
vdr-plugin-sudoku-1fb307a1eb363d08e847dcef8433fd0a537ee8b8.tar.bz2
Paint numbers with a larger font
-rw-r--r--HISTORY1
-rw-r--r--menu.cpp9
-rw-r--r--menu.h3
3 files changed, 9 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index 93347bf..21bbb5a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -32,3 +32,4 @@ ____-__-__: Version _._._
- Fixed (un)marking the cell on the bottom right.
- Show possible numbers as pattern.
- Show possible numbers as digits (VDR >= 1.5.4).
+- Paint numbers with a larger font (VDR >= 1.5.4).
diff --git a/menu.cpp b/menu.cpp
index 0904783..f565a1c 100644
--- a/menu.cpp
+++ b/menu.cpp
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * $Id: menu.cpp 110 2008-01-06 23:32:09Z tom $
+ * $Id: menu.cpp 111 2008-01-07 00:04:25Z tom $
*/
#include "menu.h"
@@ -70,9 +70,11 @@ Menu::Menu(const SetupData& setup, Puzzle& puzzle, Pos& curr) :
infoText = NULL;
new_puzzle_request = false;
#if VDRVERSNUM >= 10504
+ maxi_font = cFont::CreateFont(Setup.FontOsd, 3 * CELL_SIZE / 4, CELL_SIZE);
mini_font = cFont::CreateFont(Setup.FontOsd, 3 * CELL_SIZE / RDIM / 4,
CELL_SIZE / RDIM);
#else
+ maxi_font = cFont::GetFont(fontFix);
mini_font = NULL;
#endif
}
@@ -81,6 +83,7 @@ Menu::Menu(const SetupData& setup, Puzzle& puzzle, Pos& curr) :
Menu::~Menu()
{
#if VDRVERSNUM >= 10504
+ delete maxi_font;
delete mini_font;
#endif
delete info;
@@ -218,8 +221,8 @@ void Menu::paint()
if (puzzle.get(p) != 0)
{
char txt[2] = { '0' + puzzle.get(p), 0 };
- const cFont* font = cFont::GetFont(fontFix);
- osd->DrawText(x1, y1, txt, fg, bg, font, CELL_SIZE, CELL_SIZE, taCenter);
+ osd->DrawText(x1, y1, txt, fg, bg, maxi_font,
+ CELL_SIZE, CELL_SIZE, taCenter);
}
else if (setup.show_possibles_pattern || setup.show_possibles_digits)
{
diff --git a/menu.h b/menu.h
index de51041..cc86d74 100644
--- a/menu.h
+++ b/menu.h
@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * $Id: menu.h 110 2008-01-06 23:32:09Z tom $
+ * $Id: menu.h 111 2008-01-07 00:04:25Z tom $
*/
#ifndef VDR_SUDOKU_MENU_H
@@ -47,6 +47,7 @@ namespace SudokuPlugin
Bitmap* info;
const char* infoText;
bool new_puzzle_request;
+ const cFont* maxi_font;
const cFont* mini_font;
public: