Reworked fonts a little. Added small/medium/large fonts as choices for

launcherfont.  Also added a small font for use in 'small' systems
(currently defined as systems where max resolution is 320x240).  If
such as system is detected, Stella will automatically switch to the small
font for in-game UI and launcher.  Of course, the debugger will still
be larger size, but in that case, it's impossible to resize it anyway.
Still TODO is make sure the TIA actually uses only 1x zoom mode (in fact,
I may add a commandline option to force this, which is very useful for
testing emulation of 'small' systems on a normal-sized display.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1597 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-01-04 22:27:44 +00:00
parent e6e5dd1caf
commit 94ad760481
32 changed files with 6409 additions and 3645 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: CheatCodeDialog.cxx,v 1.24 2009-01-04 02:28:12 stephena Exp $
// $Id: CheatCodeDialog.cxx,v 1.25 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -37,21 +37,26 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CheatCodeDialog::CheatCodeDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h)
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0)
{
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
buttonWidth = font.getStringWidth("Defaults") + 20,
buttonHeight = font.getLineHeight() + 4;
int xpos, ypos;
WidgetArray wid;
ButtonWidget* b;
// Set real dimensions
_w = 46 * fontWidth + 10;
_h = 11 * (lineHeight + 4) + 10;
// List of cheats, with checkboxes to enable/disable
xpos = 10; ypos = 10;
myCheatList =
new CheckListWidget(this, font, xpos, ypos, _w - buttonWidth - 25,
_h - 3*lineHeight);
_h - 2*buttonHeight - 10);
myCheatList->setStyle(kXFill);
myCheatList->setEditable(false);
wid.push_back(myCheatList);

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: CheatCodeDialog.hxx,v 1.11 2009-01-01 18:13:34 stephena Exp $
// $Id: CheatCodeDialog.hxx,v 1.12 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -42,7 +42,7 @@ class CheatCodeDialog : public Dialog
{
public:
CheatCodeDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
const GUI::Font& font);
~CheatCodeDialog();
protected:

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: OSystem.cxx,v 1.141 2009-01-03 22:57:12 stephena Exp $
// $Id: OSystem.cxx,v 1.142 2009-01-04 22:27:43 stephena Exp $
//============================================================================
#include <cassert>
@ -53,6 +53,7 @@
#include "Launcher.hxx"
#include "Font.hxx"
#include "StellaFont.hxx"
#include "StellaMediumFont.hxx"
#include "StellaLargeFont.hxx"
#include "ConsoleFont.hxx"
#include "Widget.hxx"
@ -179,17 +180,44 @@ bool OSystem::create()
// it may be needed to initialize the size of graphical objects
queryVideoHardware();
////////////////////////////////////////////////////////////////////
// Create fonts to draw text
// TODO - this should be configurable, and also depend on the minimum
// size of the launcher and maximum size of the TIA window
// The logic must be taken care of here, so the GUI classes
// can just create the interface and not worry about checking
myFont = new GUI::Font(GUI::stellaDesc);
// NOTE: the logic determining appropriate font sizes is done here,
// so that the UI classes can just use the font they expect,
// and not worry about it
// This logic should also take into account the size of the
// framebuffer, and try to be intelligent about font sizes
// We can probably add ifdefs to take care of corner cases,
// but the means we've failed to abstract it enough ...
////////////////////////////////////////////////////////////////////
bool smallScreen = myDesktopWidth <= 320 || myDesktopHeight <= 240;
// This font is used in a variety of situations when a really small
// font is needed; we let the specific widget/dialog decide when to
// use it
mySmallFont = new GUI::Font(GUI::stellaDesc);
// The console font is always the same size (for now at least)
myConsoleFont = new GUI::Font(GUI::consoleDesc);
// The general font used in all UI elements
// This is determined by the size of the framebuffer
myFont = new GUI::Font(smallScreen ? GUI::stellaDesc : GUI::stellaMediumDesc);
// The font used by the ROM launcher
// Normally, this is configurable by the user, except in the case of
// very small screens
if(!smallScreen)
{
if(mySettings->getString("launcherfont") == "small")
myLauncherFont = new GUI::Font(GUI::stellaDesc);
myLauncherFont = new GUI::Font(GUI::consoleDesc);
else if(mySettings->getString("launcherfont") == "medium")
myLauncherFont = new GUI::Font(GUI::stellaMediumDesc);
else
myLauncherFont = new GUI::Font(GUI::stellaLargeDesc);
}
else
myLauncherFont = new GUI::Font(GUI::stellaDesc);
// Create the event handler for the system
myEventHandler = new EventHandler(this);

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: OSystem.hxx,v 1.72 2009-01-03 22:57:12 stephena Exp $
// $Id: OSystem.hxx,v 1.73 2009-01-04 22:27:43 stephena Exp $
//============================================================================
#ifndef OSYSTEM_HXX
@ -56,7 +56,7 @@ typedef Common::Array<Resolution> ResolutionList;
other objects belong.
@author Stephen Anthony
@version $Id: OSystem.hxx,v 1.72 2009-01-03 22:57:12 stephena Exp $
@version $Id: OSystem.hxx,v 1.73 2009-01-04 22:27:43 stephena Exp $
*/
class OSystem
{
@ -182,6 +182,13 @@ class OSystem
inline CheatManager& cheat() const { return *myCheatManager; }
#endif
/**
Get the small font object of the system
@return The font reference
*/
inline const GUI::Font& smallFont() const { return *mySmallFont; }
/**
Get the font object of the system
@ -501,6 +508,9 @@ class OSystem
string myFeatures;
// The font object to use when space is very limited
GUI::Font* mySmallFont;
// The font object to use for the normal in-game GUI
GUI::Font* myFont;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Settings.cxx,v 1.153 2009-01-03 22:57:12 stephena Exp $
// $Id: Settings.cxx,v 1.154 2009-01-04 22:27:43 stephena Exp $
//============================================================================
#include <cassert>
@ -88,7 +88,7 @@ Settings::Settings(OSystem* osystem)
// ROM browser options
setInternal("launcherres", "640x480");
setInternal("launcherfont", "small");
setInternal("launcherfont", "medium");
setInternal("romviewer", "0");
setInternal("lastrom", "");
@ -258,8 +258,8 @@ void Settings::validate()
setInternal("palette", "standard");
s = getString("launcherfont");
if(s != "small" && s != "large")
setInternal("launcherfont", "small");
if(s != "small" && s != "medium" && s != "large")
setInternal("launcherfont", "medium");
i = getInt("romviewer");
if(i < 0)
@ -332,7 +332,8 @@ void Settings::usage()
<< " -listrominfo Display contents of stella.pro, one line per ROM entry\n"
<< " -rominfo <rom> Display detailed information for the given ROM\n"
<< " -launcherres <WxH> The resolution to use in ROM launcher mode\n"
<< " -launcherfont <small|large> Use small or large font in the ROM launcher\n"
<< " -launcherfont <small|medium| Use the specified font in the ROM launcher\n"
<< " large>\n"
<< " -uipalette <1|2> Used the specified palette for UI elements\n"
<< " -mwheel <lines> Number of lines the mouse wheel will scroll in UI\n"
<< " -statedir <dir> Directory in which to save state files\n"

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: AboutDialog.cxx,v 1.29 2009-01-03 22:57:12 stephena Exp $
// $Id: AboutDialog.cxx,v 1.30 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -31,18 +31,23 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h),
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0),
myPage(1),
myNumPages(6)
{
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
buttonWidth = font.getStringWidth("Defaults") + 20,
buttonHeight = font.getLineHeight() + 4;
int xpos, ypos;
WidgetArray wid;
// Set real dimensions
_w = 52 * fontWidth + 10;
_h = 12 * lineHeight + 20;
// Add Previous, Next and Close buttons
xpos = 10; ypos = _h - buttonHeight - 10;
myPrevButton =

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: AboutDialog.hxx,v 1.9 2009-01-01 18:13:38 stephena Exp $
// $Id: AboutDialog.hxx,v 1.10 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -35,7 +35,7 @@ class AboutDialog : public Dialog
{
public:
AboutDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
const GUI::Font& font);
~AboutDialog();
protected:

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: AudioDialog.cxx,v 1.30 2009-01-01 18:13:38 stephena Exp $
// $Id: AudioDialog.cxx,v 1.31 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -38,8 +38,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h)
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0)
{
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
@ -53,8 +53,8 @@ AudioDialog::AudioDialog(OSystem* osystem, DialogContainer* parent,
StringMap items;
// Set real dimensions
// _w = 35 * fontWidth + 10;
// _h = 8 * (lineHeight + 4) + 10;
_w = 35 * fontWidth + 10;
_h = 8 * (lineHeight + 4) + 10;
// Volume
xpos = 3 * fontWidth; ypos = 10;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: AudioDialog.hxx,v 1.13 2009-01-01 18:13:38 stephena Exp $
// $Id: AudioDialog.hxx,v 1.14 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -36,8 +36,7 @@ class CheckboxWidget;
class AudioDialog : public Dialog
{
public:
AudioDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
AudioDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font);
~AudioDialog();
protected:

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: BrowserDialog.cxx,v 1.34 2009-01-02 01:50:03 stephena Exp $
// $Id: BrowserDialog.cxx,v 1.35 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -22,6 +22,7 @@
#include "bspf.hxx"
#include "Dialog.hxx"
#include "DialogContainer.hxx"
#include "FSNode.hxx"
#include "GameList.hxx"
#include "GuiObject.hxx"
@ -38,9 +39,8 @@
*/
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h)
: Dialog(&boss->instance(), &boss->parent(), x, y, w, h),
BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font)
: Dialog(&boss->instance(), &boss->parent(), 0, 0, 0, 0),
CommandSender(boss),
_fileList(NULL),
_currentPath(NULL),
@ -55,8 +55,8 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font,
// Set real dimensions
// This is one dialog that can take as much space as is available
// _w = _DLG_MIN_SWIDTH - 30;
// _h = _DLG_MIN_SHEIGHT - 30;
_w = BSPF_min(instance().desktopWidth(), 480u);
_h = BSPF_min(instance().desktopHeight(), 380u);
xpos = 10; ypos = 4;
_title = new StaticTextWidget(this, font, xpos, ypos,
@ -114,9 +114,23 @@ BrowserDialog::~BrowserDialog()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void BrowserDialog::setStartPath(const string& startpath,
FilesystemNode::ListMode mode)
void BrowserDialog::show(const string& title, const string& startpath,
FilesystemNode::ListMode mode, int cmd)
{
// TODO - dialog has to be added before any settings are changed,
// since (for example) changing the title triggers a redraw,
// and the dialog must be added (so it exists) for that to happen
// Fixing this requires changes to the underlying widget classes
// (ie, changing a widgets contents should signal its dialog that a
// redraw is necessary; it shouldn't be responsible for redraw itself)
//
// Doing it this way has the unfortunate side effect that a previous
// title is temporarily visible when re-using the browser for different
// purposes
parent().addDialog(this);
_title->setLabel(title);
_cmd = cmd;
_mode = mode;
// If no node has been set, or the last used one is now invalid,

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: BrowserDialog.hxx,v 1.14 2009-01-01 18:13:38 stephena Exp $
// $Id: BrowserDialog.hxx,v 1.15 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -36,16 +36,14 @@ class GameList;
class BrowserDialog : public Dialog, public CommandSender
{
public:
BrowserDialog(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h);
BrowserDialog(GuiObject* boss, const GUI::Font& font);
virtual ~BrowserDialog();
const FilesystemNode& getResult() { return _node; }
void setTitle(const string& title) { _title->setLabel(title); }
void setEmitSignal(int cmd) { _cmd = cmd; }
void setStartPath(const string& startpath, FilesystemNode::ListMode mode);
/** Place the browser window onscreen, using the given attributes */
void show(const string& title, const string& startpath,
FilesystemNode::ListMode mode, int cmd);
protected:
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FileSnapDialog.cxx,v 1.24 2009-01-03 22:57:12 stephena Exp $
// $Id: FileSnapDialog.cxx,v 1.25 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -22,7 +22,6 @@
#include "bspf.hxx"
#include "BrowserDialog.hxx"
#include "DialogContainer.hxx"
#include "EditTextWidget.hxx"
#include "FSNode.hxx"
#include "LauncherDialog.hxx"
@ -33,14 +32,14 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileSnapDialog::FileSnapDialog(
OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, GuiObject* boss,
int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h),
const GUI::Font& font, GuiObject* boss)
: Dialog(osystem, parent, 0, 0, 0, 0),
CommandSender(boss),
myBrowser(NULL),
myIsGlobal(boss != 0)
{
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
buttonWidth = font.getStringWidth("Properties file:") + 20,
buttonHeight = font.getLineHeight() + 4;
const int vBorder = 8;
@ -49,8 +48,8 @@ FileSnapDialog::FileSnapDialog(
ButtonWidget* b;
// Set real dimensions
// _w = 50 * fontWidth + 10;
// _h = 11 * (lineHeight + 4) + 10;
_w = 52 * fontWidth + 10;
_h = 10 * (lineHeight + 4) + 10;
xpos = vBorder; ypos = vBorder;
@ -143,7 +142,7 @@ FileSnapDialog::FileSnapDialog(
}
// Create file browser dialog
myBrowser = new BrowserDialog(this, font, 0, 0, 400, 320);
myBrowser = new BrowserDialog(this, font);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -204,17 +203,6 @@ void FileSnapDialog::setDefaults()
mySnap1x->setState(false);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FileSnapDialog::openBrowser(const string& title, const string& startpath,
FilesystemNode::ListMode mode, int cmd)
{
parent().addDialog(myBrowser);
myBrowser->setTitle(title);
myBrowser->setEmitSignal(cmd);
myBrowser->setStartPath(startpath, mode);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
int data, int id)
@ -233,32 +221,32 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
break;
case kChooseRomDirCmd:
openBrowser("Select ROM directory:", myRomPath->getEditString(),
myBrowser->show("Select ROM directory:", myRomPath->getEditString(),
FilesystemNode::kListDirectoriesOnly, kRomDirChosenCmd);
break;
case kChooseStateDirCmd:
openBrowser("Select state directory:", myStatePath->getEditString(),
myBrowser->show("Select state directory:", myStatePath->getEditString(),
FilesystemNode::kListDirectoriesOnly, kStateDirChosenCmd);
break;
case kChooseCheatFileCmd:
openBrowser("Select cheat file:", myCheatFile->getEditString(),
myBrowser->show("Select cheat file:", myCheatFile->getEditString(),
FilesystemNode::kListAll, kCheatFileChosenCmd);
break;
case kChoosePaletteFileCmd:
openBrowser("Select palette file:", myPaletteFile->getEditString(),
myBrowser->show("Select palette file:", myPaletteFile->getEditString(),
FilesystemNode::kListAll, kPaletteFileChosenCmd);
break;
case kChoosePropsFileCmd:
openBrowser("Select properties file:", myPropsFile->getEditString(),
myBrowser->show("Select properties file:", myPropsFile->getEditString(),
FilesystemNode::kListAll, kPropsFileChosenCmd);
break;
case kChooseSnapDirCmd:
openBrowser("Select snapshot directory:", mySnapPath->getEditString(),
myBrowser->show("Select snapshot directory:", mySnapPath->getEditString(),
FilesystemNode::kListDirectoriesOnly, kSnapDirChosenCmd);
break;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FileSnapDialog.hxx,v 1.12 2009-01-03 22:57:12 stephena Exp $
// $Id: FileSnapDialog.hxx,v 1.13 2009-01-04 22:27:43 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -38,8 +38,7 @@ class FileSnapDialog : public Dialog, public CommandSender
{
public:
FileSnapDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, GuiObject* boss,
int x, int y, int w, int h);
const GUI::Font& font, GuiObject* boss);
~FileSnapDialog();
void handleCommand(CommandSender* sender, int cmd, int data, int id);
@ -49,9 +48,6 @@ class FileSnapDialog : public Dialog, public CommandSender
void saveConfig();
void setDefaults();
void openBrowser(const string& title, const string& startpath,
FilesystemNode::ListMode mode, int cmd);
private:
enum {
kChooseRomDirCmd = 'LOrm', // rom select

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: GameInfoDialog.cxx,v 1.62 2009-01-02 01:50:03 stephena Exp $
// $Id: GameInfoDialog.cxx,v 1.63 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -36,8 +36,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GameInfoDialog::GameInfoDialog(
OSystem* osystem, DialogContainer* parent, const GUI::Font& font,
GuiObject* boss, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h),
GuiObject* boss)
: Dialog(osystem, parent, 0, 0, 0, 0),
CommandSender(boss),
myPropertiesLoaded(false),
myDefaultsSelected(false)
@ -52,6 +52,10 @@ GameInfoDialog::GameInfoDialog(
WidgetArray wid;
StringMap items, ports, ctrls;
// Set real dimensions
_w = 54 * fontWidth + 10;
_h = 12 * (lineHeight + 4) + 10;
////////////////////////////////////////////////////////////////////
// Some of the following items are also present in GlobalPropsDialog
// If any changes are ever made here, GlobalPropsDialog should also

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: GameInfoDialog.hxx,v 1.36 2009-01-02 01:50:03 stephena Exp $
// $Id: GameInfoDialog.hxx,v 1.37 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -40,8 +40,7 @@ class GameInfoDialog : public Dialog, public CommandSender
{
public:
GameInfoDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, GuiObject* boss,
int x, int y, int w, int h);
const GUI::Font& font, GuiObject* boss);
virtual ~GameInfoDialog();
protected:

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: GlobalPropsDialog.cxx,v 1.1 2009-01-02 01:50:03 stephena Exp $
// $Id: GlobalPropsDialog.cxx,v 1.2 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -33,12 +33,12 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GlobalPropsDialog::
GlobalPropsDialog(GuiObject* boss, const GUI::Font& font, Settings& settings,
int x, int y, int w, int h)
: Dialog(&boss->instance(), &boss->parent(), x, y, w, h),
GlobalPropsDialog(GuiObject* boss, const GUI::Font& font, Settings& settings)
: Dialog(&boss->instance(), &boss->parent(), 0, 0, 0, 0),
mySettings(settings)
{
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
buttonWidth = font.getStringWidth("Defaults") + 20,
buttonHeight = font.getLineHeight() + 4;
@ -48,6 +48,10 @@ GlobalPropsDialog::
WidgetArray wid;
StringMap items;
// Set real dimensions
_w = lwidth + pwidth + fontWidth*3 + 15;
_h = 10 * (lineHeight + 4) + buttonHeight + 10;
xpos = 10; ypos = 10;
////////////////////////////////////////////////////////////////////

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: GlobalPropsDialog.hxx,v 1.1 2009-01-02 01:50:03 stephena Exp $
// $Id: GlobalPropsDialog.hxx,v 1.2 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -35,9 +35,8 @@ class PopUpWidget;
class GlobalPropsDialog : public Dialog
{
public:
GlobalPropsDialog(GuiObject* boss, const GUI::Font& font, Settings& settings,
int x, int y, int w, int h);
~GlobalPropsDialog();
GlobalPropsDialog(GuiObject* boss, const GUI::Font& font, Settings& settings);
virtual ~GlobalPropsDialog();
private:
void loadConfig();

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: HelpDialog.cxx,v 1.27 2009-01-01 18:13:38 stephena Exp $
// $Id: HelpDialog.cxx,v 1.28 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -29,8 +29,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h),
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0),
myPage(1),
myNumPages(4)
{
@ -42,6 +42,10 @@ HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent,
int xpos, ypos;
WidgetArray wid;
// Set real dimensions
_w = 46 * fontWidth + 10;
_h = 12 * lineHeight + 20;
// Add Previous, Next and Close buttons
xpos = 10; ypos = _h - buttonHeight - 10;
myPrevButton =

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: HelpDialog.hxx,v 1.11 2009-01-01 18:13:38 stephena Exp $
// $Id: HelpDialog.hxx,v 1.12 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -40,8 +40,7 @@ class StaticTextWidget;
class HelpDialog : public Dialog
{
public:
HelpDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
HelpDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font);
~HelpDialog();
protected:

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: InputDialog.cxx,v 1.35 2009-01-01 18:13:38 stephena Exp $
// $Id: InputDialog.cxx,v 1.36 2009-01-04 22:27:44 stephena Exp $
//============================================================================
#include "bspf.hxx"
@ -35,17 +35,19 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
InputDialog::InputDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h)
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0)
{
const int buttonHeight = font.getLineHeight() + 4;
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
buttonHeight = font.getLineHeight() + 4;
const int vBorder = 4;
int xpos, ypos, tabID;
WidgetArray wid;
// Set real dimensions
// _w = 42 * fontWidth + 10;
// _h = 12 * (lineHeight + 4) + 10;
_w = 42 * fontWidth + 10;
_h = 12 * (lineHeight + 4) + 10;
// The tab widget
xpos = 2; ypos = vBorder;
@ -123,7 +125,7 @@ void InputDialog::addVDeviceTab(const GUI::Font& font)
wid.push_back(myRightPort);
lwidth = font.getStringWidth("Paddle threshold: ");
pwidth = font.getMaxCharWidth() * 5;
pwidth = font.getMaxCharWidth() * 8;
// Add joystick deadzone setting
ypos += 2*lineHeight;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: InputDialog.hxx,v 1.19 2009-01-01 18:13:38 stephena Exp $
// $Id: InputDialog.hxx,v 1.20 2009-01-04 22:27:44 stephena Exp $
//============================================================================
#ifndef INPUT_DIALOG_HXX
@ -36,7 +36,7 @@ class InputDialog : public Dialog
{
public:
InputDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
const GUI::Font& font);
~InputDialog();
protected:

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: LauncherDialog.cxx,v 1.96 2009-01-04 02:28:12 stephena Exp $
// $Id: LauncherDialog.cxx,v 1.97 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -100,8 +100,9 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
if(romWidth > 0)
{
xpos += myList->getWidth() + 5;
myRomInfoWidget = new RomInfoWidget(this, instance().consoleFont(), xpos, ypos,
romWidth, myList->getHeight());
myRomInfoWidget =
new RomInfoWidget(this, romWidth < 660 ? instance().smallFont() : instance().consoleFont(),
xpos, ypos, romWidth, myList->getHeight());
}
// Add note textwidget to show any notes for the currently selected ROM
@ -168,13 +169,12 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
l.push_back("Override properties", "override");
l.push_back("Filter listing", "filter");
l.push_back("Reload listing", "reload");
myMenu = new ContextMenu(this, font, l);
myMenu = new ContextMenu(this, osystem->font(), l);
// Create global props dialog, which is uses to to temporarily overrride
// ROM properties
myGlobalProps =
new GlobalPropsDialog(this, osystem->font(), osystem->settings(),
0, 0, 440, 270);
new GlobalPropsDialog(this, osystem->font(), osystem->settings());
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: OptionsDialog.cxx,v 1.76 2009-01-01 18:13:38 stephena Exp $
// $Id: OptionsDialog.cxx,v 1.77 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -115,16 +115,11 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent,
wid.push_back(b);
addCancelWidget(b);
// Set some sane values for the dialog boxes
int x = 0, y = 0, w, h;
// Now create all the dialogs attached to each menu button
w = 410; h = 275;
myVideoDialog = new VideoDialog(osystem, parent, font, x, y, w, h);
w = 285; h = 200;
myAudioDialog = new AudioDialog(osystem, parent, font, x, y, w, h);
myVideoDialog = new VideoDialog(osystem, parent, font);
myAudioDialog = new AudioDialog(osystem, parent, font);
/* FIXME - may not be needed with small-font functionality
#ifdef _WIN32_WCE
// FIXME - adjust size for WINCE using a smaller font
// we scale the input dialog down a bit in low res devices.
@ -134,31 +129,17 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent,
#else
w = 380; h = 310;
#endif
myInputDialog = new InputDialog(osystem, parent, font, x, y, w, h);
w = 380; h = 220;
myUIDialog = new UIDialog(osystem, parent, font, x, y, w, h);
w = 480; h = 250;
myFileSnapDialog = new FileSnapDialog(osystem, parent, font,
boss, x, y, w, h);
w = 440; h = 160;
myRomAuditDialog = new RomAuditDialog(osystem, parent, font, x, y, w, h);
w = 470; h = 300;
myGameInfoDialog = new GameInfoDialog(osystem, parent, font, this, x, y, w, h);
*/
myInputDialog = new InputDialog(osystem, parent, font);
myUIDialog = new UIDialog(osystem, parent, font);
myFileSnapDialog = new FileSnapDialog(osystem, parent, font, boss);
myRomAuditDialog = new RomAuditDialog(osystem, parent, font);
myGameInfoDialog = new GameInfoDialog(osystem, parent, font, this);
#ifdef CHEATCODE_SUPPORT
w = 380; h = 240;
myCheatCodeDialog = new CheatCodeDialog(osystem, parent, font, x, y, w, h);
myCheatCodeDialog = new CheatCodeDialog(osystem, parent, font);
#endif
w = 420; h = 270;
myHelpDialog = new HelpDialog(osystem, parent, font, x, y, w, h);
w = 480; h = 270;
myAboutDialog = new AboutDialog(osystem, parent, font, x, y, w, h);
myHelpDialog = new HelpDialog(osystem, parent, font);
myAboutDialog = new AboutDialog(osystem, parent, font);
addToFocusList(wid);
@ -174,6 +155,7 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent,
#ifdef _WIN32_WCE
myAudioSettingsButton->clearFlags(WIDGET_ENABLED); // not honored in wince port
#endif
//FIXME - this may no longer be true (with the new small font functionality)
if(instance().desktopWidth() < 320)
{
// These cannot be displayed in low res devices

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: RomAuditDialog.cxx,v 1.8 2009-01-01 18:13:39 stephena Exp $
// $Id: RomAuditDialog.cxx,v 1.9 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -34,38 +34,44 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RomAuditDialog::RomAuditDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font,
int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h),
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0),
myBrowser(NULL)
{
const int vBorder = 8;
const int bwidth = font.getStringWidth("Audit path:") + 20,
bheight = font.getLineHeight() + 4,
fontHeight = font.getLineHeight(),
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(),
buttonWidth = font.getStringWidth("Audit path:") + 20,
buttonHeight = font.getLineHeight() + 4,
lwidth = font.getStringWidth("ROMs with properties (renamed): ");
int xpos = vBorder, ypos = vBorder;
WidgetArray wid;
// Set real dimensions
_w = 44 * fontWidth + 10;
_h = 7 * (lineHeight + 4) + 10;
// Audit path
ButtonWidget* romButton =
new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, "Audit path:",
kChooseAuditDirCmd);
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Audit path:", kChooseAuditDirCmd);
wid.push_back(romButton);
xpos += bwidth + 10;
xpos += buttonWidth + 10;
myRomPath = new EditTextWidget(this, font, xpos, ypos + 2,
_w - xpos - 10, font.getLineHeight(), "");
_w - xpos - 10, lineHeight, "");
wid.push_back(myRomPath);
// Show results of ROM audit
xpos = vBorder + 10; ypos += bheight + 10;
xpos = vBorder + 10; ypos += buttonHeight + 10;
new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight,
"ROMs with properties (renamed): ", kTextAlignLeft);
myResults1 = new StaticTextWidget(this, font, xpos + lwidth, ypos,
_w - lwidth - 20, fontHeight, "",
kTextAlignLeft);
myResults1->setFlags(WIDGET_CLEARBG);
ypos += bheight;
ypos += buttonHeight;
new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight,
"ROMs without properties: ", kTextAlignLeft);
myResults2 = new StaticTextWidget(this, font, xpos + lwidth, ypos,
@ -73,9 +79,9 @@ RomAuditDialog::RomAuditDialog(OSystem* osystem, DialogContainer* parent,
kTextAlignLeft);
myResults2->setFlags(WIDGET_CLEARBG);
ypos += bheight + 8;
ypos += buttonHeight + 8;
new StaticTextWidget(this, font, xpos, ypos, _w - 20, fontHeight,
"(*) Warning: this operation cannot be undone",
"(*) WARNING: operation cannot be undone",
kTextAlignLeft);
// Add OK and Cancel buttons
@ -84,7 +90,7 @@ RomAuditDialog::RomAuditDialog(OSystem* osystem, DialogContainer* parent,
addBGroupToFocusList(wid);
// Create file browser dialog
myBrowser = new BrowserDialog(this, font, 0, 0, 400, 320);
myBrowser = new BrowserDialog(this, font);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -158,17 +164,6 @@ void RomAuditDialog::auditRoms()
myResults2->setValue(notfound);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void RomAuditDialog::openBrowser(const string& title, const string& startpath,
FilesystemNode::ListMode mode, int cmd)
{
parent().addDialog(myBrowser);
myBrowser->setTitle(title);
myBrowser->setEmitSignal(cmd);
myBrowser->setStartPath(startpath, mode);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void RomAuditDialog::handleCommand(CommandSender* sender, int cmd,
int data, int id)
@ -180,7 +175,7 @@ void RomAuditDialog::handleCommand(CommandSender* sender, int cmd,
break;
case kChooseAuditDirCmd:
openBrowser("Select ROM directory to audit:", myRomPath->getEditString(),
myBrowser->show("Select ROM directory to audit:", myRomPath->getEditString(),
FilesystemNode::kListDirectoriesOnly, kAuditDirChosenCmd);
break;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: RomAuditDialog.hxx,v 1.2 2009-01-01 18:13:39 stephena Exp $
// $Id: RomAuditDialog.hxx,v 1.3 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -37,7 +37,7 @@ class RomAuditDialog : public Dialog
{
public:
RomAuditDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
const GUI::Font& font);
~RomAuditDialog();
void handleCommand(CommandSender* sender, int cmd, int data, int id);

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: RomInfoWidget.cxx,v 1.14 2009-01-03 22:57:12 stephena Exp $
// $Id: RomInfoWidget.cxx,v 1.15 2009-01-04 22:27:44 stephena Exp $
//============================================================================
#include <cstring>
@ -204,9 +204,10 @@ void RomInfoWidget::drawWidget(bool hilite)
}
else if(mySurfaceErrorMsg != "")
{
uInt32 x = _x + ((_w - _font->getStringWidth(mySurfaceErrorMsg)) >> 1);
uInt32 y = _y + ((yoff - _font->getLineHeight()) >> 1);
s.drawString(_font, mySurfaceErrorMsg, x, y, _w - 10, _textcolor);
const GUI::Font* font = &instance().font();
uInt32 x = _x + ((_w - font->getStringWidth(mySurfaceErrorMsg)) >> 1);
uInt32 y = _y + ((yoff - font->getLineHeight()) >> 1);
s.drawString(font, mySurfaceErrorMsg, x, y, _w - 10, _textcolor);
}
int xpos = _x + 5, ypos = _y + yoff + 10;
for(unsigned int i = 0; i < myRomInfo.size(); ++i)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: UIDialog.cxx,v 1.18 2009-01-03 15:44:13 stephena Exp $
// $Id: UIDialog.cxx,v 1.19 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -36,8 +36,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h)
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0)
{
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
@ -51,8 +51,8 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
StringMap items;
// Set real dimensions
// _w = 36 * fontWidth + 10;
// _h = 10 * (lineHeight + 4) + 10;
_w = 42 * fontWidth + 10;
_h = 9 * (lineHeight + 4) + 10;
// The tab widget
xpos = ypos = vBorder;
@ -99,6 +99,7 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
pwidth = font.getStringWidth("2x (1000x760)");
items.clear();
items.push_back("Small", "small");
items.push_back("Medium", "medium");
items.push_back("Large", "large");
myLauncherFontPopup =
new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items,
@ -255,7 +256,7 @@ void UIDialog::loadConfig()
// Launcher font
const string& font = instance().settings().getString("launcherfont");
myLauncherFontPopup->setSelected(font, "small");
myLauncherFontPopup->setSelected(font, "medium");
// ROM launcher info viewer
const string& viewer = instance().settings().getString("romviewer");
@ -328,7 +329,7 @@ void UIDialog::setDefaults()
myLauncherWidthLabel->setValue(w);
myLauncherHeightSlider->setValue(h);
myLauncherHeightLabel->setValue(h);
myLauncherFontPopup->setSelected("small", "");
myLauncherFontPopup->setSelected("medium", "");
myRomViewerPopup->setSelected("0", "");
break;
}

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: UIDialog.hxx,v 1.10 2009-01-01 18:13:39 stephena Exp $
// $Id: UIDialog.hxx,v 1.11 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -37,8 +37,7 @@ class TabWidget;
class UIDialog : public Dialog
{
public:
UIDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
UIDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font);
~UIDialog();
protected:

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: VideoDialog.cxx,v 1.59 2009-01-01 18:13:39 stephena Exp $
// $Id: VideoDialog.cxx,v 1.60 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -38,8 +38,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h)
const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0)
{
const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(),
@ -53,6 +53,10 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
WidgetArray wid;
StringMap items;
// Set real dimensions
_w = 46 * fontWidth + 10;
_h = 11 * (lineHeight + 4) + 10;
xpos = 5; ypos = 10;
// Video renderer

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: VideoDialog.hxx,v 1.27 2009-01-01 18:13:39 stephena Exp $
// $Id: VideoDialog.hxx,v 1.28 2009-01-04 22:27:44 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -37,8 +37,7 @@ class CheckboxWidget;
class VideoDialog : public Dialog
{
public:
VideoDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font, int x, int y, int w, int h);
VideoDialog(OSystem* osystem, DialogContainer* parent, const GUI::Font& font);
~VideoDialog();
private: