Changed 'dbg.boldfont' to dbg.fontstyle', which allows to use a combination

of bold and normal fonts within the debugger UI.  Because of the # of changes
this requires, this is as far as I'll willing to go with UI configurability.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2820 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-08-26 13:01:29 +00:00
parent ecacdcf5f2
commit 963c5d621b
121 changed files with 746 additions and 615 deletions

View File

@ -24,7 +24,7 @@
devices (paddles, trackball, etc). devices (paddles, trackball, etc).
* Added ability to use bold fonts within the debugger window, which can * Added ability to use bold fonts within the debugger window, which can
be set with the 'dbg.boldfont' commandline argument as well as in the be set with the 'dbg.fontstyle' commandline argument as well as in the
debugger UI Settings dialog. This is useful for those that find the debugger UI Settings dialog. This is useful for those that find the
current font too narrow. current font too narrow.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -2222,8 +2222,9 @@
</tr> </tr>
<tr> <tr>
<td><pre>-dbg.boldfont</pre></td> <td><pre>-dbg.fontstyle &lt;0|1|2|3&gt;</pre></td>
<td>Use bold fonts in the debugger window.</td> <td>How to use bold fonts in the debugger window. '0' means all normal font,
'1' is bold labels only, '2' is bold non-labels only, '3' is all bold font.</td>
</tr> </tr>
<tr> <tr>
@ -2482,7 +2483,8 @@
<table border="1" cellpadding="4"> <table border="1" cellpadding="4">
<tr><th>Item</th><th>Brief description</th><th>For more information,<br>see <a href="#CommandLine">CommandLine</a></th></tr> <tr><th>Item</th><th>Brief description</th><th>For more information,<br>see <a href="#CommandLine">CommandLine</a></th></tr>
<tr><td>Debugger Width/Height</td><td>self-explanatory (requires ROM reload)</td><td>-dbg.res</td></tr> <tr><td>Debugger Width/Height</td><td>self-explanatory (requires ROM reload)</td><td>-dbg.res</td></tr>
<tr><td>Use bold font ...</td><td>self-explanatory (requires ROM reload)</td><td>-dbg.boldfont</td></tr> <tr><td>Set window size for ...</td><td>self-explanatory presets (requires ROM reload)</td><td>N/A</td></tr>
<tr><td>Font Style</td><td>self-explanatory (requires ROM reload)</td><td>-dbg.fontstyle</td></tr>
</table> </table>
</td> </td>
</tr> </tr>

View File

@ -22,7 +22,7 @@
#include <cstdlib> #include <cstdlib>
#define STELLA_VERSION "3.9.2_pre" #define STELLA_VERSION "3.9.2_beta1"
#define STELLA_BUILD atoi("$Rev$" + 6) #define STELLA_BUILD atoi("$Rev$" + 6)
#endif #endif

View File

@ -156,7 +156,8 @@ class Debugger : public DialogContainer
*/ */
TIADebug& tiaDebug() const { return *myTiaDebug; } TIADebug& tiaDebug() const { return *myTiaDebug; }
const GUI::Font& font() const { return myDialog->font(); } const GUI::Font& lfont() const { return myDialog->lfont(); }
const GUI::Font& nlfont() const { return myDialog->nfont(); }
DebuggerParser& parser() const { return *myParser; } DebuggerParser& parser() const { return *myParser; }
PackedBitArray& breakpoints() const { return *myBreakPoints; } PackedBitArray& breakpoints() const { return *myBreakPoints; }
PackedBitArray& readtraps() const { return *myReadTraps; } PackedBitArray& readtraps() const { return *myReadTraps; }

View File

@ -1322,7 +1322,7 @@ void DebuggerParser::executeRunTo()
// disassembly, since this may be a time-consuming operation // disassembly, since this may be a time-consuming operation
ostringstream buf; ostringstream buf;
buf << "RunTo searching through " << max_iterations << " disassembled instructions"; buf << "RunTo searching through " << max_iterations << " disassembled instructions";
ProgressDialog progress(debugger.myBaseDialog, debugger.font(), buf.str()); ProgressDialog progress(debugger.myBaseDialog, debugger.lfont(), buf.str());
progress.setRange(0, max_iterations, 5); progress.setRange(0, max_iterations, 5);
bool done = false; bool done = false;

View File

@ -27,22 +27,23 @@
#include "AudioWidget.hxx" #include "AudioWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font, AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h) int x, int y, int w, int h)
: Widget(boss, font, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss) CommandSender(boss)
{ {
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = lfont.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = lfont.getFontHeight(),
lineHeight = font.getLineHeight(); lineHeight = lfont.getLineHeight();
int xpos = 10, ypos = 25, lwidth = font.getStringWidth("AUDW: "); int xpos = 10, ypos = 25, lwidth = lfont.getStringWidth("AUDW: ");
// AudF registers // AudF registers
new StaticTextWidget(boss, font, xpos, ypos+2, new StaticTextWidget(boss, lfont, xpos, ypos+2,
lwidth, fontHeight, lwidth, fontHeight,
"AUDF:", kTextAlignLeft); "AUDF:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myAudF = new DataGridWidget(boss, font, xpos, ypos, myAudF = new DataGridWidget(boss, nfont, xpos, ypos,
2, 1, 2, 5, Common::Base::F_16); 2, 1, 2, 5, Common::Base::F_16);
myAudF->setTarget(this); myAudF->setTarget(this);
myAudF->setID(kAUDFID); myAudF->setID(kAUDFID);
@ -51,7 +52,7 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font,
for(int col = 0; col < 2; ++col) for(int col = 0; col < 2; ++col)
{ {
new StaticTextWidget(boss, font, xpos + col*myAudF->colWidth() + 7, new StaticTextWidget(boss, lfont, xpos + col*myAudF->colWidth() + 7,
ypos - lineHeight, fontWidth, fontHeight, ypos - lineHeight, fontWidth, fontHeight,
Common::Base::toString(col, Common::Base::F_16_1), Common::Base::toString(col, Common::Base::F_16_1),
kTextAlignLeft); kTextAlignLeft);
@ -59,10 +60,10 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font,
// AudC registers // AudC registers
xpos = 10; ypos += lineHeight + 5; xpos = 10; ypos += lineHeight + 5;
new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,
"AUDC:", kTextAlignLeft); "AUDC:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myAudC = new DataGridWidget(boss, font, xpos, ypos, myAudC = new DataGridWidget(boss, nfont, xpos, ypos,
2, 1, 2, 4, Common::Base::F_16); 2, 1, 2, 4, Common::Base::F_16);
myAudC->setTarget(this); myAudC->setTarget(this);
myAudC->setID(kAUDCID); myAudC->setID(kAUDCID);
@ -71,10 +72,10 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font,
// AudV registers // AudV registers
xpos = 10; ypos += lineHeight + 5; xpos = 10; ypos += lineHeight + 5;
new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,
"AUDV:", kTextAlignLeft); "AUDV:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myAudV = new DataGridWidget(boss, font, xpos, ypos, myAudV = new DataGridWidget(boss, nfont, xpos, ypos,
2, 1, 2, 4, Common::Base::F_16); 2, 1, 2, 4, Common::Base::F_16);
myAudV->setTarget(this); myAudV->setTarget(this);
myAudV->setID(kAUDVID); myAudV->setID(kAUDVID);

View File

@ -30,7 +30,7 @@ class DataGridWidget;
class AudioWidget : public Widget, public CommandSender class AudioWidget : public Widget, public CommandSender
{ {
public: public:
AudioWidget(GuiObject* boss, const GUI::Font& font, AudioWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h); int x, int y, int w, int h);
virtual ~AudioWidget(); virtual ~AudioWidget();

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge0840Widget::Cartridge0840Widget( Cartridge0840Widget::Cartridge0840Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge0840& cart) int x, int y, int w, int h, Cartridge0840& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 2 * 4096; uInt16 size = 2 * 4096;
@ -51,9 +51,9 @@ Cartridge0840Widget::Cartridge0840Widget(
items.push_back("0 ($800)"); items.push_back("0 ($800)");
items.push_back("1 ($840)"); items.push_back("1 ($840)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($800) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($800) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class Cartridge0840Widget : public CartDebugWidget class Cartridge0840Widget : public CartDebugWidget
{ {
public: public:
Cartridge0840Widget(GuiObject* boss, const GUI::Font& font, Cartridge0840Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
Cartridge0840& cart); Cartridge0840& cart);
virtual ~Cartridge0840Widget() { } virtual ~Cartridge0840Widget() { }

View File

@ -22,9 +22,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge2KWidget::Cartridge2KWidget( Cartridge2KWidget::Cartridge2KWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge2K& cart) int x, int y, int w, int h, Cartridge2K& cart)
: CartDebugWidget(boss, font, x, y, w, h) : CartDebugWidget(boss, lfont, nfont, x, y, w, h)
{ {
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
uInt16 size = cart.mySize; uInt16 size = cart.mySize;

View File

@ -26,7 +26,8 @@ class Cartridge2K;
class Cartridge2KWidget : public CartDebugWidget class Cartridge2KWidget : public CartDebugWidget
{ {
public: public:
Cartridge2KWidget(GuiObject* boss, const GUI::Font& font, Cartridge2KWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
Cartridge2K& cart); Cartridge2K& cart);
virtual ~Cartridge2KWidget() { } virtual ~Cartridge2KWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge3EWidget::Cartridge3EWidget( Cartridge3EWidget::Cartridge3EWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge3E& cart) int x, int y, int w, int h, Cartridge3E& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart), myCart(cart),
myNumRomBanks(cart.mySize >> 11), myNumRomBanks(cart.mySize >> 11),
myNumRamBanks(32) myNumRamBanks(32)
@ -66,23 +66,23 @@ Cartridge3EWidget::Cartridge3EWidget(
label << "Set bank ($" << Common::Base::HEX4 << start << " - $" label << "Set bank ($" << Common::Base::HEX4 << start << " - $"
<< (start+0x7FF) << "): "; << (start+0x7FF) << "): ";
new StaticTextWidget(_boss, _font, xpos, ypos, font.getStringWidth(label.str()), new StaticTextWidget(_boss, _font, xpos, ypos, _font.getStringWidth(label.str()),
myFontHeight, label.str(), kTextAlignLeft); myFontHeight, label.str(), kTextAlignLeft);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
xpos += 40; xpos += 40;
myROMBank = myROMBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($3E) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($3E) "),
myLineHeight, romitems, "ROM ($3F): ", myLineHeight, romitems, "ROM ($3F): ",
font.getStringWidth("ROM ($3F): "), kROMBankChanged); _font.getStringWidth("ROM ($3F): "), kROMBankChanged);
myROMBank->setTarget(this); myROMBank->setTarget(this);
addFocusWidget(myROMBank); addFocusWidget(myROMBank);
xpos += myROMBank->getWidth() + 20; xpos += myROMBank->getWidth() + 20;
myRAMBank = myRAMBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($3E) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($3E) "),
myLineHeight, ramitems, "RAM ($3E): ", myLineHeight, ramitems, "RAM ($3E): ",
font.getStringWidth("RAM ($3E): "), kRAMBankChanged); _font.getStringWidth("RAM ($3E): "), kRAMBankChanged);
myRAMBank->setTarget(this); myRAMBank->setTarget(this);
addFocusWidget(myRAMBank); addFocusWidget(myRAMBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class Cartridge3EWidget : public CartDebugWidget class Cartridge3EWidget : public CartDebugWidget
{ {
public: public:
Cartridge3EWidget(GuiObject* boss, const GUI::Font& font, Cartridge3EWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
Cartridge3E& cart); Cartridge3E& cart);
virtual ~Cartridge3EWidget() { } virtual ~Cartridge3EWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge3FWidget::Cartridge3FWidget( Cartridge3FWidget::Cartridge3FWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge3F& cart) int x, int y, int w, int h, Cartridge3F& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = cart.mySize; uInt32 size = cart.mySize;
@ -52,9 +52,9 @@ Cartridge3FWidget::Cartridge3FWidget(
label << "Set bank ($" << Common::Base::HEX4 << start << " - $" << label << "Set bank ($" << Common::Base::HEX4 << start << " - $" <<
(start+0x7FF) << "): "; (start+0x7FF) << "): ";
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($3F) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($3F) "),
myLineHeight, items, label.str(), myLineHeight, items, label.str(),
font.getStringWidth(label.str()), kBankChanged); _font.getStringWidth(label.str()), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class Cartridge3FWidget : public CartDebugWidget class Cartridge3FWidget : public CartDebugWidget
{ {
public: public:
Cartridge3FWidget(GuiObject* boss, const GUI::Font& font, Cartridge3FWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
Cartridge3F& cart); Cartridge3F& cart);
virtual ~Cartridge3FWidget() { } virtual ~Cartridge3FWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge4A50Widget::Cartridge4A50Widget( Cartridge4A50Widget::Cartridge4A50Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge4A50& cart) int x, int y, int w, int h, Cartridge4A50& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
string info = string info =
@ -60,9 +60,9 @@ Cartridge4A50Widget::Cartridge4A50Widget(
string lowerlabel = "Set lower 2K region ($F000 - $F7FF): "; string lowerlabel = "Set lower 2K region ($F000 - $F7FF): ";
string middlelabel = "Set middle 1.5K region ($F800 - $FDFF): "; string middlelabel = "Set middle 1.5K region ($F800 - $FDFF): ";
string highlabel = "Set high 256B region ($FE00 - $FEFF): "; string highlabel = "Set high 256B region ($FE00 - $FEFF): ";
const int lwidth = font.getStringWidth(middlelabel), const int lwidth = _font.getStringWidth(middlelabel),
fwidth = font.getStringWidth("Inactive"), fwidth = _font.getStringWidth("Inactive"),
flwidth = font.getStringWidth("ROM: "); flwidth = _font.getStringWidth("ROM: ");
// Lower bank/region configuration // Lower bank/region configuration
xpos = 10; xpos = 10;
@ -72,14 +72,14 @@ Cartridge4A50Widget::Cartridge4A50Widget(
xpos += 40; xpos += 40;
myROMLower = myROMLower =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
items32, "ROM: ", flwidth, kROMLowerChanged); items32, "ROM: ", flwidth, kROMLowerChanged);
myROMLower->setTarget(this); myROMLower->setTarget(this);
addFocusWidget(myROMLower); addFocusWidget(myROMLower);
xpos += myROMLower->getWidth() + 20; xpos += myROMLower->getWidth() + 20;
myRAMLower = myRAMLower =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
items16, "RAM: ", flwidth, kRAMLowerChanged); items16, "RAM: ", flwidth, kRAMLowerChanged);
myRAMLower->setTarget(this); myRAMLower->setTarget(this);
addFocusWidget(myRAMLower); addFocusWidget(myRAMLower);
@ -92,14 +92,14 @@ Cartridge4A50Widget::Cartridge4A50Widget(
xpos += 40; xpos += 40;
myROMMiddle = myROMMiddle =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
items32, "ROM: ", flwidth, kROMMiddleChanged); items32, "ROM: ", flwidth, kROMMiddleChanged);
myROMMiddle->setTarget(this); myROMMiddle->setTarget(this);
addFocusWidget(myROMMiddle); addFocusWidget(myROMMiddle);
xpos += myROMMiddle->getWidth() + 20; xpos += myROMMiddle->getWidth() + 20;
myRAMMiddle = myRAMMiddle =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
items16, "RAM: ", flwidth, kRAMMiddleChanged); items16, "RAM: ", flwidth, kRAMMiddleChanged);
myRAMMiddle->setTarget(this); myRAMMiddle->setTarget(this);
addFocusWidget(myRAMMiddle); addFocusWidget(myRAMMiddle);
@ -112,14 +112,14 @@ Cartridge4A50Widget::Cartridge4A50Widget(
xpos += 40; xpos += 40;
myROMHigh = myROMHigh =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
items256, "ROM: ", flwidth, kROMHighChanged); items256, "ROM: ", flwidth, kROMHighChanged);
myROMHigh->setTarget(this); myROMHigh->setTarget(this);
addFocusWidget(myROMHigh); addFocusWidget(myROMHigh);
xpos += myROMHigh->getWidth() + 20; xpos += myROMHigh->getWidth() + 20;
myRAMHigh = myRAMHigh =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
items128, "RAM: ", flwidth, kRAMHighChanged); items128, "RAM: ", flwidth, kRAMHighChanged);
myRAMHigh->setTarget(this); myRAMHigh->setTarget(this);
addFocusWidget(myRAMHigh); addFocusWidget(myRAMHigh);

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class Cartridge4A50Widget : public CartDebugWidget class Cartridge4A50Widget : public CartDebugWidget
{ {
public: public:
Cartridge4A50Widget(GuiObject* boss, const GUI::Font& font, Cartridge4A50Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
Cartridge4A50& cart); Cartridge4A50& cart);
virtual ~Cartridge4A50Widget() { } virtual ~Cartridge4A50Widget() { }

View File

@ -22,9 +22,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge4KWidget::Cartridge4KWidget( Cartridge4KWidget::Cartridge4KWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, Cartridge4K& cart) int x, int y, int w, int h, Cartridge4K& cart)
: CartDebugWidget(boss, font, x, y, w, h) : CartDebugWidget(boss, lfont, nfont, x, y, w, h)
{ {
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
uInt16 start = (cart.myImage[0xFFD] << 8) | cart.myImage[0xFFC]; uInt16 start = (cart.myImage[0xFFD] << 8) | cart.myImage[0xFFC];

View File

@ -26,7 +26,8 @@ class Cartridge4K;
class Cartridge4KWidget : public CartDebugWidget class Cartridge4KWidget : public CartDebugWidget
{ {
public: public:
Cartridge4KWidget(GuiObject* boss, const GUI::Font& font, Cartridge4KWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
Cartridge4K& cart); Cartridge4K& cart);
virtual ~Cartridge4KWidget() { } virtual ~Cartridge4KWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeARWidget::CartridgeARWidget( CartridgeARWidget::CartridgeARWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeAR& cart) int x, int y, int w, int h, CartridgeAR& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = myCart.mySize; uInt16 size = myCart.mySize;
@ -71,9 +71,9 @@ CartridgeARWidget::CartridgeARWidget(
items.push_back(" 30"); items.push_back(" 30");
items.push_back(" 31"); items.push_back(" 31");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth(" XX "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" XX "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeARWidget : public CartDebugWidget class CartridgeARWidget : public CartDebugWidget
{ {
public: public:
CartridgeARWidget(GuiObject* boss, const GUI::Font& font, CartridgeARWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeAR& cart); CartridgeAR& cart);
virtual ~CartridgeARWidget() { } virtual ~CartridgeARWidget() { }

View File

@ -27,9 +27,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeCMWidget::CartridgeCMWidget( CartridgeCMWidget::CartridgeCMWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeCM& cart) int x, int y, int w, int h, CartridgeCM& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 4 * 4096; uInt16 size = 4 * 4096;
@ -51,29 +51,29 @@ CartridgeCMWidget::CartridgeCMWidget(
items.push_back(" 2 "); items.push_back(" 2 ");
items.push_back(" 3 "); items.push_back(" 3 ");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth(" 0 "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 0 "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
// Raw SWCHA value (this will be broken down further in other UI elements) // Raw SWCHA value (this will be broken down further in other UI elements)
int lwidth = font.getStringWidth("Current column: "); int lwidth = _font.getStringWidth("Current column: ");
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, myFontHeight, new StaticTextWidget(boss, _font, xpos, ypos+2, lwidth, myFontHeight,
"Current SWCHA: ", kTextAlignLeft); "Current SWCHA: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
mySWCHA = new ToggleBitWidget(boss, font, xpos, ypos, 8, 1); mySWCHA = new ToggleBitWidget(boss, _nfont, xpos, ypos, 8, 1);
mySWCHA->setTarget(this); mySWCHA->setTarget(this);
mySWCHA->setEditable(false); mySWCHA->setEditable(false);
// Current column number // Current column number
xpos = 10; ypos += myLineHeight + 5; xpos = 10; ypos += myLineHeight + 5;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Current column: ", kTextAlignLeft); myFontHeight, "Current column: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myColumn = new DataGridWidget(boss, font, xpos, ypos-2, 1, 1, 2, 8, Common::Base::F_16); myColumn = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 2, 8, Common::Base::F_16);
myColumn->setTarget(this); myColumn->setTarget(this);
myColumn->setEditable(false); myColumn->setEditable(false);
@ -82,7 +82,7 @@ CartridgeCMWidget::CartridgeCMWidget(
// D6 (column part) // D6 (column part)
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
myIncrease = new CheckboxWidget(boss, font, xpos, ypos, "Increase Column"); myIncrease = new CheckboxWidget(boss, _font, xpos, ypos, "Increase Column");
myIncrease->setTarget(this); myIncrease->setTarget(this);
myIncrease->setEditable(false); myIncrease->setEditable(false);
@ -90,35 +90,35 @@ CartridgeCMWidget::CartridgeCMWidget(
// D5 (column part) // D5 (column part)
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myReset = new CheckboxWidget(boss, font, xpos, ypos, "Reset Column"); myReset = new CheckboxWidget(boss, _font, xpos, ypos, "Reset Column");
myReset->setTarget(this); myReset->setTarget(this);
myReset->setEditable(false); myReset->setEditable(false);
// Row inputs // Row inputs
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myRow[0] = new CheckboxWidget(boss, font, xpos, ypos, "Row 0"); myRow[0] = new CheckboxWidget(boss, _font, xpos, ypos, "Row 0");
myRow[0]->setTarget(this); myRow[0]->setTarget(this);
myRow[0]->setEditable(false); myRow[0]->setEditable(false);
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myRow[1] = new CheckboxWidget(boss, font, xpos, ypos, "Row 1"); myRow[1] = new CheckboxWidget(boss, _font, xpos, ypos, "Row 1");
myRow[1]->setTarget(this); myRow[1]->setTarget(this);
myRow[1]->setEditable(false); myRow[1]->setEditable(false);
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myRow[2] = new CheckboxWidget(boss, font, xpos, ypos, "Row 2"); myRow[2] = new CheckboxWidget(boss, _font, xpos, ypos, "Row 2");
myRow[2]->setTarget(this); myRow[2]->setTarget(this);
myRow[2]->setEditable(false); myRow[2]->setEditable(false);
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myRow[3] = new CheckboxWidget(boss, font, xpos, ypos, "Row 3"); myRow[3] = new CheckboxWidget(boss, _font, xpos, ypos, "Row 3");
myRow[3]->setTarget(this); myRow[3]->setTarget(this);
myRow[3]->setEditable(false); myRow[3]->setEditable(false);
// Func and Shift keys // Func and Shift keys
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myFunc = new CheckboxWidget(boss, font, xpos, ypos, "FUNC key pressed"); myFunc = new CheckboxWidget(boss, _font, xpos, ypos, "FUNC key pressed");
myFunc->setTarget(this); myFunc->setTarget(this);
myFunc->setEditable(false); myFunc->setEditable(false);
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myShift = new CheckboxWidget(boss, font, xpos, ypos, "Shift key pressed"); myShift = new CheckboxWidget(boss, _font, xpos, ypos, "Shift key pressed");
myShift->setTarget(this); myShift->setTarget(this);
myShift->setEditable(false); myShift->setEditable(false);
@ -126,23 +126,23 @@ CartridgeCMWidget::CartridgeCMWidget(
xpos += myShift->getWidth() + 20; ypos = orig_ypos; xpos += myShift->getWidth() + 20; ypos = orig_ypos;
// D7 // D7
myAudIn = new CheckboxWidget(boss, font, xpos, ypos, "Audio Input"); myAudIn = new CheckboxWidget(boss, _font, xpos, ypos, "Audio Input");
myAudIn->setTarget(this); myAudIn->setTarget(this);
myAudIn->setEditable(false); myAudIn->setEditable(false);
// D6 (audio part) // D6 (audio part)
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myAudOut = new CheckboxWidget(boss, font, xpos, ypos, "Audio Output"); myAudOut = new CheckboxWidget(boss, _font, xpos, ypos, "Audio Output");
myAudOut->setTarget(this); myAudOut->setTarget(this);
myAudOut->setEditable(false); myAudOut->setEditable(false);
// Ram state (combination of several bits in SWCHA) // Ram state (combination of several bits in SWCHA)
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
lwidth = font.getStringWidth("Ram State: "); lwidth = _font.getStringWidth("Ram State: ");
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Ram State: ", kTextAlignLeft); myFontHeight, "Ram State: ", kTextAlignLeft);
myRAM = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, myRAM = new EditTextWidget(boss, _nfont, xpos+lwidth, ypos-1,
font.getStringWidth(" Write-only "), myLineHeight, ""); _nfont.getStringWidth(" Write-only "), myLineHeight, "");
myRAM->setEditable(false); myRAM->setEditable(false);
} }

View File

@ -32,7 +32,8 @@ class ToggleBitWidget;
class CartridgeCMWidget : public CartDebugWidget class CartridgeCMWidget : public CartDebugWidget
{ {
public: public:
CartridgeCMWidget(GuiObject* boss, const GUI::Font& font, CartridgeCMWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeCM& cart); CartridgeCM& cart);
virtual ~CartridgeCMWidget() { } virtual ~CartridgeCMWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeCTYWidget::CartridgeCTYWidget( CartridgeCTYWidget::CartridgeCTYWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeCTY& cart) int x, int y, int w, int h, CartridgeCTY& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 8 * 4096; uInt16 size = 8 * 4096;
@ -48,9 +48,9 @@ CartridgeCTYWidget::CartridgeCTYWidget(
items.push_back("6 ($FFA)"); items.push_back("6 ($FFA)");
items.push_back("7 ($FFB)"); items.push_back("7 ($FFB)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeCTYWidget : public CartDebugWidget class CartridgeCTYWidget : public CartDebugWidget
{ {
public: public:
CartridgeCTYWidget(GuiObject* boss, const GUI::Font& font, CartridgeCTYWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeCTY& cart); CartridgeCTY& cart);
virtual ~CartridgeCTYWidget() { } virtual ~CartridgeCTYWidget() { }

View File

@ -22,9 +22,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeCVWidget::CartridgeCVWidget( CartridgeCVWidget::CartridgeCVWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeCV& cart) int x, int y, int w, int h, CartridgeCV& cart)
: CartDebugWidget(boss, font, x, y, w, h) : CartDebugWidget(boss, lfont, nfont, x, y, w, h)
{ {
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
uInt16 size = 2048; uInt16 size = 2048;

View File

@ -26,7 +26,8 @@ class CartridgeCV;
class CartridgeCVWidget : public CartDebugWidget class CartridgeCVWidget : public CartDebugWidget
{ {
public: public:
CartridgeCVWidget(GuiObject* boss, const GUI::Font& font, CartridgeCVWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeCV& cart); CartridgeCV& cart);
virtual ~CartridgeCVWidget() { } virtual ~CartridgeCVWidget() { }

View File

@ -24,9 +24,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeDPCPlus& cart) int x, int y, int w, int h, CartridgeDPCPlus& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = cart.mySize; uInt16 size = cart.mySize;
@ -62,121 +62,121 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
items.push_back("4 ($FFA)"); items.push_back("4 ($FFA)");
items.push_back("5 ($FFB)"); items.push_back("5 ($FFB)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
// Top registers // Top registers
int lwidth = font.getStringWidth("Counter Registers: "); int lwidth = _font.getStringWidth("Counter Registers: ");
xpos = 10; ypos += myLineHeight + 8; xpos = 10; ypos += myLineHeight + 8;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Top Registers: ", kTextAlignLeft); myFontHeight, "Top Registers: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myTops = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); myTops = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
myTops->setTarget(this); myTops->setTarget(this);
myTops->setEditable(false); myTops->setEditable(false);
// Bottom registers // Bottom registers
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Bottom Registers: ", kTextAlignLeft); myFontHeight, "Bottom Registers: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myBottoms = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); myBottoms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
myBottoms->setTarget(this); myBottoms->setTarget(this);
myBottoms->setEditable(false); myBottoms->setEditable(false);
// Counter registers // Counter registers
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Counter Registers: ", kTextAlignLeft); myFontHeight, "Counter Registers: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myCounters = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 4, 16, Common::Base::F_16_4); myCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 4, 16, Common::Base::F_16_4);
myCounters->setTarget(this); myCounters->setTarget(this);
myCounters->setEditable(false); myCounters->setEditable(false);
// Fractional counter registers // Fractional counter registers
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Frac Counters: ", kTextAlignLeft); myFontHeight, "Frac Counters: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myFracCounters = new DataGridWidget(boss, font, xpos, ypos-2, 4, 2, 8, 32, Common::Base::F_16_8); myFracCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 4, 2, 8, 32, Common::Base::F_16_8);
myFracCounters->setTarget(this); myFracCounters->setTarget(this);
myFracCounters->setEditable(false); myFracCounters->setEditable(false);
// Fractional increment registers // Fractional increment registers
xpos = 10; ypos += myFracCounters->getHeight() + 8; xpos = 10; ypos += myFracCounters->getHeight() + 8;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Frac Increments: ", kTextAlignLeft); myFontHeight, "Frac Increments: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myFracIncrements = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); myFracIncrements = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
myFracIncrements->setTarget(this); myFracIncrements->setTarget(this);
myFracIncrements->setEditable(false); myFracIncrements->setEditable(false);
// Special function parameters // Special function parameters
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Function Params: ", kTextAlignLeft); myFontHeight, "Function Params: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myParameter = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); myParameter = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
myParameter->setTarget(this); myParameter->setTarget(this);
myParameter->setEditable(false); myParameter->setEditable(false);
// Music counters // Music counters
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Counters: ", kTextAlignLeft); myFontHeight, "Music Counters: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myMusicCounters = new DataGridWidget(boss, font, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8); myMusicCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8);
myMusicCounters->setTarget(this); myMusicCounters->setTarget(this);
myMusicCounters->setEditable(false); myMusicCounters->setEditable(false);
// Music frequencies // Music frequencies
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Frequencies: ", kTextAlignLeft); myFontHeight, "Music Frequencies: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myMusicFrequencies = new DataGridWidget(boss, font, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8); myMusicFrequencies = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8);
myMusicFrequencies->setTarget(this); myMusicFrequencies->setTarget(this);
myMusicFrequencies->setEditable(false); myMusicFrequencies->setEditable(false);
// Music waveforms // Music waveforms
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Waveforms: ", kTextAlignLeft); myFontHeight, "Music Waveforms: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myMusicWaveforms = new DataGridWidget(boss, font, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_4); myMusicWaveforms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_4);
myMusicWaveforms->setTarget(this); myMusicWaveforms->setTarget(this);
myMusicWaveforms->setEditable(false); myMusicWaveforms->setEditable(false);
// Current random number // Current random number
lwidth = font.getStringWidth("Current random number: "); lwidth = _font.getStringWidth("Current random number: ");
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Current random number: ", kTextAlignLeft); myFontHeight, "Current random number: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myRandom = new DataGridWidget(boss, font, xpos, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8); myRandom = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8);
myRandom->setTarget(this); myRandom->setTarget(this);
myRandom->setEditable(false); myRandom->setEditable(false);
// Fast fetch and immediate mode LDA flags // Fast fetch and immediate mode LDA flags
xpos += myRandom->getWidth() + 30; xpos += myRandom->getWidth() + 30;
myFastFetch = new CheckboxWidget(boss, font, xpos, ypos, "Fast Fetcher enabled"); myFastFetch = new CheckboxWidget(boss, _font, xpos, ypos, "Fast Fetcher enabled");
myFastFetch->setTarget(this); myFastFetch->setTarget(this);
myFastFetch->setEditable(false); myFastFetch->setEditable(false);
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
myIMLDA = new CheckboxWidget(boss, font, xpos, ypos, "Immediate mode LDA"); myIMLDA = new CheckboxWidget(boss, _font, xpos, ypos, "Immediate mode LDA");
myIMLDA->setTarget(this); myIMLDA->setTarget(this);
myIMLDA->setEditable(false); myIMLDA->setEditable(false);
} }

View File

@ -30,7 +30,8 @@ class DataGridWidget;
class CartridgeDPCPlusWidget : public CartDebugWidget class CartridgeDPCPlusWidget : public CartDebugWidget
{ {
public: public:
CartridgeDPCPlusWidget(GuiObject* boss, const GUI::Font& font, CartridgeDPCPlusWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeDPCPlus& cart); CartridgeDPCPlus& cart);
virtual ~CartridgeDPCPlusWidget() { } virtual ~CartridgeDPCPlusWidget() { }

View File

@ -24,9 +24,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeDPCWidget::CartridgeDPCWidget( CartridgeDPCWidget::CartridgeDPCWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeDPC& cart) int x, int y, int w, int h, CartridgeDPC& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = cart.mySize; uInt16 size = cart.mySize;
@ -55,77 +55,77 @@ CartridgeDPCWidget::CartridgeDPCWidget(
items.push_back("0 ($FF8)"); items.push_back("0 ($FF8)");
items.push_back("1 ($FF9)"); items.push_back("1 ($FF9)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
// Data fetchers // Data fetchers
int lwidth = font.getStringWidth("Data Fetchers: "); int lwidth = _font.getStringWidth("Data Fetchers: ");
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Data Fetchers: ", kTextAlignLeft); myFontHeight, "Data Fetchers: ", kTextAlignLeft);
// Top registers // Top registers
lwidth = font.getStringWidth("Counter Registers: "); lwidth = _font.getStringWidth("Counter Registers: ");
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Top Registers: ", kTextAlignLeft); myFontHeight, "Top Registers: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myTops = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); myTops = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
myTops->setTarget(this); myTops->setTarget(this);
myTops->setEditable(false); myTops->setEditable(false);
// Bottom registers // Bottom registers
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Bottom Registers: ", kTextAlignLeft); myFontHeight, "Bottom Registers: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myBottoms = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); myBottoms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
myBottoms->setTarget(this); myBottoms->setTarget(this);
myBottoms->setEditable(false); myBottoms->setEditable(false);
// Counter registers // Counter registers
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Counter Registers: ", kTextAlignLeft); myFontHeight, "Counter Registers: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myCounters = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 4, 16, Common::Base::F_16_4); myCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 4, 16, Common::Base::F_16_4);
myCounters->setTarget(this); myCounters->setTarget(this);
myCounters->setEditable(false); myCounters->setEditable(false);
// Flag registers // Flag registers
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Flag Registers: ", kTextAlignLeft); myFontHeight, "Flag Registers: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myFlags = new DataGridWidget(boss, font, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); myFlags = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
myFlags->setTarget(this); myFlags->setTarget(this);
myFlags->setEditable(false); myFlags->setEditable(false);
// Music mode // Music mode
xpos = 10; ypos += myLineHeight + 12; xpos = 10; ypos += myLineHeight + 12;
lwidth = font.getStringWidth("Music mode (DF5/DF6/DF7): "); lwidth = _font.getStringWidth("Music mode (DF5/DF6/DF7): ");
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music mode (DF5/DF6/DF7): ", kTextAlignLeft); myFontHeight, "Music mode (DF5/DF6/DF7): ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myMusicMode = new DataGridWidget(boss, font, xpos, ypos-2, 3, 1, 2, 8, Common::Base::F_16); myMusicMode = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 2, 8, Common::Base::F_16);
myMusicMode->setTarget(this); myMusicMode->setTarget(this);
myMusicMode->setEditable(false); myMusicMode->setEditable(false);
// Current random number // Current random number
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Current random number: ", kTextAlignLeft); myFontHeight, "Current random number: ", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myRandom = new DataGridWidget(boss, font, xpos, ypos-2, 1, 1, 2, 8, Common::Base::F_16); myRandom = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 2, 8, Common::Base::F_16);
myRandom->setTarget(this); myRandom->setTarget(this);
myRandom->setEditable(false); myRandom->setEditable(false);
} }

View File

@ -29,7 +29,8 @@ class DataGridWidget;
class CartridgeDPCWidget : public CartDebugWidget class CartridgeDPCWidget : public CartDebugWidget
{ {
public: public:
CartridgeDPCWidget(GuiObject* boss, const GUI::Font& font, CartridgeDPCWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeDPC& cart); CartridgeDPC& cart);
virtual ~CartridgeDPCWidget() { } virtual ~CartridgeDPCWidget() { }

View File

@ -36,13 +36,15 @@ class ButtonWidget;
class CartDebugWidget : public Widget, public CommandSender class CartDebugWidget : public Widget, public CommandSender
{ {
public: public:
CartDebugWidget(GuiObject* boss, const GUI::Font& font, CartDebugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h) int x, int y, int w, int h)
: Widget(boss, font, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss), CommandSender(boss),
myFontWidth(font.getMaxCharWidth()), _nfont(nfont),
myFontHeight(font.getFontHeight()), myFontWidth(lfont.getMaxCharWidth()),
myLineHeight(font.getLineHeight()), myFontHeight(lfont.getFontHeight()),
myLineHeight(lfont.getLineHeight()),
myButtonHeight(myLineHeight + 4) { } myButtonHeight(myLineHeight + 4) { }
virtual ~CartDebugWidget() { }; virtual ~CartDebugWidget() { };
@ -65,14 +67,14 @@ class CartDebugWidget : public Widget, public CommandSender
if(bytes >= 1024) if(bytes >= 1024)
buf << " / " << (bytes/1024) << "KB"; buf << " / " << (bytes/1024) << "KB";
w = new EditTextWidget(_boss, _font, x+lwidth, y, w = new EditTextWidget(_boss, _nfont, x+lwidth, y,
fwidth, myLineHeight, buf.str()); fwidth, myLineHeight, buf.str());
w->setEditable(false); w->setEditable(false);
y += myLineHeight + 4; y += myLineHeight + 4;
new StaticTextWidget(_boss, _font, x, y, lwidth, new StaticTextWidget(_boss, _font, x, y, lwidth,
myFontHeight, "Manufacturer: ", kTextAlignLeft); myFontHeight, "Manufacturer: ", kTextAlignLeft);
w = new EditTextWidget(_boss, _font, x+lwidth, y, w = new EditTextWidget(_boss, _nfont, x+lwidth, y,
fwidth, myLineHeight, manufacturer); fwidth, myLineHeight, manufacturer);
w->setEditable(false); w->setEditable(false);
y += myLineHeight + 4; y += myLineHeight + 4;
@ -85,7 +87,7 @@ class CartDebugWidget : public Widget, public CommandSender
new StaticTextWidget(_boss, _font, x, y, lwidth, new StaticTextWidget(_boss, _font, x, y, lwidth,
myFontHeight, "Description: ", kTextAlignLeft); myFontHeight, "Description: ", kTextAlignLeft);
myDesc = new StringListWidget(_boss, _font, x+lwidth, y, myDesc = new StringListWidget(_boss, _nfont, x+lwidth, y,
fwidth, lines * myLineHeight, false); fwidth, lines * myLineHeight, false);
myDesc->setEditable(false); myDesc->setEditable(false);
myDesc->setList(sl); myDesc->setList(sl);
@ -112,6 +114,9 @@ class CartDebugWidget : public Widget, public CommandSender
virtual string bankState() { return "0 (non-bankswitched)"; } virtual string bankState() { return "0 (non-bankswitched)"; }
protected: protected:
// Font used for 'normal' text; _font is for 'label' text
const GUI::Font& _nfont;
// These will be needed by most of the child classes; // These will be needed by most of the child classes;
// we may as well make them protected variables // we may as well make them protected variables
int myFontWidth, myFontHeight, myLineHeight, myButtonHeight; int myFontWidth, myFontHeight, myLineHeight, myButtonHeight;

View File

@ -36,9 +36,9 @@ static const char* seg2[] = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeE0Widget::CartridgeE0Widget( CartridgeE0Widget::CartridgeE0Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeE0& cart) int x, int y, int w, int h, CartridgeE0& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = 8 * 1024; uInt32 size = 8 * 1024;
@ -72,9 +72,9 @@ CartridgeE0Widget::CartridgeE0Widget(
items2.push_back(seg2[i]); items2.push_back(seg2[i]);
} }
const int lwidth = font.getStringWidth("Set slice for segment X: "); const int lwidth = _font.getStringWidth("Set slice for segment X: ");
mySlice0 = mySlice0 =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("7 ($FF7)"), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FF7)"),
myLineHeight, items0, "Set slice for segment 0: ", myLineHeight, items0, "Set slice for segment 0: ",
lwidth, kSlice0Changed); lwidth, kSlice0Changed);
mySlice0->setTarget(this); mySlice0->setTarget(this);
@ -82,7 +82,7 @@ CartridgeE0Widget::CartridgeE0Widget(
ypos += mySlice0->getHeight() + 4; ypos += mySlice0->getHeight() + 4;
mySlice1 = mySlice1 =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("7 ($FF7)"), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FF7)"),
myLineHeight, items1, "Set slice for segment 1: ", myLineHeight, items1, "Set slice for segment 1: ",
lwidth, kSlice1Changed); lwidth, kSlice1Changed);
mySlice1->setTarget(this); mySlice1->setTarget(this);
@ -90,7 +90,7 @@ CartridgeE0Widget::CartridgeE0Widget(
ypos += mySlice1->getHeight() + 4; ypos += mySlice1->getHeight() + 4;
mySlice2 = mySlice2 =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("7 ($FF7)"), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FF7)"),
myLineHeight, items2, "Set slice for segment 2: ", myLineHeight, items2, "Set slice for segment 2: ",
lwidth, kSlice2Changed); lwidth, kSlice2Changed);
mySlice2->setTarget(this); mySlice2->setTarget(this);

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeE0Widget : public CartDebugWidget class CartridgeE0Widget : public CartDebugWidget
{ {
public: public:
CartridgeE0Widget(GuiObject* boss, const GUI::Font& font, CartridgeE0Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeE0& cart); CartridgeE0& cart);
virtual ~CartridgeE0Widget() { } virtual ~CartridgeE0Widget() { }

View File

@ -31,9 +31,9 @@ static const char* spot_upper[] = {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeE7Widget::CartridgeE7Widget( CartridgeE7Widget::CartridgeE7Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeE7& cart) int x, int y, int w, int h, CartridgeE7& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = 8 * 2048; uInt32 size = 8 * 2048;
@ -67,17 +67,17 @@ CartridgeE7Widget::CartridgeE7Widget(
for(int i = 0; i < 4; ++i) for(int i = 0; i < 4; ++i)
items1.push_back(spot_upper[i]); items1.push_back(spot_upper[i]);
const int lwidth = font.getStringWidth("Set slice for upper 256B: "), const int lwidth = _font.getStringWidth("Set slice for upper 256B: "),
fwidth = font.getStringWidth("3 - RAM ($FEB)"); fwidth = _font.getStringWidth("3 - RAM ($FEB)");
myLower2K = myLower2K =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, items0, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, items0,
"Set slice for lower 2K: ", lwidth, kLowerChanged); "Set slice for lower 2K: ", lwidth, kLowerChanged);
myLower2K->setTarget(this); myLower2K->setTarget(this);
addFocusWidget(myLower2K); addFocusWidget(myLower2K);
ypos += myLower2K->getHeight() + 4; ypos += myLower2K->getHeight() + 4;
myUpper256B = myUpper256B =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight, items1, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, items1,
"Set slice for upper 256B: ", lwidth, kUpperChanged); "Set slice for upper 256B: ", lwidth, kUpperChanged);
myUpper256B->setTarget(this); myUpper256B->setTarget(this);
addFocusWidget(myUpper256B); addFocusWidget(myUpper256B);

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeE7Widget : public CartDebugWidget class CartridgeE7Widget : public CartDebugWidget
{ {
public: public:
CartridgeE7Widget(GuiObject* boss, const GUI::Font& font, CartridgeE7Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeE7& cart); CartridgeE7& cart);
virtual ~CartridgeE7Widget() { } virtual ~CartridgeE7Widget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeEFSCWidget::CartridgeEFSCWidget( CartridgeEFSCWidget::CartridgeEFSCWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeEFSC& cart) int x, int y, int w, int h, CartridgeEFSC& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = 16 * 4096; uInt32 size = 16 * 4096;
@ -67,9 +67,9 @@ CartridgeEFSCWidget::CartridgeEFSCWidget(
items.push_back("14 ($FEE)"); items.push_back("14 ($FEE)");
items.push_back("15 ($FEF)"); items.push_back("15 ($FEF)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("15 ($FE0) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FE0) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeEFSCWidget : public CartDebugWidget class CartridgeEFSCWidget : public CartDebugWidget
{ {
public: public:
CartridgeEFSCWidget(GuiObject* boss, const GUI::Font& font, CartridgeEFSCWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeEFSC& cart); CartridgeEFSC& cart);
virtual ~CartridgeEFSCWidget() { } virtual ~CartridgeEFSCWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeEFWidget::CartridgeEFWidget( CartridgeEFWidget::CartridgeEFWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeEF& cart) int x, int y, int w, int h, CartridgeEF& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = 16 * 4096; uInt32 size = 16 * 4096;
@ -65,9 +65,9 @@ CartridgeEFWidget::CartridgeEFWidget(
items.push_back("14 ($FEE)"); items.push_back("14 ($FEE)");
items.push_back("15 ($FEF)"); items.push_back("15 ($FEF)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("15 ($FE0) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FE0) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeEFWidget : public CartDebugWidget class CartridgeEFWidget : public CartDebugWidget
{ {
public: public:
CartridgeEFWidget(GuiObject* boss, const GUI::Font& font, CartridgeEFWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeEF& cart); CartridgeEF& cart);
virtual ~CartridgeEFWidget() { } virtual ~CartridgeEFWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF0Widget::CartridgeF0Widget( CartridgeF0Widget::CartridgeF0Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeF0& cart) int x, int y, int w, int h, CartridgeF0& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = 16 * 4096; uInt32 size = 16 * 4096;
@ -66,9 +66,9 @@ CartridgeF0Widget::CartridgeF0Widget(
items.push_back(" 14"); items.push_back(" 14");
items.push_back(" 15"); items.push_back(" 15");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth(" 15 "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 15 "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeF0Widget : public CartDebugWidget class CartridgeF0Widget : public CartDebugWidget
{ {
public: public:
CartridgeF0Widget(GuiObject* boss, const GUI::Font& font, CartridgeF0Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeF0& cart); CartridgeF0& cart);
virtual ~CartridgeF0Widget() { } virtual ~CartridgeF0Widget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF4SCWidget::CartridgeF4SCWidget( CartridgeF4SCWidget::CartridgeF4SCWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeF4SC& cart) int x, int y, int w, int h, CartridgeF4SC& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 8 * 4096; uInt16 size = 8 * 4096;
@ -58,9 +58,9 @@ CartridgeF4SCWidget::CartridgeF4SCWidget(
items.push_back("6 ($FFA)"); items.push_back("6 ($FFA)");
items.push_back("7 ($FFB)"); items.push_back("7 ($FFB)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeF4SCWidget : public CartDebugWidget class CartridgeF4SCWidget : public CartDebugWidget
{ {
public: public:
CartridgeF4SCWidget(GuiObject* boss, const GUI::Font& font, CartridgeF4SCWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeF4SC& cart); CartridgeF4SC& cart);
virtual ~CartridgeF4SCWidget() { } virtual ~CartridgeF4SCWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF4Widget::CartridgeF4Widget( CartridgeF4Widget::CartridgeF4Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeF4& cart) int x, int y, int w, int h, CartridgeF4& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 8 * 4096; uInt16 size = 8 * 4096;
@ -56,9 +56,9 @@ CartridgeF4Widget::CartridgeF4Widget(
items.push_back("6 ($FFA)"); items.push_back("6 ($FFA)");
items.push_back("7 ($FFB)"); items.push_back("7 ($FFB)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeF4Widget : public CartDebugWidget class CartridgeF4Widget : public CartDebugWidget
{ {
public: public:
CartridgeF4Widget(GuiObject* boss, const GUI::Font& font, CartridgeF4Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeF4& cart); CartridgeF4& cart);
virtual ~CartridgeF4Widget() { } virtual ~CartridgeF4Widget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF6SCWidget::CartridgeF6SCWidget( CartridgeF6SCWidget::CartridgeF6SCWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeF6SC& cart) int x, int y, int w, int h, CartridgeF6SC& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 4 * 4096; uInt16 size = 4 * 4096;
@ -54,9 +54,9 @@ CartridgeF6SCWidget::CartridgeF6SCWidget(
items.push_back("2 ($FF8)"); items.push_back("2 ($FF8)");
items.push_back("3 ($FF9)"); items.push_back("3 ($FF9)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeF6SCWidget : public CartDebugWidget class CartridgeF6SCWidget : public CartDebugWidget
{ {
public: public:
CartridgeF6SCWidget(GuiObject* boss, const GUI::Font& font, CartridgeF6SCWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeF6SC& cart); CartridgeF6SC& cart);
virtual ~CartridgeF6SCWidget() { } virtual ~CartridgeF6SCWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF6Widget::CartridgeF6Widget( CartridgeF6Widget::CartridgeF6Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeF6& cart) int x, int y, int w, int h, CartridgeF6& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 4 * 4096; uInt16 size = 4 * 4096;
@ -52,9 +52,9 @@ CartridgeF6Widget::CartridgeF6Widget(
items.push_back("2 ($FF8)"); items.push_back("2 ($FF8)");
items.push_back("3 ($FF9)"); items.push_back("3 ($FF9)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeF6Widget : public CartDebugWidget class CartridgeF6Widget : public CartDebugWidget
{ {
public: public:
CartridgeF6Widget(GuiObject* boss, const GUI::Font& font, CartridgeF6Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeF6& cart); CartridgeF6& cart);
virtual ~CartridgeF6Widget() { } virtual ~CartridgeF6Widget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF8SCWidget::CartridgeF8SCWidget( CartridgeF8SCWidget::CartridgeF8SCWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeF8SC& cart) int x, int y, int w, int h, CartridgeF8SC& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 8192; uInt16 size = 8192;
@ -52,9 +52,9 @@ CartridgeF8SCWidget::CartridgeF8SCWidget(
items.push_back("0 ($FF8)"); items.push_back("0 ($FF8)");
items.push_back("1 ($FF9)"); items.push_back("1 ($FF9)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeF8SCWidget : public CartDebugWidget class CartridgeF8SCWidget : public CartDebugWidget
{ {
public: public:
CartridgeF8SCWidget(GuiObject* boss, const GUI::Font& font, CartridgeF8SCWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeF8SC& cart); CartridgeF8SC& cart);
virtual ~CartridgeF8SCWidget() { } virtual ~CartridgeF8SCWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF8Widget::CartridgeF8Widget( CartridgeF8Widget::CartridgeF8Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeF8& cart) int x, int y, int w, int h, CartridgeF8& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 2 * 4096; uInt16 size = 2 * 4096;
@ -50,9 +50,9 @@ CartridgeF8Widget::CartridgeF8Widget(
items.push_back("0 ($FF8)"); items.push_back("0 ($FF8)");
items.push_back("1 ($FF9)"); items.push_back("1 ($FF9)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeF8Widget : public CartDebugWidget class CartridgeF8Widget : public CartDebugWidget
{ {
public: public:
CartridgeF8Widget(GuiObject* boss, const GUI::Font& font, CartridgeF8Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeF8& cart); CartridgeF8& cart);
virtual ~CartridgeF8Widget() { } virtual ~CartridgeF8Widget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeFA2Widget::CartridgeFA2Widget( CartridgeFA2Widget::CartridgeFA2Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeFA2& cart) int x, int y, int w, int h, CartridgeFA2& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = cart.mySize; uInt16 size = cart.mySize;
@ -62,36 +62,36 @@ CartridgeFA2Widget::CartridgeFA2Widget(
items.push_back("6 ($FFB)"); items.push_back("6 ($FFB)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
ypos += myLineHeight + 20; ypos += myLineHeight + 20;
const int bwidth = font.getStringWidth("Erase") + 20; const int bwidth = _font.getStringWidth("Erase") + 20;
StaticTextWidget* t = new StaticTextWidget(boss, font, xpos, ypos, StaticTextWidget* t = new StaticTextWidget(boss, _font, xpos, ypos,
font.getStringWidth("Harmony Flash: "), _font.getStringWidth("Harmony Flash: "),
myFontHeight, "Harmony Flash: ", kTextAlignLeft); myFontHeight, "Harmony Flash: ", kTextAlignLeft);
xpos += t->getWidth() + 4; xpos += t->getWidth() + 4;
myFlashErase = myFlashErase =
new ButtonWidget(boss, font, xpos, ypos-4, bwidth, myButtonHeight, new ButtonWidget(boss, _font, xpos, ypos-4, bwidth, myButtonHeight,
"Erase", kFlashErase); "Erase", kFlashErase);
myFlashErase->setTarget(this); myFlashErase->setTarget(this);
addFocusWidget(myFlashErase); addFocusWidget(myFlashErase);
xpos += myFlashErase->getWidth() + 8; xpos += myFlashErase->getWidth() + 8;
myFlashLoad = myFlashLoad =
new ButtonWidget(boss, font, xpos, ypos-4, bwidth, myButtonHeight, new ButtonWidget(boss, _font, xpos, ypos-4, bwidth, myButtonHeight,
"Load", kFlashLoad); "Load", kFlashLoad);
myFlashLoad->setTarget(this); myFlashLoad->setTarget(this);
addFocusWidget(myFlashLoad); addFocusWidget(myFlashLoad);
xpos += myFlashLoad->getWidth() + 8; xpos += myFlashLoad->getWidth() + 8;
myFlashSave = myFlashSave =
new ButtonWidget(boss, font, xpos, ypos-4, bwidth, myButtonHeight, new ButtonWidget(boss, _font, xpos, ypos-4, bwidth, myButtonHeight,
"Save", kFlashSave); "Save", kFlashSave);
myFlashSave->setTarget(this); myFlashSave->setTarget(this);
addFocusWidget(myFlashSave); addFocusWidget(myFlashSave);

View File

@ -29,7 +29,8 @@ class PopUpWidget;
class CartridgeFA2Widget : public CartDebugWidget class CartridgeFA2Widget : public CartDebugWidget
{ {
public: public:
CartridgeFA2Widget(GuiObject* boss, const GUI::Font& font, CartridgeFA2Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeFA2& cart); CartridgeFA2& cart);
virtual ~CartridgeFA2Widget() { } virtual ~CartridgeFA2Widget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeFAWidget::CartridgeFAWidget( CartridgeFAWidget::CartridgeFAWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeFA& cart) int x, int y, int w, int h, CartridgeFA& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 3 * 4096; uInt16 size = 3 * 4096;
@ -53,9 +53,9 @@ CartridgeFAWidget::CartridgeFAWidget(
items.push_back("1 ($FF9)"); items.push_back("1 ($FF9)");
items.push_back("2 ($FFA)"); items.push_back("2 ($FFA)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeFAWidget : public CartDebugWidget class CartridgeFAWidget : public CartDebugWidget
{ {
public: public:
CartridgeFAWidget(GuiObject* boss, const GUI::Font& font, CartridgeFAWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeFA& cart); CartridgeFA& cart);
virtual ~CartridgeFAWidget() { } virtual ~CartridgeFAWidget() { }

View File

@ -22,9 +22,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeFEWidget::CartridgeFEWidget( CartridgeFEWidget::CartridgeFEWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeFE& cart) int x, int y, int w, int h, CartridgeFE& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
string info = string info =

View File

@ -26,7 +26,8 @@ class CartridgeFE;
class CartridgeFEWidget : public CartDebugWidget class CartridgeFEWidget : public CartDebugWidget
{ {
public: public:
CartridgeFEWidget(GuiObject* boss, const GUI::Font& font, CartridgeFEWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeFE& cart); CartridgeFE& cart);
virtual ~CartridgeFEWidget() { } virtual ~CartridgeFEWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeMCWidget::CartridgeMCWidget( CartridgeMCWidget::CartridgeMCWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeMC& cart) int x, int y, int w, int h, CartridgeMC& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
#define ROM_BLOCKS #define ROM_BLOCKS
@ -60,11 +60,11 @@ CartridgeMCWidget::CartridgeMCWidget(
items.push_back(b + " (RAM)", b); items.push_back(b + " (RAM)", b);
} }
const int lwidth = font.getStringWidth("Set slice for segment X ($3X): "), const int lwidth = _font.getStringWidth("Set slice for segment X ($3X): "),
fwidth = font.getStringWidth("255 (ROM)"); fwidth = _font.getStringWidth("255 (ROM)");
mySlice0 = mySlice0 =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth,
myLineHeight, items, "Set slice for segment 0 ($3C): ", myLineHeight, items, "Set slice for segment 0 ($3C): ",
lwidth, kSlice0Changed); lwidth, kSlice0Changed);
mySlice0->setTarget(this); mySlice0->setTarget(this);
@ -72,7 +72,7 @@ CartridgeMCWidget::CartridgeMCWidget(
ypos += mySlice0->getHeight() + 4; ypos += mySlice0->getHeight() + 4;
mySlice1 = mySlice1 =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth,
myLineHeight, items, "Set slice for segment 1 ($3D): ", myLineHeight, items, "Set slice for segment 1 ($3D): ",
lwidth, kSlice1Changed); lwidth, kSlice1Changed);
mySlice1->setTarget(this); mySlice1->setTarget(this);
@ -80,7 +80,7 @@ CartridgeMCWidget::CartridgeMCWidget(
ypos += mySlice1->getHeight() + 4; ypos += mySlice1->getHeight() + 4;
mySlice2 = mySlice2 =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth,
myLineHeight, items, "Set slice for segment 2 ($3E): ", myLineHeight, items, "Set slice for segment 2 ($3E): ",
lwidth, kSlice2Changed); lwidth, kSlice2Changed);
mySlice2->setTarget(this); mySlice2->setTarget(this);
@ -88,7 +88,7 @@ CartridgeMCWidget::CartridgeMCWidget(
ypos += mySlice2->getHeight() + 4; ypos += mySlice2->getHeight() + 4;
mySlice3 = mySlice3 =
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, new PopUpWidget(boss, _font, xpos, ypos-2, fwidth,
myLineHeight, items, "Set slice for segment 3 ($3F): ", myLineHeight, items, "Set slice for segment 3 ($3F): ",
lwidth, kSlice3Changed); lwidth, kSlice3Changed);
mySlice3->setTarget(this); mySlice3->setTarget(this);

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeMCWidget : public CartDebugWidget class CartridgeMCWidget : public CartDebugWidget
{ {
public: public:
CartridgeMCWidget(GuiObject* boss, const GUI::Font& font, CartridgeMCWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeMC& cart); CartridgeMC& cart);
virtual ~CartridgeMCWidget() { } virtual ~CartridgeMCWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeSBWidget::CartridgeSBWidget( CartridgeSBWidget::CartridgeSBWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeSB& cart) int x, int y, int w, int h, CartridgeSB& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = myCart.mySize; uInt32 size = myCart.mySize;
@ -57,9 +57,9 @@ CartridgeSBWidget::CartridgeSBWidget(
ypos = addBaseInformation(size, "Fred X. Quimby", info.str()) + myLineHeight; ypos = addBaseInformation(size, "Fred X. Quimby", info.str()) + myLineHeight;
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("XX ($800) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("XX ($800) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeSBWidget : public CartDebugWidget class CartridgeSBWidget : public CartDebugWidget
{ {
public: public:
CartridgeSBWidget(GuiObject* boss, const GUI::Font& font, CartridgeSBWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeSB& cart); CartridgeSB& cart);
virtual ~CartridgeSBWidget() { } virtual ~CartridgeSBWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeUAWidget::CartridgeUAWidget( CartridgeUAWidget::CartridgeUAWidget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeUA& cart) int x, int y, int w, int h, CartridgeUA& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt16 size = 2 * 4096; uInt16 size = 2 * 4096;
@ -51,9 +51,9 @@ CartridgeUAWidget::CartridgeUAWidget(
items.push_back("0 ($220)"); items.push_back("0 ($220)");
items.push_back("1 ($240)"); items.push_back("1 ($240)");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeUAWidget : public CartDebugWidget class CartridgeUAWidget : public CartDebugWidget
{ {
public: public:
CartridgeUAWidget(GuiObject* boss, const GUI::Font& font, CartridgeUAWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeUA& cart); CartridgeUA& cart);
virtual ~CartridgeUAWidget() { } virtual ~CartridgeUAWidget() { }

View File

@ -23,9 +23,9 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeX07Widget::CartridgeX07Widget( CartridgeX07Widget::CartridgeX07Widget(
GuiObject* boss, const GUI::Font& font, GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h, CartridgeX07& cart) int x, int y, int w, int h, CartridgeX07& cart)
: CartDebugWidget(boss, font, x, y, w, h), : CartDebugWidget(boss, lfont, nfont, x, y, w, h),
myCart(cart) myCart(cart)
{ {
uInt32 size = 16 * 4096; uInt32 size = 16 * 4096;
@ -67,9 +67,9 @@ CartridgeX07Widget::CartridgeX07Widget(
items.push_back(" 14"); items.push_back(" 14");
items.push_back(" 15"); items.push_back(" 15");
myBank = myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth(" 15 "), new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 15 "),
myLineHeight, items, "Set bank: ", myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged); _font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this); myBank->setTarget(this);
addFocusWidget(myBank); addFocusWidget(myBank);
} }

View File

@ -28,7 +28,8 @@ class PopUpWidget;
class CartridgeX07Widget : public CartDebugWidget class CartridgeX07Widget : public CartDebugWidget
{ {
public: public:
CartridgeX07Widget(GuiObject* boss, const GUI::Font& font, CartridgeX07Widget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h, int x, int y, int w, int h,
CartridgeX07& cart); CartridgeX07& cart);
virtual ~CartridgeX07Widget() { } virtual ~CartridgeX07Widget() { }

View File

@ -32,35 +32,36 @@
#include "CpuWidget.hxx" #include "CpuWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int max_w) CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
: Widget(boss, font, x, y, 16, 16), int x, int y, int max_w)
: Widget(boss, lfont, x, y, 16, 16),
CommandSender(boss) CommandSender(boss)
{ {
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = lfont.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = lfont.getFontHeight(),
lineHeight = font.getLineHeight(); lineHeight = lfont.getLineHeight();
int xpos, ypos, lwidth; int xpos, ypos, lwidth;
// Create a 1x1 grid with label for the PC register // Create a 1x1 grid with label for the PC register
xpos = x; ypos = y; lwidth = 4 * fontWidth; xpos = x; ypos = y; lwidth = 4 * fontWidth;
new StaticTextWidget(boss, font, xpos, ypos+1, lwidth-2, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+1, lwidth-2, fontHeight,
"PC:", kTextAlignLeft); "PC:", kTextAlignLeft);
myPCGrid = myPCGrid =
new DataGridWidget(boss, font, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::F_16); new DataGridWidget(boss, nfont, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::F_16);
myPCGrid->setTarget(this); myPCGrid->setTarget(this);
myPCGrid->setID(kPCRegID); myPCGrid->setID(kPCRegID);
addFocusWidget(myPCGrid); addFocusWidget(myPCGrid);
// Create a read-only textbox containing the current PC label // Create a read-only textbox containing the current PC label
xpos += lwidth + myPCGrid->getWidth() + 10; xpos += lwidth + myPCGrid->getWidth() + 10;
myPCLabel = new EditTextWidget(boss, font, xpos, ypos, (max_w - xpos + x) - 10, myPCLabel = new EditTextWidget(boss, nfont, xpos, ypos, (max_w - xpos + x) - 10,
fontHeight+1, ""); fontHeight+1, "");
myPCLabel->setEditable(false); myPCLabel->setEditable(false);
// Create a 1x4 grid with labels for the other CPU registers // Create a 1x4 grid with labels for the other CPU registers
xpos = x + lwidth; ypos += myPCGrid->getHeight() + 1; xpos = x + lwidth; ypos += myPCGrid->getHeight() + 1;
myCpuGrid = myCpuGrid =
new DataGridWidget(boss, font, xpos, ypos, 1, 4, 2, 8, Common::Base::F_16); new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 2, 8, Common::Base::F_16);
myCpuGrid->setTarget(this); myCpuGrid->setTarget(this);
myCpuGrid->setID(kCpuRegID); myCpuGrid->setID(kCpuRegID);
addFocusWidget(myCpuGrid); addFocusWidget(myCpuGrid);
@ -68,11 +69,11 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int m
// Create a 1x4 grid with decimal and binary values for the other CPU registers // Create a 1x4 grid with decimal and binary values for the other CPU registers
xpos = x + lwidth + myPCGrid->getWidth() + 10; xpos = x + lwidth + myPCGrid->getWidth() + 10;
myCpuGridDecValue = myCpuGridDecValue =
new DataGridWidget(boss, font, xpos, ypos, 1, 4, 3, 8, Common::Base::F_10); new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 3, 8, Common::Base::F_10);
myCpuGridDecValue->setEditable(false); myCpuGridDecValue->setEditable(false);
xpos += myCpuGridDecValue->getWidth() + 5; xpos += myCpuGridDecValue->getWidth() + 5;
myCpuGridBinValue = myCpuGridBinValue =
new DataGridWidget(boss, font, xpos, ypos, 1, 4, 8, 8, Common::Base::F_2); new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 8, 8, Common::Base::F_2);
myCpuGridBinValue->setEditable(false); myCpuGridBinValue->setEditable(false);
// Calculate real dimensions (_y will be calculated at the end) // Calculate real dimensions (_y will be calculated at the end)
@ -83,13 +84,13 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int m
int src_y = ypos, src_w = (max_w - xpos + x) - 10; int src_y = ypos, src_w = (max_w - xpos + x) - 10;
for(int i = 0; i < 4; ++i) for(int i = 0; i < 4; ++i)
{ {
myCpuDataSrc[i] = new EditTextWidget(boss, font, xpos, src_y, src_w, myCpuDataSrc[i] = new EditTextWidget(boss, nfont, xpos, src_y, src_w,
fontHeight+1, ""); fontHeight+1, "");
myCpuDataSrc[i]->setEditable(false); myCpuDataSrc[i]->setEditable(false);
src_y += fontHeight+2; src_y += fontHeight+2;
} }
int swidth = font.getStringWidth("Source Address"); int swidth = lfont.getStringWidth("Source Address");
new StaticTextWidget(boss, font, xpos, src_y + 4, src_w, new StaticTextWidget(boss, lfont, xpos, src_y + 4, src_w,
fontHeight, swidth <= src_w ? "Source Address" : "Source Addr", fontHeight, swidth <= src_w ? "Source Address" : "Source Addr",
kTextAlignCenter); kTextAlignCenter);
@ -98,16 +99,16 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int m
string labels[4] = { "SP:", "A:", "X:", "Y:" }; string labels[4] = { "SP:", "A:", "X:", "Y:" };
for(int row = 0; row < 4; ++row) for(int row = 0; row < 4; ++row)
{ {
new StaticTextWidget(boss, font, xpos, ypos + row*lineHeight + 1, new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 1,
lwidth-2, fontHeight, lwidth-2, fontHeight,
labels[row], kTextAlignLeft); labels[row], kTextAlignLeft);
} }
// Create a bitfield widget for changing the processor status // Create a bitfield widget for changing the processor status
xpos = x; ypos += 4*lineHeight + 2; xpos = x; ypos += 4*lineHeight + 2;
new StaticTextWidget(boss, font, xpos, ypos+1, lwidth-2, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+1, lwidth-2, fontHeight,
"PS:", kTextAlignLeft); "PS:", kTextAlignLeft);
myPSRegister = new ToggleBitWidget(boss, font, xpos+lwidth, ypos, 8, 1); myPSRegister = new ToggleBitWidget(boss, nfont, xpos+lwidth, ypos, 8, 1);
myPSRegister->setTarget(this); myPSRegister->setTarget(this);
addFocusWidget(myPSRegister); addFocusWidget(myPSRegister);

View File

@ -33,7 +33,8 @@ class ToggleBitWidget;
class CpuWidget : public Widget, public CommandSender class CpuWidget : public Widget, public CommandSender
{ {
public: public:
CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int max_w); CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int max_w);
virtual ~CpuWidget(); virtual ~CpuWidget();
void setOpsWidget(DataGridOpsWidget* w); void setOpsWidget(DataGridOpsWidget* w);

View File

@ -49,7 +49,8 @@ DebuggerDialog::DebuggerDialog(OSystem* osystem, DialogContainer* parent,
: Dialog(osystem, parent, x, y, w, h, true), // use base surface : Dialog(osystem, parent, x, y, w, h, true), // use base surface
myTab(NULL), myTab(NULL),
myRomTab(NULL), myRomTab(NULL),
myFont(NULL), myLFont(NULL),
myNFont(NULL),
myFatalError(NULL) myFatalError(NULL)
{ {
createFont(); // Font is sized according to available space createFont(); // Font is sized according to available space
@ -66,7 +67,8 @@ DebuggerDialog::DebuggerDialog(OSystem* osystem, DialogContainer* parent,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DebuggerDialog::~DebuggerDialog() DebuggerDialog::~DebuggerDialog()
{ {
delete myFont; delete myLFont;
delete myNFont;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -205,15 +207,61 @@ void DebuggerDialog::doExitRom()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DebuggerDialog::createFont() void DebuggerDialog::createFont()
{ {
bool bold = instance().settings().getBool("dbg.boldfont"); int fontstyle = instance().settings().getInt("dbg.fontstyle");
// For now, these sizes are hardcoded based on actual font size // For now, these sizes are hardcoded based on actual font size
if(_w >= kLargeFontMinW && _h >= kLargeFontMinH) if(_w >= kLargeFontMinW && _h >= kLargeFontMinH)
myFont = new GUI::Font(GUI::stellaMediumDesc); {
// Large font doesn't use fontstyle at all
myLFont = new GUI::Font(GUI::stellaMediumDesc);
myNFont = new GUI::Font(GUI::stellaMediumDesc);
}
else if(_w >= kMediumFontMinW && _h >= kMediumFontMinH) else if(_w >= kMediumFontMinW && _h >= kMediumFontMinH)
myFont = new GUI::Font(bold ? GUI::consoleMediumBDesc : GUI::consoleMediumDesc); {
if(fontstyle == 1)
{
myLFont = new GUI::Font(GUI::consoleMediumBDesc);
myNFont = new GUI::Font(GUI::consoleMediumDesc);
}
else if(fontstyle == 2)
{
myLFont = new GUI::Font(GUI::consoleMediumDesc);
myNFont = new GUI::Font(GUI::consoleMediumBDesc);
}
else if(fontstyle == 3)
{
myLFont = new GUI::Font(GUI::consoleMediumBDesc);
myNFont = new GUI::Font(GUI::consoleMediumBDesc);
}
else // default to zero
{
myLFont = new GUI::Font(GUI::consoleMediumDesc);
myNFont = new GUI::Font(GUI::consoleMediumDesc);
}
}
else else
myFont = new GUI::Font(bold ? GUI::consoleBDesc : GUI::consoleDesc); {
if(fontstyle == 1)
{
myLFont = new GUI::Font(GUI::consoleBDesc);
myNFont = new GUI::Font(GUI::consoleDesc);
}
else if(fontstyle == 2)
{
myLFont = new GUI::Font(GUI::consoleDesc);
myNFont = new GUI::Font(GUI::consoleBDesc);
}
else if(fontstyle == 3)
{
myLFont = new GUI::Font(GUI::consoleBDesc);
myNFont = new GUI::Font(GUI::consoleBDesc);
}
else // default to zero
{
myLFont = new GUI::Font(GUI::consoleDesc);
myNFont = new GUI::Font(GUI::consoleDesc);
}
}
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -221,7 +269,7 @@ void DebuggerDialog::showFatalMessage(const string& msg)
{ {
delete myFatalError; delete myFatalError;
myFatalError = myFatalError =
new GUI::MessageBox(this, *myFont, msg, _w/2, _h/2, kDDExitFatalCmd, new GUI::MessageBox(this, *myLFont, msg, _w/2, _h/2, kDDExitFatalCmd,
"Exit ROM", "Continue"); "Exit ROM", "Continue");
myFatalError->show(); myFatalError->show();
} }
@ -230,9 +278,8 @@ void DebuggerDialog::showFatalMessage(const string& msg)
void DebuggerDialog::addTiaArea() void DebuggerDialog::addTiaArea()
{ {
const GUI::Rect& r = getTiaBounds(); const GUI::Rect& r = getTiaBounds();
myTiaOutput =
myTiaOutput = new TiaOutputWidget(this, *myFont, new TiaOutputWidget(this, *myNFont, r.left, r.top, r.width(), r.height());
r.left, r.top, r.width(), r.height());
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -244,7 +291,7 @@ void DebuggerDialog::addTabArea()
// The tab widget // The tab widget
// Since there are two tab widgets in this dialog, we specifically // Since there are two tab widgets in this dialog, we specifically
// assign an ID of 0 // assign an ID of 0
myTab = new TabWidget(this, *myFont, r.left, r.top + vBorder, myTab = new TabWidget(this, *myLFont, r.left, r.top + vBorder,
r.width(), r.height() - vBorder); r.width(), r.height() - vBorder);
myTab->setID(0); myTab->setID(0);
addTabWidget(myTab); addTabWidget(myTab);
@ -255,28 +302,28 @@ void DebuggerDialog::addTabArea()
// The Prompt/console tab // The Prompt/console tab
tabID = myTab->addTab(" Prompt "); tabID = myTab->addTab(" Prompt ");
myPrompt = new PromptWidget(myTab, *myFont, myPrompt = new PromptWidget(myTab, *myNFont,
2, 2, widWidth, widHeight); 2, 2, widWidth, widHeight);
myTab->setParentWidget(tabID, myPrompt); myTab->setParentWidget(tabID, myPrompt);
addToFocusList(myPrompt->getFocusList(), myTab, tabID); addToFocusList(myPrompt->getFocusList(), myTab, tabID);
// The TIA tab // The TIA tab
tabID = myTab->addTab("TIA"); tabID = myTab->addTab("TIA");
TiaWidget* tia = new TiaWidget(myTab, *myFont, TiaWidget* tia = new TiaWidget(myTab, *myLFont, *myNFont,
2, 2, widWidth, widHeight); 2, 2, widWidth, widHeight);
myTab->setParentWidget(tabID, tia); myTab->setParentWidget(tabID, tia);
addToFocusList(tia->getFocusList(), myTab, tabID); addToFocusList(tia->getFocusList(), myTab, tabID);
// The input/output tab (includes RIOT and INPTx from TIA) // The input/output tab (includes RIOT and INPTx from TIA)
tabID = myTab->addTab("I/O"); tabID = myTab->addTab("I/O");
RiotWidget* riot = new RiotWidget(myTab, *myFont, RiotWidget* riot = new RiotWidget(myTab, *myLFont, *myNFont,
2, 2, widWidth, widHeight); 2, 2, widWidth, widHeight);
myTab->setParentWidget(tabID, riot); myTab->setParentWidget(tabID, riot);
addToFocusList(riot->getFocusList(), myTab, tabID); addToFocusList(riot->getFocusList(), myTab, tabID);
// The Audio tab // The Audio tab
tabID = myTab->addTab("Audio"); tabID = myTab->addTab("Audio");
AudioWidget* aud = new AudioWidget(myTab, *myFont, AudioWidget* aud = new AudioWidget(myTab, *myLFont, *myNFont,
2, 2, widWidth, widHeight); 2, 2, widWidth, widHeight);
myTab->setParentWidget(tabID, aud); myTab->setParentWidget(tabID, aud);
addToFocusList(aud->getFocusList(), myTab, tabID); addToFocusList(aud->getFocusList(), myTab, tabID);
@ -287,23 +334,22 @@ void DebuggerDialog::addTabArea()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DebuggerDialog::addStatusArea() void DebuggerDialog::addStatusArea()
{ {
const GUI::Font& font = *myFont; const int lineHeight = myLFont->getLineHeight();
const int lineHeight = font.getLineHeight();
const GUI::Rect& r = getStatusBounds(); const GUI::Rect& r = getStatusBounds();
int xpos, ypos; int xpos, ypos;
xpos = r.left; ypos = r.top; xpos = r.left; ypos = r.top;
myTiaInfo = new TiaInfoWidget(this, *myFont, xpos, ypos, r.width()); myTiaInfo = new TiaInfoWidget(this, *myLFont, *myNFont, xpos, ypos, r.width());
ypos += myTiaInfo->getHeight() + 10; ypos += myTiaInfo->getHeight() + 10;
myTiaZoom = new TiaZoomWidget(this, *myFont, xpos+10, ypos, myTiaZoom = new TiaZoomWidget(this, *myNFont, xpos+10, ypos,
r.width()-10, r.height()-lineHeight-ypos-10); r.width()-10, r.height()-lineHeight-ypos-10);
addToFocusList(myTiaZoom->getFocusList()); addToFocusList(myTiaZoom->getFocusList());
xpos += 10; ypos += myTiaZoom->getHeight() + 10; xpos += 10; ypos += myTiaZoom->getHeight() + 10;
myMessageBox = new EditTextWidget(this, *myFont, myMessageBox = new EditTextWidget(this, *myLFont,
xpos, ypos, myTiaZoom->getWidth(), xpos, ypos, myTiaZoom->getWidth(),
font.getLineHeight(), ""); myLFont->getLineHeight(), "");
myMessageBox->setEditable(false); myMessageBox->setEditable(false);
myMessageBox->clearFlags(WIDGET_RETAIN_FOCUS); myMessageBox->clearFlags(WIDGET_RETAIN_FOCUS);
myMessageBox->setTextColor(kTextColorEm); myMessageBox->setTextColor(kTextColorEm);
@ -315,43 +361,43 @@ void DebuggerDialog::addRomArea()
const GUI::Rect& r = getRomBounds(); const GUI::Rect& r = getRomBounds();
const int vBorder = 4; const int vBorder = 4;
int bwidth = myFont->getStringWidth("Frame +1 "), int bwidth = myLFont->getStringWidth("Frame +1 "),
bheight = myFont->getLineHeight() + 2; bheight = myLFont->getLineHeight() + 2;
int buttonX = r.right - bwidth - 5, buttonY = r.top + 5; int buttonX = r.right - bwidth - 5, buttonY = r.top + 5;
new ButtonWidget(this, *myFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Step", kDDStepCmd); bwidth, bheight, "Step", kDDStepCmd);
buttonY += bheight + 4; buttonY += bheight + 4;
new ButtonWidget(this, *myFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Trace", kDDTraceCmd); bwidth, bheight, "Trace", kDDTraceCmd);
buttonY += bheight + 4; buttonY += bheight + 4;
new ButtonWidget(this, *myFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Scan +1", kDDSAdvCmd); bwidth, bheight, "Scan +1", kDDSAdvCmd);
buttonY += bheight + 4; buttonY += bheight + 4;
new ButtonWidget(this, *myFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Frame +1", kDDAdvCmd); bwidth, bheight, "Frame +1", kDDAdvCmd);
buttonY += bheight + 4; buttonY += bheight + 4;
new ButtonWidget(this, *myFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Exit", kDDExitCmd); bwidth, bheight, "Exit", kDDExitCmd);
bwidth = myFont->getStringWidth("< ") + 4; bwidth = myLFont->getStringWidth("< ") + 4;
bheight = bheight * 5 + 4*4; bheight = bheight * 5 + 4*4;
buttonX -= (bwidth + 5); buttonX -= (bwidth + 5);
buttonY = r.top + 5; buttonY = r.top + 5;
myRewindButton = myRewindButton =
new ButtonWidget(this, *myFont, buttonX, buttonY, new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "<", kDDRewindCmd); bwidth, bheight, "<", kDDRewindCmd);
myRewindButton->clearFlags(WIDGET_ENABLED); myRewindButton->clearFlags(WIDGET_ENABLED);
int xpos = buttonX - 8*myFont->getMaxCharWidth() - 20, ypos = 20; int xpos = buttonX - 8*myLFont->getMaxCharWidth() - 20, ypos = 20;
DataGridOpsWidget* ops = new DataGridOpsWidget(this, *myFont, xpos, ypos); DataGridOpsWidget* ops = new DataGridOpsWidget(this, *myLFont, xpos, ypos);
int max_w = xpos - r.left - 10; int max_w = xpos - r.left - 10;
xpos = r.left + 10; ypos = 10; xpos = r.left + 10; ypos = 10;
myCpu = new CpuWidget(this, *myFont, xpos, ypos, max_w); myCpu = new CpuWidget(this, *myLFont, *myNFont, xpos, ypos, max_w);
addToFocusList(myCpu->getFocusList()); addToFocusList(myCpu->getFocusList());
xpos = r.left + 10; ypos += myCpu->getHeight() + 10; xpos = r.left + 10; ypos += myCpu->getHeight() + 10;
myRam = new RamWidget(this, *myFont, xpos, ypos); myRam = new RamWidget(this, *myLFont, *myNFont, xpos, ypos);
addToFocusList(myRam->getFocusList()); addToFocusList(myRam->getFocusList());
// Add the DataGridOpsWidget to any widgets which contain a // Add the DataGridOpsWidget to any widgets which contain a
@ -370,14 +416,13 @@ void DebuggerDialog::addRomArea()
// Since there are two tab widgets in this dialog, we specifically // Since there are two tab widgets in this dialog, we specifically
// assign an ID of 1 // assign an ID of 1
myRomTab = new TabWidget( myRomTab = new TabWidget(
this, *myFont, xpos, ypos, tabWidth, tabHeight); this, *myLFont, xpos, ypos, tabWidth, tabHeight);
myRomTab->setID(1); myRomTab->setID(1);
addTabWidget(myRomTab); addTabWidget(myRomTab);
// The main disassembly tab // The main disassembly tab
tabID = myRomTab->addTab(" Disassembly "); tabID = myRomTab->addTab(" Disassembly ");
myRom = new RomWidget(myRomTab, *myFont, myRom = new RomWidget(myRomTab, *myLFont, *myNFont, 2, 2, tabWidth - 1,
2, 2, tabWidth - 1,
tabHeight - myRomTab->getTabHeight() - 2); tabHeight - myRomTab->getTabHeight() - 2);
myRomTab->setParentWidget(tabID, myRom); myRomTab->setParentWidget(tabID, myRom);
addToFocusList(myRom->getFocusList(), myRomTab, tabID); addToFocusList(myRom->getFocusList(), myRomTab, tabID);
@ -385,7 +430,7 @@ void DebuggerDialog::addRomArea()
// The 'cart-specific' information tab // The 'cart-specific' information tab
tabID = myRomTab->addTab(instance().console().cartridge().name()); tabID = myRomTab->addTab(instance().console().cartridge().name());
myCartDebug = instance().console().cartridge().debugWidget( myCartDebug = instance().console().cartridge().debugWidget(
myRomTab, *myFont, 2, 2, tabWidth - 1, myRomTab, *myLFont, *myNFont, 2, 2, tabWidth - 1,
tabHeight - myRomTab->getTabHeight() - 2); tabHeight - myRomTab->getTabHeight() - 2);
if(myCartDebug) // TODO - make this always non-null if(myCartDebug) // TODO - make this always non-null
{ {

View File

@ -52,7 +52,8 @@ class DebuggerDialog : public Dialog
int x, int y, int w, int h); int x, int y, int w, int h);
~DebuggerDialog(); ~DebuggerDialog();
const GUI::Font& font() const { return *myFont; } const GUI::Font& lfont() const { return *myLFont; }
const GUI::Font& nfont() const { return *myNFont; }
PromptWidget& prompt() const { return *myPrompt; } PromptWidget& prompt() const { return *myPrompt; }
TiaInfoWidget& tiaInfo() const { return *myTiaInfo; } TiaInfoWidget& tiaInfo() const { return *myTiaInfo; }
TiaOutputWidget& tiaOutput() const { return *myTiaOutput; } TiaOutputWidget& tiaOutput() const { return *myTiaOutput; }
@ -101,7 +102,8 @@ class DebuggerDialog : public Dialog
TabWidget *myTab, *myRomTab; TabWidget *myTab, *myRomTab;
GUI::Font* myFont; GUI::Font* myLFont; // used for labels
GUI::Font* myNFont; // used for normal text
PromptWidget* myPrompt; PromptWidget* myPrompt;
TiaInfoWidget* myTiaInfo; TiaInfoWidget* myTiaInfo;
TiaOutputWidget* myTiaOutput; TiaOutputWidget* myTiaOutput;

View File

@ -31,51 +31,52 @@
#include "RamWidget.hxx" #include "RamWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y) RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
: Widget(boss, font, x, y, 16, 16), int x, int y)
: Widget(boss, lfont, x, y, 16, 16),
CommandSender(boss), CommandSender(boss),
myUndoAddress(-1), myUndoAddress(-1),
myUndoValue(-1), myUndoValue(-1),
myCurrentRamBank(0) myCurrentRamBank(0)
{ {
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = lfont.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = lfont.getFontHeight(),
lineHeight = font.getLineHeight(), lineHeight = lfont.getLineHeight(),
bwidth = font.getStringWidth("Compare "), bwidth = lfont.getStringWidth("Compare "),
bheight = lineHeight + 2; bheight = lineHeight + 2;
int xpos, ypos, lwidth; int xpos, ypos, lwidth;
// Create a 16x8 grid holding byte values (16 x 8 = 128 RAM bytes) with labels // Create a 16x8 grid holding byte values (16 x 8 = 128 RAM bytes) with labels
// Add a scrollbar, since there may be more than 128 bytes of RAM available // Add a scrollbar, since there may be more than 128 bytes of RAM available
xpos = x; ypos = y + lineHeight; lwidth = 4 * fontWidth; xpos = x; ypos = y + lineHeight; lwidth = 4 * fontWidth;
myRamGrid = new DataGridWidget(boss, font, xpos + lwidth, ypos, myRamGrid = new DataGridWidget(boss, nfont, xpos + lwidth, ypos,
16, 8, 2, 8, Common::Base::F_16, true); 16, 8, 2, 8, Common::Base::F_16, true);
myRamGrid->setTarget(this); myRamGrid->setTarget(this);
addFocusWidget(myRamGrid); addFocusWidget(myRamGrid);
// Create actions buttons to the left of the RAM grid // Create actions buttons to the left of the RAM grid
xpos += lwidth + myRamGrid->getWidth() + 4; xpos += lwidth + myRamGrid->getWidth() + 4;
myUndoButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight, myUndoButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
"Undo", kUndoCmd); "Undo", kUndoCmd);
myUndoButton->setTarget(this); myUndoButton->setTarget(this);
ypos += bheight + 4; ypos += bheight + 4;
myRevertButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight, myRevertButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
"Revert", kRevertCmd); "Revert", kRevertCmd);
myRevertButton->setTarget(this); myRevertButton->setTarget(this);
ypos += 2 * bheight + 2; ypos += 2 * bheight + 2;
mySearchButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight, mySearchButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
"Search", kSearchCmd); "Search", kSearchCmd);
mySearchButton->setTarget(this); mySearchButton->setTarget(this);
ypos += bheight + 4; ypos += bheight + 4;
myCompareButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight, myCompareButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
"Compare", kCmpCmd); "Compare", kCmpCmd);
myCompareButton->setTarget(this); myCompareButton->setTarget(this);
ypos += bheight + 4; ypos += bheight + 4;
myRestartButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight, myRestartButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
"Reset", kRestartCmd); "Reset", kRestartCmd);
myRestartButton->setTarget(this); myRestartButton->setTarget(this);
@ -85,13 +86,13 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
// Labels for RAM grid // Labels for RAM grid
xpos = x; ypos = y + lineHeight; xpos = x; ypos = y + lineHeight;
myRamStart = myRamStart =
new StaticTextWidget(boss, font, xpos, ypos - lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos - lineHeight,
font.getStringWidth("xxxx"), fontHeight, lfont.getStringWidth("xxxx"), fontHeight,
"00xx", kTextAlignLeft); "00xx", kTextAlignLeft);
for(int col = 0; col < 16; ++col) for(int col = 0; col < 16; ++col)
{ {
new StaticTextWidget(boss, font, xpos + col*myRamGrid->colWidth() + lwidth + 8, new StaticTextWidget(boss, lfont, xpos + col*myRamGrid->colWidth() + lwidth + 8,
ypos - lineHeight, ypos - lineHeight,
fontWidth, fontHeight, fontWidth, fontHeight,
Common::Base::toString(col, Common::Base::F_16_1), Common::Base::toString(col, Common::Base::F_16_1),
@ -100,7 +101,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
for(int row = 0; row < 8; ++row) for(int row = 0; row < 8; ++row)
{ {
myRamLabels[row] = myRamLabels[row] =
new StaticTextWidget(boss, font, xpos + 8, ypos + row*lineHeight + 2, new StaticTextWidget(boss, lfont, xpos + 8, ypos + row*lineHeight + 2,
3*fontWidth, fontHeight, "", kTextAlignLeft); 3*fontWidth, fontHeight, "", kTextAlignLeft);
} }
@ -109,26 +110,25 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
// We need to define these widgets from right to left since the leftmost // We need to define these widgets from right to left since the leftmost
// one resizes as much as possible // one resizes as much as possible
xpos = xpos_r - 13*fontWidth - 5; xpos = xpos_r - 13*fontWidth - 5;
new StaticTextWidget(boss, font, xpos, ypos, 4*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos, 4*fontWidth, fontHeight,
"Bin:", kTextAlignLeft); "Bin:", kTextAlignLeft);
myBinValue = new EditTextWidget(boss, font, xpos + 4*fontWidth + 5, myBinValue = new EditTextWidget(boss, nfont, xpos + 4*fontWidth + 5,
ypos-2, 9*fontWidth, lineHeight, ""); ypos-2, 9*fontWidth, lineHeight, "");
myBinValue->setEditable(false); myBinValue->setEditable(false);
xpos -= 8*fontWidth + 5 + 20; xpos -= 8*fontWidth + 5 + 20;
new StaticTextWidget(boss, font, xpos, ypos, 4*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos, 4*fontWidth, fontHeight,
"Dec:", kTextAlignLeft); "Dec:", kTextAlignLeft);
myDecValue = new EditTextWidget(boss, font, xpos + 4*fontWidth + 5, ypos-2, myDecValue = new EditTextWidget(boss, nfont, xpos + 4*fontWidth + 5, ypos-2,
4*fontWidth, lineHeight, ""); 4*fontWidth, lineHeight, "");
myDecValue->setEditable(false); myDecValue->setEditable(false);
xpos_r = xpos - 20; xpos_r = xpos - 20;
xpos = x + 10; xpos = x + 10;
new StaticTextWidget(boss, font, xpos, ypos, new StaticTextWidget(boss, lfont, xpos, ypos, 6*fontWidth, fontHeight,
6*fontWidth, fontHeight,
"Label:", kTextAlignLeft); "Label:", kTextAlignLeft);
xpos += 6*fontWidth + 5; xpos += 6*fontWidth + 5;
myLabel = new EditTextWidget(boss, font, xpos, ypos-2, xpos_r-xpos, myLabel = new EditTextWidget(boss, nfont, xpos, ypos-2, xpos_r-xpos,
lineHeight, ""); lineHeight, "");
myLabel->setEditable(false); myLabel->setEditable(false);
@ -139,7 +139,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
// Inputbox which will pop up when searching RAM // Inputbox which will pop up when searching RAM
StringList labels; StringList labels;
labels.push_back("Search: "); labels.push_back("Search: ");
myInputBox = new InputTextDialog(boss, font, labels); myInputBox = new InputTextDialog(boss, lfont, nfont, labels);
myInputBox->setTarget(this); myInputBox->setTarget(this);
// Start with these buttons disabled // Start with these buttons disabled

View File

@ -34,7 +34,8 @@ class StaticTextWidget;
class RamWidget : public Widget, public CommandSender class RamWidget : public Widget, public CommandSender
{ {
public: public:
RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y); RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y);
virtual ~RamWidget(); virtual ~RamWidget();
void handleCommand(CommandSender* sender, int cmd, int data, int id); void handleCommand(CommandSender* sender, int cmd, int data, int id);

View File

@ -39,10 +39,10 @@
#include "RiotWidget.hxx" #include "RiotWidget.hxx"
#define CREATE_IO_REGS(desc, bits, bitsID, editable) \ #define CREATE_IO_REGS(desc, bits, bitsID, editable) \
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, fontHeight, \ t = new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,\
desc, kTextAlignLeft); \ desc, kTextAlignLeft); \
xpos += t->getWidth() + 5; \ xpos += t->getWidth() + 5; \
bits = new ToggleBitWidget(boss, font, xpos, ypos, 8, 1); \ bits = new ToggleBitWidget(boss, nfont, xpos, ypos, 8, 1); \
bits->setTarget(this); \ bits->setTarget(this); \
bits->setID(bitsID); \ bits->setID(bitsID); \
if(editable) addFocusWidget(bits); else bits->setEditable(false); \ if(editable) addFocusWidget(bits); else bits->setEditable(false); \
@ -50,14 +50,15 @@
bits->setList(off, on); bits->setList(off, on);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font, RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
int x, int y, int w, int h) const GUI::Font& nfont,
: Widget(boss, font, x, y, w, h), int x, int y, int w, int h)
: Widget(boss, lfont, x, y, w, h),
CommandSender(boss) CommandSender(boss)
{ {
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = lfont.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = lfont.getFontHeight(),
lineHeight = font.getLineHeight(); lineHeight = lfont.getLineHeight();
int xpos = 10, ypos = 25, lwidth = 9 * fontWidth, col = 0; int xpos = 10, ypos = 25, lwidth = 9 * fontWidth, col = 0;
StaticTextWidget* t; StaticTextWidget* t;
VariantList items; VariantList items;
@ -100,11 +101,11 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
xpos = 10; ypos += 2*lineHeight; xpos = 10; ypos += 2*lineHeight;
for(int row = 0; row < 4; ++row) for(int row = 0; row < 4; ++row)
{ {
t = new StaticTextWidget(boss, font, xpos, ypos + row*lineHeight + 2, t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
9*fontWidth, fontHeight, writeNames[row], kTextAlignLeft); 9*fontWidth, fontHeight, writeNames[row], kTextAlignLeft);
} }
xpos += 9*fontWidth + 5; xpos += 9*fontWidth + 5;
myTimWrite = new DataGridWidget(boss, font, xpos, ypos, 1, 4, 2, 8, Common::Base::F_16); myTimWrite = new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 2, 8, Common::Base::F_16);
myTimWrite->setTarget(this); myTimWrite->setTarget(this);
myTimWrite->setID(kTimWriteID); myTimWrite->setID(kTimWriteID);
addFocusWidget(myTimWrite); addFocusWidget(myTimWrite);
@ -114,21 +115,21 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
xpos = 10; ypos += myTimWrite->getHeight() + lineHeight; xpos = 10; ypos += myTimWrite->getHeight() + lineHeight;
for(int row = 0; row < 4; ++row) for(int row = 0; row < 4; ++row)
{ {
t = new StaticTextWidget(boss, font, xpos, ypos + row*lineHeight + 2, t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
11*fontWidth, fontHeight, readNames[row], kTextAlignLeft); 11*fontWidth, fontHeight, readNames[row], kTextAlignLeft);
} }
xpos += t->getWidth() + 5; xpos += t->getWidth() + 5;
myTimRead = new DataGridWidget(boss, font, xpos, ypos, 1, 4, 8, 32, Common::Base::F_16); myTimRead = new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 8, 32, Common::Base::F_16);
myTimRead->setTarget(this); myTimRead->setTarget(this);
myTimRead->setEditable(false); myTimRead->setEditable(false);
// Controller ports // Controller ports
const RiotDebug& riot = instance().debugger().riotDebug(); const RiotDebug& riot = instance().debugger().riotDebug();
xpos = col; ypos = 10; xpos = col; ypos = 10;
myLeftControl = addControlWidget(boss, font, xpos, ypos, myLeftControl = addControlWidget(boss, lfont, xpos, ypos,
riot.controller(Controller::Left)); riot.controller(Controller::Left));
xpos += myLeftControl->getWidth() + 15; xpos += myLeftControl->getWidth() + 15;
myRightControl = addControlWidget(boss, font, xpos, ypos, myRightControl = addControlWidget(boss, lfont, xpos, ypos,
riot.controller(Controller::Right)); riot.controller(Controller::Right));
// TIA INPTx registers (R), left port // TIA INPTx registers (R), left port
@ -136,11 +137,11 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
xpos = col; ypos += myLeftControl->getHeight() + 2 * lineHeight; xpos = col; ypos += myLeftControl->getHeight() + 2 * lineHeight;
for(int row = 0; row < 3; ++row) for(int row = 0; row < 3; ++row)
{ {
new StaticTextWidget(boss, font, xpos, ypos + row*lineHeight + 2, new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
6*fontWidth, fontHeight, contLeftReadNames[row], kTextAlignLeft); 6*fontWidth, fontHeight, contLeftReadNames[row], kTextAlignLeft);
} }
xpos += 6*fontWidth + 5; xpos += 6*fontWidth + 5;
myLeftINPT = new DataGridWidget(boss, font, xpos, ypos, 1, 3, 2, 8, Common::Base::F_16); myLeftINPT = new DataGridWidget(boss, nfont, xpos, ypos, 1, 3, 2, 8, Common::Base::F_16);
myLeftINPT->setTarget(this); myLeftINPT->setTarget(this);
myLeftINPT->setEditable(false); myLeftINPT->setEditable(false);
@ -149,38 +150,38 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
xpos = col + myLeftControl->getWidth() + 15; xpos = col + myLeftControl->getWidth() + 15;
for(int row = 0; row < 3; ++row) for(int row = 0; row < 3; ++row)
{ {
new StaticTextWidget(boss, font, xpos, ypos + row*lineHeight + 2, new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
6*fontWidth, fontHeight, contRightReadNames[row], kTextAlignLeft); 6*fontWidth, fontHeight, contRightReadNames[row], kTextAlignLeft);
} }
xpos += 6*fontWidth + 5; xpos += 6*fontWidth + 5;
myRightINPT = new DataGridWidget(boss, font, xpos, ypos, 1, 3, 2, 8, Common::Base::F_16); myRightINPT = new DataGridWidget(boss, nfont, xpos, ypos, 1, 3, 2, 8, Common::Base::F_16);
myRightINPT->setTarget(this); myRightINPT->setTarget(this);
myRightINPT->setEditable(false); myRightINPT->setEditable(false);
// TIA INPTx VBLANK bits (D6-latch, D7-dump) (R) // TIA INPTx VBLANK bits (D6-latch, D7-dump) (R)
xpos = col + 20; ypos += myLeftINPT->getHeight() + lineHeight; xpos = col + 20; ypos += myLeftINPT->getHeight() + lineHeight;
myINPTLatch = new CheckboxWidget(boss, font, xpos, ypos, "INPT latch (VBlank D6)"); myINPTLatch = new CheckboxWidget(boss, lfont, xpos, ypos, "INPT latch (VBlank D6)");
myINPTLatch->setTarget(this); myINPTLatch->setTarget(this);
myINPTLatch->setEditable(false); myINPTLatch->setEditable(false);
ypos += lineHeight + 5; ypos += lineHeight + 5;
myINPTDump = new CheckboxWidget(boss, font, xpos, ypos, "INPT dump to gnd (VBlank D7)"); myINPTDump = new CheckboxWidget(boss, lfont, xpos, ypos, "INPT dump to gnd (VBlank D7)");
myINPTDump->setTarget(this); myINPTDump->setTarget(this);
myINPTDump->setEditable(false); myINPTDump->setEditable(false);
// PO & P1 difficulty switches // PO & P1 difficulty switches
int pwidth = font.getStringWidth("B/easy"); int pwidth = lfont.getStringWidth("B/easy");
lwidth = font.getStringWidth("P0 Diff: "); lwidth = lfont.getStringWidth("P0 Diff: ");
xpos = col; ypos += 2 * lineHeight; xpos = col; ypos += 2 * lineHeight;
int col2_ypos = ypos; int col2_ypos = ypos;
items.clear(); items.clear();
items.push_back("B/easy", "b"); items.push_back("B/easy", "b");
items.push_back("A/hard", "a"); items.push_back("A/hard", "a");
myP0Diff = new PopUpWidget(boss, font, xpos, ypos, pwidth, lineHeight, items, myP0Diff = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items,
"P0 Diff: ", lwidth, kP0DiffChanged); "P0 Diff: ", lwidth, kP0DiffChanged);
myP0Diff->setTarget(this); myP0Diff->setTarget(this);
addFocusWidget(myP0Diff); addFocusWidget(myP0Diff);
ypos += myP0Diff->getHeight() + 5; ypos += myP0Diff->getHeight() + 5;
myP1Diff = new PopUpWidget(boss, font, xpos, ypos, pwidth, lineHeight, items, myP1Diff = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items,
"P1 Diff: ", lwidth, kP1DiffChanged); "P1 Diff: ", lwidth, kP1DiffChanged);
myP1Diff->setTarget(this); myP1Diff->setTarget(this);
addFocusWidget(myP1Diff); addFocusWidget(myP1Diff);
@ -190,20 +191,20 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
items.clear(); items.clear();
items.push_back("B&W", "bw"); items.push_back("B&W", "bw");
items.push_back("Color", "color"); items.push_back("Color", "color");
myTVType = new PopUpWidget(boss, font, xpos, ypos, pwidth, lineHeight, items, myTVType = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items,
"TV Type: ", lwidth, kTVTypeChanged); "TV Type: ", lwidth, kTVTypeChanged);
myTVType->setTarget(this); myTVType->setTarget(this);
addFocusWidget(myTVType); addFocusWidget(myTVType);
// Select and Reset // Select and Reset
xpos += myP0Diff->getWidth() + 20; ypos = col2_ypos + lineHeight; xpos += myP0Diff->getWidth() + 20; ypos = col2_ypos + lineHeight;
mySelect = new CheckboxWidget(boss, font, xpos, ypos, "Select", mySelect = new CheckboxWidget(boss, lfont, xpos, ypos, "Select",
kCheckActionCmd); kCheckActionCmd);
mySelect->setID(kSelectID); mySelect->setID(kSelectID);
mySelect->setTarget(this); mySelect->setTarget(this);
addFocusWidget(mySelect); addFocusWidget(mySelect);
ypos += mySelect->getHeight() + 5; ypos += mySelect->getHeight() + 5;
myReset = new CheckboxWidget(boss, font, xpos, ypos, "Reset", myReset = new CheckboxWidget(boss, lfont, xpos, ypos, "Reset",
kCheckActionCmd); kCheckActionCmd);
myReset->setID(kResetID); myReset->setID(kResetID);
myReset->setTarget(this); myReset->setTarget(this);
@ -211,13 +212,13 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
// Randomize items // Randomize items
xpos = 10; ypos += 3*lineHeight; xpos = 10; ypos += 3*lineHeight;
new StaticTextWidget(boss, font, xpos, ypos, new StaticTextWidget(boss, lfont, xpos, ypos,
font.getStringWidth("When loading a ROM:"), fontHeight, lfont.getStringWidth("When loading a ROM:"), fontHeight,
"When loading a ROM:", kTextAlignLeft); "When loading a ROM:", kTextAlignLeft);
// Randomize CPU // Randomize CPU
xpos += 30; ypos += lineHeight + 4; xpos += 30; ypos += lineHeight + 4;
myRandomizeCPU = new CheckboxWidget(boss, font, xpos, ypos+1, myRandomizeCPU = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Randomize CPU registers (A/X/Y/PS)", kCheckActionCmd); "Randomize CPU registers (A/X/Y/PS)", kCheckActionCmd);
myRandomizeCPU->setID(kRandCPUID); myRandomizeCPU->setID(kRandCPUID);
myRandomizeCPU->setTarget(this); myRandomizeCPU->setTarget(this);
@ -225,7 +226,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
// Randomize RAM // Randomize RAM
ypos += lineHeight + 4; ypos += lineHeight + 4;
myRandomizeRAM = new CheckboxWidget(boss, font, xpos, ypos+1, myRandomizeRAM = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Randomize zero-page and extended RAM", kCheckActionCmd); "Randomize zero-page and extended RAM", kCheckActionCmd);
myRandomizeRAM->setID(kRandRAMID); myRandomizeRAM->setID(kRandRAMID);
myRandomizeRAM->setTarget(this); myRandomizeRAM->setTarget(this);

View File

@ -34,7 +34,7 @@ class ControllerWidget;
class RiotWidget : public Widget, public CommandSender class RiotWidget : public Widget, public CommandSender
{ {
public: public:
RiotWidget(GuiObject* boss, const GUI::Font& font, RiotWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h); int x, int y, int w, int h);
virtual ~RiotWidget(); virtual ~RiotWidget();

View File

@ -27,9 +27,10 @@
#include "RomListWidget.hxx" #include "RomListWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& font, RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h) int x, int y, int w, int h)
: EditableWidget(boss, font, x, y, 16, 16), : EditableWidget(boss, nfont, x, y, 16, 16),
myMenu(NULL), myMenu(NULL),
_rows(0), _rows(0),
_cols(0), _cols(0),
@ -53,14 +54,14 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& font,
_h = h + 2; _h = h + 2;
// Create scrollbar and attach to the list // Create scrollbar and attach to the list
myScrollBar = new ScrollBarWidget(boss, font, _x + _w, _y, kScrollBarWidth, _h); myScrollBar = new ScrollBarWidget(boss, lfont, _x + _w, _y, kScrollBarWidth, _h);
myScrollBar->setTarget(this); myScrollBar->setTarget(this);
// Add settings menu // Add settings menu
myMenu = new RomListSettings(this, font); myMenu = new RomListSettings(this, lfont);
// Take advantage of a wide debugger window when possible // Take advantage of a wide debugger window when possible
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = lfont.getMaxCharWidth(),
numchars = w / fontWidth; numchars = w / fontWidth;
_labelWidth = BSPF_max(16, int(0.20 * (numchars - 12))) * fontWidth - 1; _labelWidth = BSPF_max(16, int(0.20 * (numchars - 12))) * fontWidth - 1;
@ -79,7 +80,7 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& font,
CheckboxWidget* t; CheckboxWidget* t;
for(int i = 0; i < _rows; ++i) for(int i = 0; i < _rows; ++i)
{ {
t = new CheckboxWidget(boss, font, _x + 2, ypos, "", kCheckActionCmd); t = new CheckboxWidget(boss, lfont, _x + 2, ypos, "", kCheckActionCmd);
t->setTarget(this); t->setTarget(this);
t->setID(i); t->setID(i);
t->setFill(CheckboxWidget::Circle); t->setFill(CheckboxWidget::Circle);

View File

@ -49,7 +49,7 @@ class RomListWidget : public EditableWidget
}; };
public: public:
RomListWidget(GuiObject* boss, const GUI::Font& font, RomListWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h); int x, int y, int w, int h);
virtual ~RomListWidget(); virtual ~RomListWidget();

View File

@ -33,9 +33,9 @@
#include "RomWidget.hxx" #include "RomWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RomWidget::RomWidget(GuiObject* boss, const GUI::Font& font, RomWidget::RomWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h) int x, int y, int w, int h)
: Widget(boss, font, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss), CommandSender(boss),
myListIsDirty(true) myListIsDirty(true)
{ {
@ -45,19 +45,19 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& font,
// Show current bank state // Show current bank state
xpos = x; ypos = y + 7; xpos = x; ypos = y + 7;
t = new StaticTextWidget(boss, font, xpos, ypos, t = new StaticTextWidget(boss, lfont, xpos, ypos,
font.getStringWidth("Bank state: "), lfont.getStringWidth("Bank state: "),
font.getFontHeight(), lfont.getFontHeight(),
"Bank state: ", kTextAlignLeft); "Bank state: ", kTextAlignLeft);
xpos += t->getWidth() + 5; xpos += t->getWidth() + 5;
myBank = new EditTextWidget(boss, font, xpos, ypos-1, myBank = new EditTextWidget(boss, nfont, xpos, ypos-1,
_w - 2 - xpos, font.getLineHeight()); _w - 2 - xpos, nfont.getLineHeight());
// Create rom listing // Create rom listing
xpos = x; ypos += myBank->getHeight() + 4; xpos = x; ypos += myBank->getHeight() + 4;
myRomList = new RomListWidget(boss, font, xpos, ypos, _w - 4, _h - ypos - 2); myRomList = new RomListWidget(boss, lfont, nfont, xpos, ypos, _w - 4, _h - ypos - 2);
myRomList->setTarget(this); myRomList->setTarget(this);
addFocusWidget(myRomList); addFocusWidget(myRomList);
} }

View File

@ -36,7 +36,8 @@ class RomWidget : public Widget, public CommandSender
}; };
public: public:
RomWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int w, int h); RomWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h);
virtual ~RomWidget(); virtual ~RomWidget();
void invalidate(bool forcereload = true) void invalidate(bool forcereload = true)

View File

@ -29,75 +29,76 @@
#include "TiaInfoWidget.hxx" #include "TiaInfoWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& font, TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int max_w) int x, int y, int max_w)
: Widget(boss, font, x, y, 16, 16), : Widget(boss, lfont, x, y, 16, 16),
CommandSender(boss) CommandSender(boss)
{ {
bool longstr = 34 * font.getMaxCharWidth() <= max_w; bool longstr = 34 * lfont.getMaxCharWidth() <= max_w;
x += 5; x += 5;
const int lineHeight = font.getLineHeight(); const int lineHeight = lfont.getLineHeight();
int xpos = x, ypos = y; int xpos = x, ypos = y;
int lwidth = font.getStringWidth(longstr ? "Frame Cycle:" : "F. Cycle:"); int lwidth = lfont.getStringWidth(longstr ? "Frame Cycle:" : "F. Cycle:");
int fwidth = 5 * font.getMaxCharWidth() + 4; int fwidth = 5 * lfont.getMaxCharWidth() + 4;
// Add frame info // Add frame info
xpos = x; ypos = y + 10; xpos = x; ypos = y + 10;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Frame Count:" : "Frame:", longstr ? "Frame Count:" : "Frame:",
kTextAlignLeft); kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myFrameCount = new EditTextWidget(boss, font, xpos, ypos-1, fwidth, lineHeight, ""); myFrameCount = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, "");
myFrameCount->setEditable(false); myFrameCount->setEditable(false);
xpos = x; ypos += lineHeight + 5; xpos = x; ypos += lineHeight + 5;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Frame Cycle:" : "F. Cycle:", longstr ? "Frame Cycle:" : "F. Cycle:",
kTextAlignLeft); kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myFrameCycles = new EditTextWidget(boss, font, xpos, ypos-1, fwidth, lineHeight, ""); myFrameCycles = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, "");
myFrameCycles->setEditable(false); myFrameCycles->setEditable(false);
xpos = x + 20; ypos += lineHeight + 8; xpos = x + 20; ypos += lineHeight + 8;
myVSync = new CheckboxWidget(boss, font, xpos, ypos-3, "VSync", 0); myVSync = new CheckboxWidget(boss, lfont, xpos, ypos-3, "VSync", 0);
myVSync->setEditable(false); myVSync->setEditable(false);
xpos = x + 20; ypos += lineHeight + 5; xpos = x + 20; ypos += lineHeight + 5;
myVBlank = new CheckboxWidget(boss, font, xpos, ypos-3, "VBlank", 0); myVBlank = new CheckboxWidget(boss, lfont, xpos, ypos-3, "VBlank", 0);
myVBlank->setEditable(false); myVBlank->setEditable(false);
xpos = x + lwidth + myFrameCycles->getWidth() + 8; ypos = y + 10; xpos = x + lwidth + myFrameCycles->getWidth() + 8; ypos = y + 10;
lwidth = font.getStringWidth(longstr ? "Color Clock:" : "Pixel Pos:"); lwidth = lfont.getStringWidth(longstr ? "Color Clock:" : "Pixel Pos:");
fwidth = 3 * font.getMaxCharWidth() + 4; fwidth = 3 * lfont.getMaxCharWidth() + 4;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
"Scanline:", kTextAlignLeft); "Scanline:", kTextAlignLeft);
myScanlineCount = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth, myScanlineCount = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");
myScanlineCount->setEditable(false); myScanlineCount->setEditable(false);
ypos += lineHeight + 5; ypos += lineHeight + 5;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Scan Cycle:" : "S. Cycle:", kTextAlignLeft); longstr ? "Scan Cycle:" : "S. Cycle:", kTextAlignLeft);
myScanlineCycles = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth, myScanlineCycles = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");
myScanlineCycles->setEditable(false); myScanlineCycles->setEditable(false);
ypos += lineHeight + 5; ypos += lineHeight + 5;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
"Pixel Pos:", kTextAlignLeft); "Pixel Pos:", kTextAlignLeft);
myPixelPosition = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth, myPixelPosition = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");
myPixelPosition->setEditable(false); myPixelPosition->setEditable(false);
ypos += lineHeight + 5; ypos += lineHeight + 5;
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Color Clock:" : "Color Clk:", kTextAlignLeft); longstr ? "Color Clock:" : "Color Clk:", kTextAlignLeft);
myColorClocks = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth, myColorClocks = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");
myColorClocks->setEditable(false); myColorClocks->setEditable(false);

View File

@ -30,7 +30,8 @@ class EditTextWidget;
class TiaInfoWidget : public Widget, public CommandSender class TiaInfoWidget : public Widget, public CommandSender
{ {
public: public:
TiaInfoWidget(GuiObject *boss, const GUI::Font& font, int x, int y, int max_w); TiaInfoWidget(GuiObject *boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int max_w);
virtual ~TiaInfoWidget(); virtual ~TiaInfoWidget();
void loadConfig(); void loadConfig();

View File

@ -33,14 +33,15 @@
#include "TiaWidget.hxx" #include "TiaWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font, TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& nfont,
int x, int y, int w, int h) int x, int y, int w, int h)
: Widget(boss, font, x, y, w, h), : Widget(boss, lfont, x, y, w, h),
CommandSender(boss) CommandSender(boss)
{ {
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = lfont.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = lfont.getFontHeight(),
lineHeight = font.getLineHeight(); lineHeight = lfont.getLineHeight();
int xpos = 10, ypos = 15 + lineHeight, lwidth = 4 * fontWidth; int xpos = 10, ypos = 15 + lineHeight, lwidth = 4 * fontWidth;
StaticTextWidget* t; StaticTextWidget* t;
@ -48,32 +49,32 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
const char* regNames[] = { "COLUP0:", "COLUP1:", "COLUPF:", "COLUBK:" }; const char* regNames[] = { "COLUP0:", "COLUP1:", "COLUPF:", "COLUBK:" };
for(int row = 0; row < 4; ++row) for(int row = 0; row < 4; ++row)
{ {
t = new StaticTextWidget(boss, font, xpos, ypos + row*lineHeight + 2, t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
7*fontWidth, fontHeight, 7*fontWidth, fontHeight,
regNames[row], regNames[row],
kTextAlignLeft); kTextAlignLeft);
} }
xpos += 7*fontWidth + 5; xpos += 7*fontWidth + 5;
myColorRegs = new DataGridWidget(boss, font, xpos, ypos, myColorRegs = new DataGridWidget(boss, nfont, xpos, ypos,
1, 4, 2, 8, Common::Base::F_16); 1, 4, 2, 8, Common::Base::F_16);
myColorRegs->setTarget(this); myColorRegs->setTarget(this);
myColorRegs->setID(kColorRegsID); myColorRegs->setID(kColorRegsID);
addFocusWidget(myColorRegs); addFocusWidget(myColorRegs);
xpos += myColorRegs->colWidth() + 5; xpos += myColorRegs->colWidth() + 5;
myCOLUP0Color = new ColorWidget(boss, font, xpos, ypos+2, 20, lineHeight - 4); myCOLUP0Color = new ColorWidget(boss, nfont, xpos, ypos+2, 20, lineHeight - 4);
myCOLUP0Color->setTarget(this); myCOLUP0Color->setTarget(this);
ypos += lineHeight; ypos += lineHeight;
myCOLUP1Color = new ColorWidget(boss, font, xpos, ypos+2, 20, lineHeight - 4); myCOLUP1Color = new ColorWidget(boss, nfont, xpos, ypos+2, 20, lineHeight - 4);
myCOLUP1Color->setTarget(this); myCOLUP1Color->setTarget(this);
ypos += lineHeight; ypos += lineHeight;
myCOLUPFColor = new ColorWidget(boss, font, xpos, ypos+2, 20, lineHeight - 4); myCOLUPFColor = new ColorWidget(boss, nfont, xpos, ypos+2, 20, lineHeight - 4);
myCOLUPFColor->setTarget(this); myCOLUPFColor->setTarget(this);
ypos += lineHeight; ypos += lineHeight;
myCOLUBKColor = new ColorWidget(boss, font, xpos, ypos+2, 20, lineHeight - 4); myCOLUBKColor = new ColorWidget(boss, nfont, xpos, ypos+2, 20, lineHeight - 4);
myCOLUBKColor->setTarget(this); myCOLUBKColor->setTarget(this);
//////////////////////////// ////////////////////////////
@ -81,11 +82,11 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
//////////////////////////// ////////////////////////////
// Add horizontal labels // Add horizontal labels
xpos += myCOLUBKColor->getWidth() + 2*fontWidth + 30; ypos -= 4*lineHeight + 5; xpos += myCOLUBKColor->getWidth() + 2*fontWidth + 30; ypos -= 4*lineHeight + 5;
t = new StaticTextWidget(boss, font, xpos, ypos, 14*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos, 14*fontWidth, fontHeight,
"PF BL M1 M0 P1", kTextAlignLeft); "PF BL M1 M0 P1", kTextAlignLeft);
// Add label for Strobes; buttons will be added later // Add label for Strobes; buttons will be added later
t = new StaticTextWidget(boss, font, xpos + t->getWidth() + 9*fontWidth, ypos, t = new StaticTextWidget(boss, lfont, xpos + t->getWidth() + 9*fontWidth, ypos,
8*fontWidth, fontHeight, 8*fontWidth, fontHeight,
"Strobes:", kTextAlignLeft); "Strobes:", kTextAlignLeft);
@ -94,7 +95,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
const char* collLabel[] = { "P0", "P1", "M0", "M1", "BL" }; const char* collLabel[] = { "P0", "P1", "M0", "M1", "BL" };
for(int row = 0; row < 5; ++row) for(int row = 0; row < 5; ++row)
{ {
t = new StaticTextWidget(boss, font, xpos, ypos + row*(lineHeight+3), t = new StaticTextWidget(boss, lfont, xpos, ypos + row*(lineHeight+3),
2*fontWidth, fontHeight, 2*fontWidth, fontHeight,
collLabel[row], kTextAlignLeft); collLabel[row], kTextAlignLeft);
} }
@ -106,7 +107,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
{ {
for(unsigned int col = 0; col < 5 - row; ++col) for(unsigned int col = 0; col < 5 - row; ++col)
{ {
myCollision[idx] = new CheckboxWidget(boss, font, collX, collY, myCollision[idx] = new CheckboxWidget(boss, lfont, collX, collY,
"", kCheckActionCmd); "", kCheckActionCmd);
myCollision[idx]->setTarget(this); myCollision[idx]->setTarget(this);
myCollision[idx]->setID(idx); myCollision[idx]->setID(idx);
@ -129,52 +130,52 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
unsigned int buttonX, buttonY, buttonW; unsigned int buttonX, buttonY, buttonW;
buttonX = collX + 20*fontWidth; buttonY = ypos; buttonX = collX + 20*fontWidth; buttonY = ypos;
buttonW = 7 * fontWidth; buttonW = 7 * fontWidth;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"WSync", kWsyncCmd); "WSync", kWsyncCmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"ResP0", kResP0Cmd); "ResP0", kResP0Cmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"ResM0", kResM0Cmd); "ResM0", kResM0Cmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"ResBL", kResBLCmd); "ResBL", kResBLCmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"HmClr", kHmclrCmd); "HmClr", kHmclrCmd);
b->setTarget(this); b->setTarget(this);
buttonX += buttonW + 4; buttonY = ypos; buttonX += buttonW + 4; buttonY = ypos;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"RSync", kRsyncCmd); "RSync", kRsyncCmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"ResP1", kResP1Cmd); "ResP1", kResP1Cmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"ResM1", kResM1Cmd); "ResM1", kResM1Cmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"HMove", kHmoveCmd); "HMove", kHmoveCmd);
b->setTarget(this); b->setTarget(this);
buttonY += lineHeight + 3; buttonY += lineHeight + 3;
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight, b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
"CxClr", kCxclrCmd); "CxClr", kCxclrCmd);
b->setTarget(this); b->setTarget(this);
@ -183,22 +184,22 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
//////////////////////////// ////////////////////////////
// grP0 // grP0
xpos = 10; ypos = buttonY + 2*lineHeight; xpos = 10; ypos = buttonY + 2*lineHeight;
t = new StaticTextWidget(boss, font, xpos, ypos+2, t = new StaticTextWidget(boss, lfont, xpos, ypos+2,
7*fontWidth, fontHeight, 7*fontWidth, fontHeight,
"P0: GR:", kTextAlignLeft); "P0: GR:", kTextAlignLeft);
xpos += 7*fontWidth + 5; xpos += 7*fontWidth + 5;
myGRP0 = new TogglePixelWidget(boss, font, xpos, ypos+1, 8, 1); myGRP0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
myGRP0->setTarget(this); myGRP0->setTarget(this);
myGRP0->setID(kGRP0ID); myGRP0->setID(kGRP0ID);
addFocusWidget(myGRP0); addFocusWidget(myGRP0);
// posP0 // posP0
xpos += myGRP0->getWidth() + 8; xpos += myGRP0->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, t = new StaticTextWidget(boss, lfont, xpos, ypos+2,
6*fontWidth, fontHeight, 6*fontWidth, fontHeight,
"Pos: #", kTextAlignLeft); "Pos: #", kTextAlignLeft);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosP0 = new DataGridWidget(boss, font, xpos, ypos, myPosP0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
myPosP0->setTarget(this); myPosP0->setTarget(this);
myPosP0->setID(kPosP0ID); myPosP0->setID(kPosP0ID);
@ -207,11 +208,11 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// hmP0 // hmP0
xpos += myPosP0->getWidth() + 8; xpos += myPosP0->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, t = new StaticTextWidget(boss, lfont, xpos, ypos+2,
3*fontWidth, fontHeight, 3*fontWidth, fontHeight,
"HM:", kTextAlignLeft); "HM:", kTextAlignLeft);
xpos += 3*fontWidth + 5; xpos += 3*fontWidth + 5;
myHMP0 = new DataGridWidget(boss, font, xpos, ypos, myHMP0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
myHMP0->setTarget(this); myHMP0->setTarget(this);
myHMP0->setID(kHMP0ID); myHMP0->setID(kHMP0ID);
@ -219,14 +220,14 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// P0 reflect and delay // P0 reflect and delay
xpos += myHMP0->getWidth() + 15; xpos += myHMP0->getWidth() + 15;
myRefP0 = new CheckboxWidget(boss, font, xpos, ypos+1, myRefP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Reflect", kCheckActionCmd); "Reflect", kCheckActionCmd);
myRefP0->setTarget(this); myRefP0->setTarget(this);
myRefP0->setID(kRefP0ID); myRefP0->setID(kRefP0ID);
addFocusWidget(myRefP0); addFocusWidget(myRefP0);
xpos += myRefP0->getWidth() + 15; xpos += myRefP0->getWidth() + 15;
myDelP0 = new CheckboxWidget(boss, font, xpos, ypos+1, myDelP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Delay", kCheckActionCmd); "Delay", kCheckActionCmd);
myDelP0->setTarget(this); myDelP0->setTarget(this);
myDelP0->setID(kDelP0ID); myDelP0->setID(kDelP0ID);
@ -234,18 +235,18 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// NUSIZ0 (player portion) // NUSIZ0 (player portion)
xpos = 10 + lwidth; ypos += myGRP0->getHeight() + 5; xpos = 10 + lwidth; ypos += myGRP0->getHeight() + 5;
t = new StaticTextWidget(boss, font, xpos, ypos+2, t = new StaticTextWidget(boss, lfont, xpos, ypos+2,
8*fontWidth, fontHeight, 8*fontWidth, fontHeight,
"NusizP0:", kTextAlignLeft); "NusizP0:", kTextAlignLeft);
xpos += 8*fontWidth + 5; xpos += 8*fontWidth + 5;
myNusizP0 = new DataGridWidget(boss, font, xpos, ypos, myNusizP0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 3, Common::Base::F_16_1); 1, 1, 1, 3, Common::Base::F_16_1);
myNusizP0->setTarget(this); myNusizP0->setTarget(this);
myNusizP0->setID(kNusizP0ID); myNusizP0->setID(kNusizP0ID);
addFocusWidget(myNusizP0); addFocusWidget(myNusizP0);
xpos += myNusizP0->getWidth() + 5; xpos += myNusizP0->getWidth() + 5;
myNusizP0Text = new EditTextWidget(boss, font, xpos, ypos, 23*fontWidth, myNusizP0Text = new EditTextWidget(boss, nfont, xpos, ypos, 23*fontWidth,
lineHeight, ""); lineHeight, "");
myNusizP0Text->setEditable(false); myNusizP0Text->setEditable(false);
@ -254,20 +255,20 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
//////////////////////////// ////////////////////////////
// grP1 // grP1
xpos = 10; ypos += 2*lineHeight; xpos = 10; ypos += 2*lineHeight;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 7*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 7*fontWidth, fontHeight,
"P1: GR:", kTextAlignLeft); "P1: GR:", kTextAlignLeft);
xpos += 7*fontWidth + 5; xpos += 7*fontWidth + 5;
myGRP1 = new TogglePixelWidget(boss, font, xpos, ypos+1, 8, 1); myGRP1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
myGRP1->setTarget(this); myGRP1->setTarget(this);
myGRP1->setID(kGRP1ID); myGRP1->setID(kGRP1ID);
addFocusWidget(myGRP1); addFocusWidget(myGRP1);
// posP1 // posP1
xpos += myGRP1->getWidth() + 8; xpos += myGRP1->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 6*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 6*fontWidth, fontHeight,
"Pos: #", kTextAlignLeft); "Pos: #", kTextAlignLeft);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosP1 = new DataGridWidget(boss, font, xpos, ypos, myPosP1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
myPosP1->setTarget(this); myPosP1->setTarget(this);
myPosP1->setID(kPosP1ID); myPosP1->setID(kPosP1ID);
@ -276,10 +277,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// hmP1 // hmP1
xpos += myPosP1->getWidth() + 8; xpos += myPosP1->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 3*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 3*fontWidth, fontHeight,
"HM:", kTextAlignLeft); "HM:", kTextAlignLeft);
xpos += 3*fontWidth + 5; xpos += 3*fontWidth + 5;
myHMP1 = new DataGridWidget(boss, font, xpos, ypos, myHMP1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
myHMP1->setTarget(this); myHMP1->setTarget(this);
myHMP1->setID(kHMP1ID); myHMP1->setID(kHMP1ID);
@ -287,14 +288,14 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// P1 reflect and delay // P1 reflect and delay
xpos += myHMP1->getWidth() + 15; xpos += myHMP1->getWidth() + 15;
myRefP1 = new CheckboxWidget(boss, font, xpos, ypos+1, myRefP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Reflect", kCheckActionCmd); "Reflect", kCheckActionCmd);
myRefP1->setTarget(this); myRefP1->setTarget(this);
myRefP1->setID(kRefP1ID); myRefP1->setID(kRefP1ID);
addFocusWidget(myRefP1); addFocusWidget(myRefP1);
xpos += myRefP1->getWidth() + 15; xpos += myRefP1->getWidth() + 15;
myDelP1 = new CheckboxWidget(boss, font, xpos, ypos+1, myDelP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Delay", kCheckActionCmd); "Delay", kCheckActionCmd);
myDelP1->setTarget(this); myDelP1->setTarget(this);
myDelP1->setID(kDelP1ID); myDelP1->setID(kDelP1ID);
@ -302,17 +303,17 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// NUSIZ1 (player portion) // NUSIZ1 (player portion)
xpos = 10 + lwidth; ypos += myGRP1->getHeight() + 5; xpos = 10 + lwidth; ypos += myGRP1->getHeight() + 5;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 8*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 8*fontWidth, fontHeight,
"NusizP1:", kTextAlignLeft); "NusizP1:", kTextAlignLeft);
xpos += 8*fontWidth + 5; xpos += 8*fontWidth + 5;
myNusizP1 = new DataGridWidget(boss, font, xpos, ypos, myNusizP1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 3, Common::Base::F_16_1); 1, 1, 1, 3, Common::Base::F_16_1);
myNusizP1->setTarget(this); myNusizP1->setTarget(this);
myNusizP1->setID(kNusizP1ID); myNusizP1->setID(kNusizP1ID);
addFocusWidget(myNusizP1); addFocusWidget(myNusizP1);
xpos += myNusizP1->getWidth() + 5; xpos += myNusizP1->getWidth() + 5;
myNusizP1Text = new EditTextWidget(boss, font, xpos, ypos, 23*fontWidth, myNusizP1Text = new EditTextWidget(boss, nfont, xpos, ypos, 23*fontWidth,
lineHeight, ""); lineHeight, "");
myNusizP1Text->setEditable(false); myNusizP1Text->setEditable(false);
@ -321,10 +322,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
//////////////////////////// ////////////////////////////
// enaM0 // enaM0
xpos = 10; ypos += 2*lineHeight; xpos = 10; ypos += 2*lineHeight;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 3*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 3*fontWidth, fontHeight,
"M0:", kTextAlignLeft); "M0:", kTextAlignLeft);
xpos += 3*fontWidth + 8; xpos += 3*fontWidth + 8;
myEnaM0 = new CheckboxWidget(boss, font, xpos, ypos+2, myEnaM0 = new CheckboxWidget(boss, lfont, xpos, ypos+2,
"Enable", kCheckActionCmd); "Enable", kCheckActionCmd);
myEnaM0->setTarget(this); myEnaM0->setTarget(this);
myEnaM0->setID(kEnaM0ID); myEnaM0->setID(kEnaM0ID);
@ -332,10 +333,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// posM0 // posM0
xpos += myEnaM0->getWidth() + 12; xpos += myEnaM0->getWidth() + 12;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 6*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 6*fontWidth, fontHeight,
"Pos: #", kTextAlignLeft); "Pos: #", kTextAlignLeft);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosM0 = new DataGridWidget(boss, font, xpos, ypos, myPosM0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
myPosM0->setTarget(this); myPosM0->setTarget(this);
myPosM0->setID(kPosM0ID); myPosM0->setID(kPosM0ID);
@ -344,10 +345,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// hmM0 // hmM0
xpos += myPosM0->getWidth() + 8; xpos += myPosM0->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 3*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 3*fontWidth, fontHeight,
"HM:", kTextAlignLeft); "HM:", kTextAlignLeft);
xpos += 3*fontWidth + 5; xpos += 3*fontWidth + 5;
myHMM0 = new DataGridWidget(boss, font, xpos, ypos, myHMM0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
myHMM0->setTarget(this); myHMM0->setTarget(this);
myHMM0->setID(kHMM0ID); myHMM0->setID(kHMM0ID);
@ -355,10 +356,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// NUSIZ0 (missile portion) // NUSIZ0 (missile portion)
xpos += myHMM0->getWidth() + 8; xpos += myHMM0->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 5*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
"Size:", kTextAlignLeft); "Size:", kTextAlignLeft);
xpos += 5*fontWidth + 5; xpos += 5*fontWidth + 5;
myNusizM0 = new DataGridWidget(boss, font, xpos, ypos, myNusizM0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 2, Common::Base::F_16_1); 1, 1, 1, 2, Common::Base::F_16_1);
myNusizM0->setTarget(this); myNusizM0->setTarget(this);
myNusizM0->setID(kNusizM0ID); myNusizM0->setID(kNusizM0ID);
@ -366,7 +367,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// M0 reset // M0 reset
xpos += myNusizM0->getWidth() + 15; xpos += myNusizM0->getWidth() + 15;
myResMP0 = new CheckboxWidget(boss, font, xpos, ypos+1, myResMP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Reset", kCheckActionCmd); "Reset", kCheckActionCmd);
myResMP0->setTarget(this); myResMP0->setTarget(this);
myResMP0->setID(kResMP0ID); myResMP0->setID(kResMP0ID);
@ -377,10 +378,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
//////////////////////////// ////////////////////////////
// enaM1 // enaM1
xpos = 10; ypos += lineHeight + 6; xpos = 10; ypos += lineHeight + 6;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 3*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 3*fontWidth, fontHeight,
"M1:", kTextAlignLeft); "M1:", kTextAlignLeft);
xpos += 3*fontWidth + 8; xpos += 3*fontWidth + 8;
myEnaM1 = new CheckboxWidget(boss, font, xpos, ypos+2, myEnaM1 = new CheckboxWidget(boss, lfont, xpos, ypos+2,
"Enable", kCheckActionCmd); "Enable", kCheckActionCmd);
myEnaM1->setTarget(this); myEnaM1->setTarget(this);
myEnaM1->setID(kEnaM1ID); myEnaM1->setID(kEnaM1ID);
@ -388,10 +389,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// posM0 // posM0
xpos += myEnaM1->getWidth() + 12; xpos += myEnaM1->getWidth() + 12;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 6*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 6*fontWidth, fontHeight,
"Pos: #", kTextAlignLeft); "Pos: #", kTextAlignLeft);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosM1 = new DataGridWidget(boss, font, xpos, ypos, myPosM1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
myPosM1->setTarget(this); myPosM1->setTarget(this);
myPosM1->setID(kPosM1ID); myPosM1->setID(kPosM1ID);
@ -400,10 +401,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// hmM0 // hmM0
xpos += myPosM1->getWidth() + 8; xpos += myPosM1->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 3*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 3*fontWidth, fontHeight,
"HM:", kTextAlignLeft); "HM:", kTextAlignLeft);
xpos += 3*fontWidth + 5; xpos += 3*fontWidth + 5;
myHMM1 = new DataGridWidget(boss, font, xpos, ypos, myHMM1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
myHMM1->setTarget(this); myHMM1->setTarget(this);
myHMM1->setID(kHMM1ID); myHMM1->setID(kHMM1ID);
@ -411,10 +412,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// NUSIZ1 (missile portion) // NUSIZ1 (missile portion)
xpos += myHMM1->getWidth() + 8; xpos += myHMM1->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 5*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
"Size:", kTextAlignLeft); "Size:", kTextAlignLeft);
xpos += 5*fontWidth + 5; xpos += 5*fontWidth + 5;
myNusizM1 = new DataGridWidget(boss, font, xpos, ypos, myNusizM1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 2, Common::Base::F_16_1); 1, 1, 1, 2, Common::Base::F_16_1);
myNusizM1->setTarget(this); myNusizM1->setTarget(this);
myNusizM1->setID(kNusizM1ID); myNusizM1->setID(kNusizM1ID);
@ -422,7 +423,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// M1 reset // M1 reset
xpos += myNusizM1->getWidth() + 15; xpos += myNusizM1->getWidth() + 15;
myResMP1 = new CheckboxWidget(boss, font, xpos, ypos+1, myResMP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Reset", kCheckActionCmd); "Reset", kCheckActionCmd);
myResMP1->setTarget(this); myResMP1->setTarget(this);
myResMP1->setID(kResMP1ID); myResMP1->setID(kResMP1ID);
@ -433,10 +434,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
//////////////////////////// ////////////////////////////
// enaBL // enaBL
xpos = 10; ypos += lineHeight + 6; xpos = 10; ypos += lineHeight + 6;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 3*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 3*fontWidth, fontHeight,
"BL:", kTextAlignLeft); "BL:", kTextAlignLeft);
xpos += 3*fontWidth + 8; xpos += 3*fontWidth + 8;
myEnaBL = new CheckboxWidget(boss, font, xpos, ypos+2, myEnaBL = new CheckboxWidget(boss, lfont, xpos, ypos+2,
"Enable", kCheckActionCmd); "Enable", kCheckActionCmd);
myEnaBL->setTarget(this); myEnaBL->setTarget(this);
myEnaBL->setID(kEnaBLID); myEnaBL->setID(kEnaBLID);
@ -444,10 +445,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// posBL // posBL
xpos += myEnaBL->getWidth() + 12; xpos += myEnaBL->getWidth() + 12;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 6*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 6*fontWidth, fontHeight,
"Pos: #", kTextAlignLeft); "Pos: #", kTextAlignLeft);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosBL = new DataGridWidget(boss, font, xpos, ypos, myPosBL = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
myPosBL->setTarget(this); myPosBL->setTarget(this);
myPosBL->setID(kPosBLID); myPosBL->setID(kPosBLID);
@ -456,10 +457,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// hmBL // hmBL
xpos += myPosBL->getWidth() + 8; xpos += myPosBL->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 3*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 3*fontWidth, fontHeight,
"HM:", kTextAlignLeft); "HM:", kTextAlignLeft);
xpos += 3*fontWidth + 5; xpos += 3*fontWidth + 5;
myHMBL = new DataGridWidget(boss, font, xpos, ypos, myHMBL = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
myHMBL->setTarget(this); myHMBL->setTarget(this);
myHMBL->setID(kHMBLID); myHMBL->setID(kHMBLID);
@ -467,10 +468,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// CTRLPF (size portion) // CTRLPF (size portion)
xpos += myHMBL->getWidth() + 8; xpos += myHMBL->getWidth() + 8;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 5*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
"Size:", kTextAlignLeft); "Size:", kTextAlignLeft);
xpos += 5*fontWidth + 5; xpos += 5*fontWidth + 5;
mySizeBL = new DataGridWidget(boss, font, xpos, ypos, mySizeBL = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 2, Common::Base::F_16_1); 1, 1, 1, 2, Common::Base::F_16_1);
mySizeBL->setTarget(this); mySizeBL->setTarget(this);
mySizeBL->setID(kSizeBLID); mySizeBL->setID(kSizeBLID);
@ -478,7 +479,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// BL delay // BL delay
xpos += mySizeBL->getWidth() + 15; xpos += mySizeBL->getWidth() + 15;
myDelBL = new CheckboxWidget(boss, font, xpos, ypos+1, myDelBL = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Delay", kCheckActionCmd); "Delay", kCheckActionCmd);
myDelBL->setTarget(this); myDelBL->setTarget(this);
myDelBL->setID(kDelBLID); myDelBL->setID(kDelBLID);
@ -489,45 +490,45 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
//////////////////////////// ////////////////////////////
// PF0 // PF0
xpos = 10; ypos += lineHeight + 6; xpos = 10; ypos += lineHeight + 6;
t = new StaticTextWidget(boss, font, xpos, ypos+2, 4*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"PF:", kTextAlignLeft); "PF:", kTextAlignLeft);
xpos += 4*fontWidth; xpos += 4*fontWidth;
myPF[0] = new TogglePixelWidget(boss, font, xpos, ypos+1, 4, 1); myPF[0] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 4, 1);
myPF[0]->setTarget(this); myPF[0]->setTarget(this);
myPF[0]->setID(kPF0ID); myPF[0]->setID(kPF0ID);
addFocusWidget(myPF[0]); addFocusWidget(myPF[0]);
// PF1 // PF1
xpos += myPF[0]->getWidth() + 2; xpos += myPF[0]->getWidth() + 2;
myPF[1] = new TogglePixelWidget(boss, font, xpos, ypos+1, 8, 1); myPF[1] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
myPF[1]->setTarget(this); myPF[1]->setTarget(this);
myPF[1]->setID(kPF1ID); myPF[1]->setID(kPF1ID);
addFocusWidget(myPF[1]); addFocusWidget(myPF[1]);
// PF2 // PF2
xpos += myPF[1]->getWidth() + 2; xpos += myPF[1]->getWidth() + 2;
myPF[2] = new TogglePixelWidget(boss, font, xpos, ypos+1, 8, 1); myPF[2] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
myPF[2]->setTarget(this); myPF[2]->setTarget(this);
myPF[2]->setID(kPF2ID); myPF[2]->setID(kPF2ID);
addFocusWidget(myPF[2]); addFocusWidget(myPF[2]);
// PF reflect, score, priority // PF reflect, score, priority
xpos = 10 + 4*fontWidth; ypos += lineHeight + 6; xpos = 10 + 4*fontWidth; ypos += lineHeight + 6;
myRefPF = new CheckboxWidget(boss, font, xpos, ypos+1, myRefPF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Reflect", kCheckActionCmd); "Reflect", kCheckActionCmd);
myRefPF->setTarget(this); myRefPF->setTarget(this);
myRefPF->setID(kRefPFID); myRefPF->setID(kRefPFID);
addFocusWidget(myRefPF); addFocusWidget(myRefPF);
xpos += myRefPF->getWidth() + 15; xpos += myRefPF->getWidth() + 15;
myScorePF = new CheckboxWidget(boss, font, xpos, ypos+1, myScorePF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Score", kCheckActionCmd); "Score", kCheckActionCmd);
myScorePF->setTarget(this); myScorePF->setTarget(this);
myScorePF->setID(kScorePFID); myScorePF->setID(kScorePFID);
addFocusWidget(myScorePF); addFocusWidget(myScorePF);
xpos += myScorePF->getWidth() + 15; xpos += myScorePF->getWidth() + 15;
myPriorityPF = new CheckboxWidget(boss, font, xpos, ypos+1, myPriorityPF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Priority", kCheckActionCmd); "Priority", kCheckActionCmd);
myPriorityPF->setTarget(this); myPriorityPF->setTarget(this);
myPriorityPF->setID(kPriorityPFID); myPriorityPF->setID(kPriorityPFID);
@ -535,7 +536,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
// How to handle undriven pins // How to handle undriven pins
xpos = 10; ypos += 2*lineHeight; xpos = 10; ypos += 2*lineHeight;
myUndrivenPins = new CheckboxWidget(boss, font, xpos, ypos+1, myUndrivenPins = new CheckboxWidget(boss, lfont, xpos, ypos+1,
"Drive unused TIA pins randomly on a read/peek", kPPinCmd); "Drive unused TIA pins randomly on a read/peek", kPPinCmd);
myUndrivenPins->setTarget(this); myUndrivenPins->setTarget(this);
addFocusWidget(myUndrivenPins); addFocusWidget(myUndrivenPins);

View File

@ -35,7 +35,7 @@ class ColorWidget;
class TiaWidget : public Widget, public CommandSender class TiaWidget : public Widget, public CommandSender
{ {
public: public:
TiaWidget(GuiObject* boss, const GUI::Font& font, TiaWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
int x, int y, int w, int h); int x, int y, int w, int h);
virtual ~TiaWidget(); virtual ~TiaWidget();

View File

@ -208,8 +208,8 @@ class Cartridge : public Device
each specific cart type, since the bankswitching/inner workings each specific cart type, since the bankswitching/inner workings
of each cart type can be very different from each other. of each cart type can be very different from each other.
*/ */
virtual CartDebugWidget* debugWidget(GuiObject* boss, virtual CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) { return NULL; } const GUI::Font& nfont, int x, int y, int w, int h) { return NULL; }
protected: protected:
/** /**

View File

@ -128,10 +128,10 @@ class Cartridge0840 : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new Cartridge0840Widget(boss, font, x, y, w, h, *this); return new Cartridge0840Widget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -131,10 +131,10 @@ class Cartridge2K : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new Cartridge2KWidget(boss, font, x, y, w, h, *this); return new Cartridge2KWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -159,10 +159,10 @@ class Cartridge3E : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new Cartridge3EWidget(boss, font, x, y, w, h, *this); return new Cartridge3EWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -136,10 +136,10 @@ class Cartridge3F : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new Cartridge3FWidget(boss, font, x, y, w, h, *this); return new Cartridge3FWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -144,10 +144,10 @@ class Cartridge4A50 : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new Cartridge4A50Widget(boss, font, x, y, w, h, *this); return new Cartridge4A50Widget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -130,10 +130,10 @@ class Cartridge4K : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new Cartridge4KWidget(boss, font, x, y, w, h, *this); return new Cartridge4KWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -143,10 +143,10 @@ class CartridgeAR : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeARWidget(boss, font, x, y, w, h, *this); return new CartridgeARWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -201,10 +201,10 @@ class CartridgeCM : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeCMWidget(boss, font, x, y, w, h, *this); return new CartridgeCMWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -220,10 +220,10 @@ class CartridgeCTY : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeCTYWidget(boss, font, x, y, w, h, *this); return new CartridgeCTYWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -133,10 +133,10 @@ class CartridgeCV : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeCVWidget(boss, font, x, y, w, h, *this); return new CartridgeCVWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -142,10 +142,10 @@ class CartridgeDPC : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeDPCWidget(boss, font, x, y, w, h, *this); return new CartridgeDPCWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -145,10 +145,10 @@ class CartridgeDPCPlus : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeDPCPlusWidget(boss, font, x, y, w, h, *this); return new CartridgeDPCPlusWidget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -139,10 +139,10 @@ class CartridgeE0 : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeE0Widget(boss, font, x, y, w, h, *this); return new CartridgeE0Widget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

View File

@ -156,10 +156,10 @@ class CartridgeE7 : public Cartridge
Get debugger widget responsible for accessing the inner workings Get debugger widget responsible for accessing the inner workings
of the cart. of the cart.
*/ */
CartDebugWidget* debugWidget(GuiObject* boss, CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
const GUI::Font& font, int x, int y, int w, int h) const GUI::Font& nfont, int x, int y, int w, int h)
{ {
return new CartridgeE7Widget(boss, font, x, y, w, h, *this); return new CartridgeE7Widget(boss, lfont, nfont, x, y, w, h, *this);
} }
#endif #endif

Some files were not shown because too many files have changed in this diff Show More