mirror of https://github.com/stella-emu/stella.git
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:
parent
ecacdcf5f2
commit
963c5d621b
|
@ -24,7 +24,7 @@
|
|||
devices (paddles, trackball, etc).
|
||||
|
||||
* 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
|
||||
current font too narrow.
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.8 KiB |
|
@ -2222,8 +2222,9 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><pre>-dbg.boldfont</pre></td>
|
||||
<td>Use bold fonts in the debugger window.</td>
|
||||
<td><pre>-dbg.fontstyle <0|1|2|3></pre></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>
|
||||
|
@ -2482,7 +2483,8 @@
|
|||
<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><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>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#define STELLA_VERSION "3.9.2_pre"
|
||||
#define STELLA_VERSION "3.9.2_beta1"
|
||||
#define STELLA_BUILD atoi("$Rev$" + 6)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -156,7 +156,8 @@ class Debugger : public DialogContainer
|
|||
*/
|
||||
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; }
|
||||
PackedBitArray& breakpoints() const { return *myBreakPoints; }
|
||||
PackedBitArray& readtraps() const { return *myReadTraps; }
|
||||
|
|
|
@ -1322,7 +1322,7 @@ void DebuggerParser::executeRunTo()
|
|||
// disassembly, since this may be a time-consuming operation
|
||||
ostringstream buf;
|
||||
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);
|
||||
|
||||
bool done = false;
|
||||
|
|
|
@ -27,22 +27,23 @@
|
|||
#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)
|
||||
: Widget(boss, font, x, y, w, h),
|
||||
: Widget(boss, lfont, x, y, w, h),
|
||||
CommandSender(boss)
|
||||
{
|
||||
const int fontWidth = font.getMaxCharWidth(),
|
||||
fontHeight = font.getFontHeight(),
|
||||
lineHeight = font.getLineHeight();
|
||||
int xpos = 10, ypos = 25, lwidth = font.getStringWidth("AUDW: ");
|
||||
const int fontWidth = lfont.getMaxCharWidth(),
|
||||
fontHeight = lfont.getFontHeight(),
|
||||
lineHeight = lfont.getLineHeight();
|
||||
int xpos = 10, ypos = 25, lwidth = lfont.getStringWidth("AUDW: ");
|
||||
|
||||
// AudF registers
|
||||
new StaticTextWidget(boss, font, xpos, ypos+2,
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2,
|
||||
lwidth, fontHeight,
|
||||
"AUDF:", kTextAlignLeft);
|
||||
xpos += lwidth;
|
||||
myAudF = new DataGridWidget(boss, font, xpos, ypos,
|
||||
myAudF = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
2, 1, 2, 5, Common::Base::F_16);
|
||||
myAudF->setTarget(this);
|
||||
myAudF->setID(kAUDFID);
|
||||
|
@ -51,7 +52,7 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
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,
|
||||
Common::Base::toString(col, Common::Base::F_16_1),
|
||||
kTextAlignLeft);
|
||||
|
@ -59,10 +60,10 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// AudC registers
|
||||
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);
|
||||
xpos += lwidth;
|
||||
myAudC = new DataGridWidget(boss, font, xpos, ypos,
|
||||
myAudC = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
2, 1, 2, 4, Common::Base::F_16);
|
||||
myAudC->setTarget(this);
|
||||
myAudC->setID(kAUDCID);
|
||||
|
@ -71,10 +72,10 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// AudV registers
|
||||
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);
|
||||
xpos += lwidth;
|
||||
myAudV = new DataGridWidget(boss, font, xpos, ypos,
|
||||
myAudV = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
2, 1, 2, 4, Common::Base::F_16);
|
||||
myAudV->setTarget(this);
|
||||
myAudV->setID(kAUDVID);
|
||||
|
|
|
@ -30,7 +30,7 @@ class DataGridWidget;
|
|||
class AudioWidget : public Widget, public CommandSender
|
||||
{
|
||||
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);
|
||||
virtual ~AudioWidget();
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 2 * 4096;
|
||||
|
@ -51,9 +51,9 @@ Cartridge0840Widget::Cartridge0840Widget(
|
|||
items.push_back("0 ($800)");
|
||||
items.push_back("1 ($840)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class Cartridge0840Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
Cartridge0840& cart);
|
||||
virtual ~Cartridge0840Widget() { }
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h)
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h)
|
||||
{
|
||||
// Eventually, we should query this from the debugger/disassembler
|
||||
uInt16 size = cart.mySize;
|
||||
|
|
|
@ -26,7 +26,8 @@ class Cartridge2K;
|
|||
class Cartridge2KWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
Cartridge2K& cart);
|
||||
virtual ~Cartridge2KWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart),
|
||||
myNumRomBanks(cart.mySize >> 11),
|
||||
myNumRamBanks(32)
|
||||
|
@ -66,23 +66,23 @@ Cartridge3EWidget::Cartridge3EWidget(
|
|||
label << "Set bank ($" << Common::Base::HEX4 << start << " - $"
|
||||
<< (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);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
xpos += 40;
|
||||
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): ",
|
||||
font.getStringWidth("ROM ($3F): "), kROMBankChanged);
|
||||
_font.getStringWidth("ROM ($3F): "), kROMBankChanged);
|
||||
myROMBank->setTarget(this);
|
||||
addFocusWidget(myROMBank);
|
||||
|
||||
xpos += myROMBank->getWidth() + 20;
|
||||
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): ",
|
||||
font.getStringWidth("RAM ($3E): "), kRAMBankChanged);
|
||||
_font.getStringWidth("RAM ($3E): "), kRAMBankChanged);
|
||||
myRAMBank->setTarget(this);
|
||||
addFocusWidget(myRAMBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class Cartridge3EWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
Cartridge3E& cart);
|
||||
virtual ~Cartridge3EWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = cart.mySize;
|
||||
|
@ -52,9 +52,9 @@ Cartridge3FWidget::Cartridge3FWidget(
|
|||
label << "Set bank ($" << Common::Base::HEX4 << start << " - $" <<
|
||||
(start+0x7FF) << "): ";
|
||||
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(),
|
||||
font.getStringWidth(label.str()), kBankChanged);
|
||||
_font.getStringWidth(label.str()), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class Cartridge3FWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
Cartridge3F& cart);
|
||||
virtual ~Cartridge3FWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
string info =
|
||||
|
@ -60,9 +60,9 @@ Cartridge4A50Widget::Cartridge4A50Widget(
|
|||
string lowerlabel = "Set lower 2K region ($F000 - $F7FF): ";
|
||||
string middlelabel = "Set middle 1.5K region ($F800 - $FDFF): ";
|
||||
string highlabel = "Set high 256B region ($FE00 - $FEFF): ";
|
||||
const int lwidth = font.getStringWidth(middlelabel),
|
||||
fwidth = font.getStringWidth("Inactive"),
|
||||
flwidth = font.getStringWidth("ROM: ");
|
||||
const int lwidth = _font.getStringWidth(middlelabel),
|
||||
fwidth = _font.getStringWidth("Inactive"),
|
||||
flwidth = _font.getStringWidth("ROM: ");
|
||||
|
||||
// Lower bank/region configuration
|
||||
xpos = 10;
|
||||
|
@ -72,14 +72,14 @@ Cartridge4A50Widget::Cartridge4A50Widget(
|
|||
|
||||
xpos += 40;
|
||||
myROMLower =
|
||||
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
items32, "ROM: ", flwidth, kROMLowerChanged);
|
||||
myROMLower->setTarget(this);
|
||||
addFocusWidget(myROMLower);
|
||||
|
||||
xpos += myROMLower->getWidth() + 20;
|
||||
myRAMLower =
|
||||
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
items16, "RAM: ", flwidth, kRAMLowerChanged);
|
||||
myRAMLower->setTarget(this);
|
||||
addFocusWidget(myRAMLower);
|
||||
|
@ -92,14 +92,14 @@ Cartridge4A50Widget::Cartridge4A50Widget(
|
|||
|
||||
xpos += 40;
|
||||
myROMMiddle =
|
||||
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
items32, "ROM: ", flwidth, kROMMiddleChanged);
|
||||
myROMMiddle->setTarget(this);
|
||||
addFocusWidget(myROMMiddle);
|
||||
|
||||
xpos += myROMMiddle->getWidth() + 20;
|
||||
myRAMMiddle =
|
||||
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
items16, "RAM: ", flwidth, kRAMMiddleChanged);
|
||||
myRAMMiddle->setTarget(this);
|
||||
addFocusWidget(myRAMMiddle);
|
||||
|
@ -112,14 +112,14 @@ Cartridge4A50Widget::Cartridge4A50Widget(
|
|||
|
||||
xpos += 40;
|
||||
myROMHigh =
|
||||
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
items256, "ROM: ", flwidth, kROMHighChanged);
|
||||
myROMHigh->setTarget(this);
|
||||
addFocusWidget(myROMHigh);
|
||||
|
||||
xpos += myROMHigh->getWidth() + 20;
|
||||
myRAMHigh =
|
||||
new PopUpWidget(boss, font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight,
|
||||
items128, "RAM: ", flwidth, kRAMHighChanged);
|
||||
myRAMHigh->setTarget(this);
|
||||
addFocusWidget(myRAMHigh);
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class Cartridge4A50Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
Cartridge4A50& cart);
|
||||
virtual ~Cartridge4A50Widget() { }
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h)
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h)
|
||||
{
|
||||
// Eventually, we should query this from the debugger/disassembler
|
||||
uInt16 start = (cart.myImage[0xFFD] << 8) | cart.myImage[0xFFC];
|
||||
|
|
|
@ -26,7 +26,8 @@ class Cartridge4K;
|
|||
class Cartridge4KWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
Cartridge4K& cart);
|
||||
virtual ~Cartridge4KWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = myCart.mySize;
|
||||
|
@ -71,9 +71,9 @@ CartridgeARWidget::CartridgeARWidget(
|
|||
items.push_back(" 30");
|
||||
items.push_back(" 31");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeARWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeAR& cart);
|
||||
virtual ~CartridgeARWidget() { }
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 4 * 4096;
|
||||
|
@ -51,29 +51,29 @@ CartridgeCMWidget::CartridgeCMWidget(
|
|||
items.push_back(" 2 ");
|
||||
items.push_back(" 3 ");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
|
||||
// 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;
|
||||
new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, myFontHeight,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos+2, lwidth, myFontHeight,
|
||||
"Current SWCHA: ", kTextAlignLeft);
|
||||
xpos += lwidth;
|
||||
mySWCHA = new ToggleBitWidget(boss, font, xpos, ypos, 8, 1);
|
||||
mySWCHA = new ToggleBitWidget(boss, _nfont, xpos, ypos, 8, 1);
|
||||
mySWCHA->setTarget(this);
|
||||
mySWCHA->setEditable(false);
|
||||
|
||||
// Current column number
|
||||
xpos = 10; ypos += myLineHeight + 5;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Current column: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
|
@ -82,7 +82,7 @@ CartridgeCMWidget::CartridgeCMWidget(
|
|||
|
||||
// D6 (column part)
|
||||
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->setEditable(false);
|
||||
|
||||
|
@ -90,35 +90,35 @@ CartridgeCMWidget::CartridgeCMWidget(
|
|||
|
||||
// D5 (column part)
|
||||
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->setEditable(false);
|
||||
|
||||
// Row inputs
|
||||
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]->setEditable(false);
|
||||
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]->setEditable(false);
|
||||
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]->setEditable(false);
|
||||
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]->setEditable(false);
|
||||
|
||||
// Func and Shift keys
|
||||
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->setEditable(false);
|
||||
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->setEditable(false);
|
||||
|
||||
|
@ -126,23 +126,23 @@ CartridgeCMWidget::CartridgeCMWidget(
|
|||
xpos += myShift->getWidth() + 20; ypos = orig_ypos;
|
||||
|
||||
// D7
|
||||
myAudIn = new CheckboxWidget(boss, font, xpos, ypos, "Audio Input");
|
||||
myAudIn = new CheckboxWidget(boss, _font, xpos, ypos, "Audio Input");
|
||||
myAudIn->setTarget(this);
|
||||
myAudIn->setEditable(false);
|
||||
|
||||
// D6 (audio part)
|
||||
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->setEditable(false);
|
||||
|
||||
// Ram state (combination of several bits in SWCHA)
|
||||
ypos += myLineHeight + 8;
|
||||
lwidth = font.getStringWidth("Ram State: ");
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
lwidth = _font.getStringWidth("Ram State: ");
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Ram State: ", kTextAlignLeft);
|
||||
myRAM = new EditTextWidget(boss, font, xpos+lwidth, ypos-1,
|
||||
font.getStringWidth(" Write-only "), myLineHeight, "");
|
||||
myRAM = new EditTextWidget(boss, _nfont, xpos+lwidth, ypos-1,
|
||||
_nfont.getStringWidth(" Write-only "), myLineHeight, "");
|
||||
myRAM->setEditable(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@ class ToggleBitWidget;
|
|||
class CartridgeCMWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeCM& cart);
|
||||
virtual ~CartridgeCMWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 8 * 4096;
|
||||
|
@ -48,9 +48,9 @@ CartridgeCTYWidget::CartridgeCTYWidget(
|
|||
items.push_back("6 ($FFA)");
|
||||
items.push_back("7 ($FFB)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeCTYWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeCTY& cart);
|
||||
virtual ~CartridgeCTYWidget() { }
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h)
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h)
|
||||
{
|
||||
// Eventually, we should query this from the debugger/disassembler
|
||||
uInt16 size = 2048;
|
||||
|
|
|
@ -26,7 +26,8 @@ class CartridgeCV;
|
|||
class CartridgeCVWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeCV& cart);
|
||||
virtual ~CartridgeCVWidget() { }
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = cart.mySize;
|
||||
|
@ -62,121 +62,121 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
|
|||
items.push_back("4 ($FFA)");
|
||||
items.push_back("5 ($FFB)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
|
||||
// Top registers
|
||||
int lwidth = font.getStringWidth("Counter Registers: ");
|
||||
int lwidth = _font.getStringWidth("Counter Registers: ");
|
||||
xpos = 10; ypos += myLineHeight + 8;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Top Registers: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Bottom registers
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Bottom Registers: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Counter registers
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Counter Registers: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Fractional counter registers
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Frac Counters: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Fractional increment registers
|
||||
xpos = 10; ypos += myFracCounters->getHeight() + 8;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Frac Increments: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Special function parameters
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Function Params: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Music counters
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Counters: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Music frequencies
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Frequencies: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Music waveforms
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Waveforms: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Current random number
|
||||
lwidth = font.getStringWidth("Current random number: ");
|
||||
lwidth = _font.getStringWidth("Current random number: ");
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Current random number: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Fast fetch and immediate mode LDA flags
|
||||
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->setEditable(false);
|
||||
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->setEditable(false);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ class DataGridWidget;
|
|||
class CartridgeDPCPlusWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeDPCPlus& cart);
|
||||
virtual ~CartridgeDPCPlusWidget() { }
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = cart.mySize;
|
||||
|
@ -55,77 +55,77 @@ CartridgeDPCWidget::CartridgeDPCWidget(
|
|||
items.push_back("0 ($FF8)");
|
||||
items.push_back("1 ($FF9)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
// Data fetchers
|
||||
int lwidth = font.getStringWidth("Data Fetchers: ");
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
int lwidth = _font.getStringWidth("Data Fetchers: ");
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Data Fetchers: ", kTextAlignLeft);
|
||||
|
||||
// Top registers
|
||||
lwidth = font.getStringWidth("Counter Registers: ");
|
||||
lwidth = _font.getStringWidth("Counter Registers: ");
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Top Registers: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Bottom registers
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Bottom Registers: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Counter registers
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Counter Registers: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Flag registers
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Flag Registers: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Music mode
|
||||
xpos = 10; ypos += myLineHeight + 12;
|
||||
lwidth = font.getStringWidth("Music mode (DF5/DF6/DF7): ");
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
lwidth = _font.getStringWidth("Music mode (DF5/DF6/DF7): ");
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music mode (DF5/DF6/DF7): ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
|
||||
// Current random number
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth,
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Current random number: ", kTextAlignLeft);
|
||||
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->setEditable(false);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ class DataGridWidget;
|
|||
class CartridgeDPCWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeDPC& cart);
|
||||
virtual ~CartridgeDPCWidget() { }
|
||||
|
|
|
@ -36,13 +36,15 @@ class ButtonWidget;
|
|||
class CartDebugWidget : public Widget, public CommandSender
|
||||
{
|
||||
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)
|
||||
: Widget(boss, font, x, y, w, h),
|
||||
: Widget(boss, lfont, x, y, w, h),
|
||||
CommandSender(boss),
|
||||
myFontWidth(font.getMaxCharWidth()),
|
||||
myFontHeight(font.getFontHeight()),
|
||||
myLineHeight(font.getLineHeight()),
|
||||
_nfont(nfont),
|
||||
myFontWidth(lfont.getMaxCharWidth()),
|
||||
myFontHeight(lfont.getFontHeight()),
|
||||
myLineHeight(lfont.getLineHeight()),
|
||||
myButtonHeight(myLineHeight + 4) { }
|
||||
|
||||
virtual ~CartDebugWidget() { };
|
||||
|
@ -65,14 +67,14 @@ class CartDebugWidget : public Widget, public CommandSender
|
|||
if(bytes >= 1024)
|
||||
buf << " / " << (bytes/1024) << "KB";
|
||||
|
||||
w = new EditTextWidget(_boss, _font, x+lwidth, y,
|
||||
w = new EditTextWidget(_boss, _nfont, x+lwidth, y,
|
||||
fwidth, myLineHeight, buf.str());
|
||||
w->setEditable(false);
|
||||
y += myLineHeight + 4;
|
||||
|
||||
new StaticTextWidget(_boss, _font, x, y, lwidth,
|
||||
myFontHeight, "Manufacturer: ", kTextAlignLeft);
|
||||
w = new EditTextWidget(_boss, _font, x+lwidth, y,
|
||||
w = new EditTextWidget(_boss, _nfont, x+lwidth, y,
|
||||
fwidth, myLineHeight, manufacturer);
|
||||
w->setEditable(false);
|
||||
y += myLineHeight + 4;
|
||||
|
@ -85,7 +87,7 @@ class CartDebugWidget : public Widget, public CommandSender
|
|||
|
||||
new StaticTextWidget(_boss, _font, x, y, lwidth,
|
||||
myFontHeight, "Description: ", kTextAlignLeft);
|
||||
myDesc = new StringListWidget(_boss, _font, x+lwidth, y,
|
||||
myDesc = new StringListWidget(_boss, _nfont, x+lwidth, y,
|
||||
fwidth, lines * myLineHeight, false);
|
||||
myDesc->setEditable(false);
|
||||
myDesc->setList(sl);
|
||||
|
@ -112,6 +114,9 @@ class CartDebugWidget : public Widget, public CommandSender
|
|||
virtual string bankState() { return "0 (non-bankswitched)"; }
|
||||
|
||||
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;
|
||||
// we may as well make them protected variables
|
||||
int myFontWidth, myFontHeight, myLineHeight, myButtonHeight;
|
||||
|
|
|
@ -36,9 +36,9 @@ static const char* seg2[] = {
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = 8 * 1024;
|
||||
|
@ -72,9 +72,9 @@ CartridgeE0Widget::CartridgeE0Widget(
|
|||
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 =
|
||||
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: ",
|
||||
lwidth, kSlice0Changed);
|
||||
mySlice0->setTarget(this);
|
||||
|
@ -82,7 +82,7 @@ CartridgeE0Widget::CartridgeE0Widget(
|
|||
ypos += mySlice0->getHeight() + 4;
|
||||
|
||||
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: ",
|
||||
lwidth, kSlice1Changed);
|
||||
mySlice1->setTarget(this);
|
||||
|
@ -90,7 +90,7 @@ CartridgeE0Widget::CartridgeE0Widget(
|
|||
ypos += mySlice1->getHeight() + 4;
|
||||
|
||||
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: ",
|
||||
lwidth, kSlice2Changed);
|
||||
mySlice2->setTarget(this);
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeE0Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeE0& cart);
|
||||
virtual ~CartridgeE0Widget() { }
|
||||
|
|
|
@ -31,9 +31,9 @@ static const char* spot_upper[] = {
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = 8 * 2048;
|
||||
|
@ -67,17 +67,17 @@ CartridgeE7Widget::CartridgeE7Widget(
|
|||
for(int i = 0; i < 4; ++i)
|
||||
items1.push_back(spot_upper[i]);
|
||||
|
||||
const int lwidth = font.getStringWidth("Set slice for upper 256B: "),
|
||||
fwidth = font.getStringWidth("3 - RAM ($FEB)");
|
||||
const int lwidth = _font.getStringWidth("Set slice for upper 256B: "),
|
||||
fwidth = _font.getStringWidth("3 - RAM ($FEB)");
|
||||
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);
|
||||
myLower2K->setTarget(this);
|
||||
addFocusWidget(myLower2K);
|
||||
ypos += myLower2K->getHeight() + 4;
|
||||
|
||||
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);
|
||||
myUpper256B->setTarget(this);
|
||||
addFocusWidget(myUpper256B);
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeE7Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeE7& cart);
|
||||
virtual ~CartridgeE7Widget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = 16 * 4096;
|
||||
|
@ -67,9 +67,9 @@ CartridgeEFSCWidget::CartridgeEFSCWidget(
|
|||
items.push_back("14 ($FEE)");
|
||||
items.push_back("15 ($FEF)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeEFSCWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeEFSC& cart);
|
||||
virtual ~CartridgeEFSCWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = 16 * 4096;
|
||||
|
@ -65,9 +65,9 @@ CartridgeEFWidget::CartridgeEFWidget(
|
|||
items.push_back("14 ($FEE)");
|
||||
items.push_back("15 ($FEF)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeEFWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeEF& cart);
|
||||
virtual ~CartridgeEFWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = 16 * 4096;
|
||||
|
@ -66,9 +66,9 @@ CartridgeF0Widget::CartridgeF0Widget(
|
|||
items.push_back(" 14");
|
||||
items.push_back(" 15");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeF0Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeF0& cart);
|
||||
virtual ~CartridgeF0Widget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 8 * 4096;
|
||||
|
@ -58,9 +58,9 @@ CartridgeF4SCWidget::CartridgeF4SCWidget(
|
|||
items.push_back("6 ($FFA)");
|
||||
items.push_back("7 ($FFB)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeF4SCWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeF4SC& cart);
|
||||
virtual ~CartridgeF4SCWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 8 * 4096;
|
||||
|
@ -56,9 +56,9 @@ CartridgeF4Widget::CartridgeF4Widget(
|
|||
items.push_back("6 ($FFA)");
|
||||
items.push_back("7 ($FFB)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeF4Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeF4& cart);
|
||||
virtual ~CartridgeF4Widget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 4 * 4096;
|
||||
|
@ -54,9 +54,9 @@ CartridgeF6SCWidget::CartridgeF6SCWidget(
|
|||
items.push_back("2 ($FF8)");
|
||||
items.push_back("3 ($FF9)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeF6SCWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeF6SC& cart);
|
||||
virtual ~CartridgeF6SCWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 4 * 4096;
|
||||
|
@ -52,9 +52,9 @@ CartridgeF6Widget::CartridgeF6Widget(
|
|||
items.push_back("2 ($FF8)");
|
||||
items.push_back("3 ($FF9)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeF6Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeF6& cart);
|
||||
virtual ~CartridgeF6Widget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 8192;
|
||||
|
@ -52,9 +52,9 @@ CartridgeF8SCWidget::CartridgeF8SCWidget(
|
|||
items.push_back("0 ($FF8)");
|
||||
items.push_back("1 ($FF9)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeF8SCWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeF8SC& cart);
|
||||
virtual ~CartridgeF8SCWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 2 * 4096;
|
||||
|
@ -50,9 +50,9 @@ CartridgeF8Widget::CartridgeF8Widget(
|
|||
items.push_back("0 ($FF8)");
|
||||
items.push_back("1 ($FF9)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeF8Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeF8& cart);
|
||||
virtual ~CartridgeF8Widget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = cart.mySize;
|
||||
|
@ -62,36 +62,36 @@ CartridgeFA2Widget::CartridgeFA2Widget(
|
|||
items.push_back("6 ($FFB)");
|
||||
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
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,
|
||||
font.getStringWidth("Harmony Flash: "),
|
||||
StaticTextWidget* t = new StaticTextWidget(boss, _font, xpos, ypos,
|
||||
_font.getStringWidth("Harmony Flash: "),
|
||||
myFontHeight, "Harmony Flash: ", kTextAlignLeft);
|
||||
|
||||
xpos += t->getWidth() + 4;
|
||||
myFlashErase =
|
||||
new ButtonWidget(boss, font, xpos, ypos-4, bwidth, myButtonHeight,
|
||||
new ButtonWidget(boss, _font, xpos, ypos-4, bwidth, myButtonHeight,
|
||||
"Erase", kFlashErase);
|
||||
myFlashErase->setTarget(this);
|
||||
addFocusWidget(myFlashErase);
|
||||
xpos += myFlashErase->getWidth() + 8;
|
||||
|
||||
myFlashLoad =
|
||||
new ButtonWidget(boss, font, xpos, ypos-4, bwidth, myButtonHeight,
|
||||
new ButtonWidget(boss, _font, xpos, ypos-4, bwidth, myButtonHeight,
|
||||
"Load", kFlashLoad);
|
||||
myFlashLoad->setTarget(this);
|
||||
addFocusWidget(myFlashLoad);
|
||||
xpos += myFlashLoad->getWidth() + 8;
|
||||
|
||||
myFlashSave =
|
||||
new ButtonWidget(boss, font, xpos, ypos-4, bwidth, myButtonHeight,
|
||||
new ButtonWidget(boss, _font, xpos, ypos-4, bwidth, myButtonHeight,
|
||||
"Save", kFlashSave);
|
||||
myFlashSave->setTarget(this);
|
||||
addFocusWidget(myFlashSave);
|
||||
|
|
|
@ -29,7 +29,8 @@ class PopUpWidget;
|
|||
class CartridgeFA2Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeFA2& cart);
|
||||
virtual ~CartridgeFA2Widget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 3 * 4096;
|
||||
|
@ -53,9 +53,9 @@ CartridgeFAWidget::CartridgeFAWidget(
|
|||
items.push_back("1 ($FF9)");
|
||||
items.push_back("2 ($FFA)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeFAWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeFA& cart);
|
||||
virtual ~CartridgeFAWidget() { }
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
string info =
|
||||
|
|
|
@ -26,7 +26,8 @@ class CartridgeFE;
|
|||
class CartridgeFEWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeFE& cart);
|
||||
virtual ~CartridgeFEWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
#define ROM_BLOCKS
|
||||
|
@ -60,11 +60,11 @@ CartridgeMCWidget::CartridgeMCWidget(
|
|||
items.push_back(b + " (RAM)", b);
|
||||
}
|
||||
|
||||
const int lwidth = font.getStringWidth("Set slice for segment X ($3X): "),
|
||||
fwidth = font.getStringWidth("255 (ROM)");
|
||||
const int lwidth = _font.getStringWidth("Set slice for segment X ($3X): "),
|
||||
fwidth = _font.getStringWidth("255 (ROM)");
|
||||
|
||||
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): ",
|
||||
lwidth, kSlice0Changed);
|
||||
mySlice0->setTarget(this);
|
||||
|
@ -72,7 +72,7 @@ CartridgeMCWidget::CartridgeMCWidget(
|
|||
ypos += mySlice0->getHeight() + 4;
|
||||
|
||||
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): ",
|
||||
lwidth, kSlice1Changed);
|
||||
mySlice1->setTarget(this);
|
||||
|
@ -80,7 +80,7 @@ CartridgeMCWidget::CartridgeMCWidget(
|
|||
ypos += mySlice1->getHeight() + 4;
|
||||
|
||||
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): ",
|
||||
lwidth, kSlice2Changed);
|
||||
mySlice2->setTarget(this);
|
||||
|
@ -88,7 +88,7 @@ CartridgeMCWidget::CartridgeMCWidget(
|
|||
ypos += mySlice2->getHeight() + 4;
|
||||
|
||||
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): ",
|
||||
lwidth, kSlice3Changed);
|
||||
mySlice3->setTarget(this);
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeMCWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeMC& cart);
|
||||
virtual ~CartridgeMCWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = myCart.mySize;
|
||||
|
@ -57,9 +57,9 @@ CartridgeSBWidget::CartridgeSBWidget(
|
|||
ypos = addBaseInformation(size, "Fred X. Quimby", info.str()) + myLineHeight;
|
||||
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeSBWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeSB& cart);
|
||||
virtual ~CartridgeSBWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt16 size = 2 * 4096;
|
||||
|
@ -51,9 +51,9 @@ CartridgeUAWidget::CartridgeUAWidget(
|
|||
items.push_back("0 ($220)");
|
||||
items.push_back("1 ($240)");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeUAWidget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeUA& cart);
|
||||
virtual ~CartridgeUAWidget() { }
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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)
|
||||
: CartDebugWidget(boss, font, x, y, w, h),
|
||||
: CartDebugWidget(boss, lfont, nfont, x, y, w, h),
|
||||
myCart(cart)
|
||||
{
|
||||
uInt32 size = 16 * 4096;
|
||||
|
@ -67,9 +67,9 @@ CartridgeX07Widget::CartridgeX07Widget(
|
|||
items.push_back(" 14");
|
||||
items.push_back(" 15");
|
||||
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: ",
|
||||
font.getStringWidth("Set bank: "), kBankChanged);
|
||||
_font.getStringWidth("Set bank: "), kBankChanged);
|
||||
myBank->setTarget(this);
|
||||
addFocusWidget(myBank);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ class PopUpWidget;
|
|||
class CartridgeX07Widget : public CartDebugWidget
|
||||
{
|
||||
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,
|
||||
CartridgeX07& cart);
|
||||
virtual ~CartridgeX07Widget() { }
|
||||
|
|
|
@ -32,35 +32,36 @@
|
|||
#include "CpuWidget.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int max_w)
|
||||
: Widget(boss, font, x, y, 16, 16),
|
||||
CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
|
||||
int x, int y, int max_w)
|
||||
: Widget(boss, lfont, x, y, 16, 16),
|
||||
CommandSender(boss)
|
||||
{
|
||||
const int fontWidth = font.getMaxCharWidth(),
|
||||
fontHeight = font.getFontHeight(),
|
||||
lineHeight = font.getLineHeight();
|
||||
const int fontWidth = lfont.getMaxCharWidth(),
|
||||
fontHeight = lfont.getFontHeight(),
|
||||
lineHeight = lfont.getLineHeight();
|
||||
int xpos, ypos, lwidth;
|
||||
|
||||
// Create a 1x1 grid with label for the PC register
|
||||
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);
|
||||
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->setID(kPCRegID);
|
||||
addFocusWidget(myPCGrid);
|
||||
|
||||
// Create a read-only textbox containing the current PC label
|
||||
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, "");
|
||||
myPCLabel->setEditable(false);
|
||||
|
||||
// Create a 1x4 grid with labels for the other CPU registers
|
||||
xpos = x + lwidth; ypos += myPCGrid->getHeight() + 1;
|
||||
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->setID(kCpuRegID);
|
||||
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
|
||||
xpos = x + lwidth + myPCGrid->getWidth() + 10;
|
||||
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);
|
||||
xpos += myCpuGridDecValue->getWidth() + 5;
|
||||
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);
|
||||
|
||||
// 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;
|
||||
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, "");
|
||||
myCpuDataSrc[i]->setEditable(false);
|
||||
src_y += fontHeight+2;
|
||||
}
|
||||
int swidth = font.getStringWidth("Source Address");
|
||||
new StaticTextWidget(boss, font, xpos, src_y + 4, src_w,
|
||||
int swidth = lfont.getStringWidth("Source Address");
|
||||
new StaticTextWidget(boss, lfont, xpos, src_y + 4, src_w,
|
||||
fontHeight, swidth <= src_w ? "Source Address" : "Source Addr",
|
||||
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:" };
|
||||
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,
|
||||
labels[row], kTextAlignLeft);
|
||||
}
|
||||
|
||||
// Create a bitfield widget for changing the processor status
|
||||
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);
|
||||
myPSRegister = new ToggleBitWidget(boss, font, xpos+lwidth, ypos, 8, 1);
|
||||
myPSRegister = new ToggleBitWidget(boss, nfont, xpos+lwidth, ypos, 8, 1);
|
||||
myPSRegister->setTarget(this);
|
||||
addFocusWidget(myPSRegister);
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@ class ToggleBitWidget;
|
|||
class CpuWidget : public Widget, public CommandSender
|
||||
{
|
||||
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();
|
||||
|
||||
void setOpsWidget(DataGridOpsWidget* w);
|
||||
|
|
|
@ -49,7 +49,8 @@ DebuggerDialog::DebuggerDialog(OSystem* osystem, DialogContainer* parent,
|
|||
: Dialog(osystem, parent, x, y, w, h, true), // use base surface
|
||||
myTab(NULL),
|
||||
myRomTab(NULL),
|
||||
myFont(NULL),
|
||||
myLFont(NULL),
|
||||
myNFont(NULL),
|
||||
myFatalError(NULL)
|
||||
{
|
||||
createFont(); // Font is sized according to available space
|
||||
|
@ -66,7 +67,8 @@ DebuggerDialog::DebuggerDialog(OSystem* osystem, DialogContainer* parent,
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
DebuggerDialog::~DebuggerDialog()
|
||||
{
|
||||
delete myFont;
|
||||
delete myLFont;
|
||||
delete myNFont;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -205,15 +207,61 @@ void DebuggerDialog::doExitRom()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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
|
||||
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)
|
||||
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
|
||||
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;
|
||||
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");
|
||||
myFatalError->show();
|
||||
}
|
||||
|
@ -230,9 +278,8 @@ void DebuggerDialog::showFatalMessage(const string& msg)
|
|||
void DebuggerDialog::addTiaArea()
|
||||
{
|
||||
const GUI::Rect& r = getTiaBounds();
|
||||
|
||||
myTiaOutput = new TiaOutputWidget(this, *myFont,
|
||||
r.left, r.top, r.width(), r.height());
|
||||
myTiaOutput =
|
||||
new TiaOutputWidget(this, *myNFont, r.left, r.top, r.width(), r.height());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -244,7 +291,7 @@ void DebuggerDialog::addTabArea()
|
|||
// The tab widget
|
||||
// Since there are two tab widgets in this dialog, we specifically
|
||||
// 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);
|
||||
myTab->setID(0);
|
||||
addTabWidget(myTab);
|
||||
|
@ -255,28 +302,28 @@ void DebuggerDialog::addTabArea()
|
|||
|
||||
// The Prompt/console tab
|
||||
tabID = myTab->addTab(" Prompt ");
|
||||
myPrompt = new PromptWidget(myTab, *myFont,
|
||||
myPrompt = new PromptWidget(myTab, *myNFont,
|
||||
2, 2, widWidth, widHeight);
|
||||
myTab->setParentWidget(tabID, myPrompt);
|
||||
addToFocusList(myPrompt->getFocusList(), myTab, tabID);
|
||||
|
||||
// The TIA tab
|
||||
tabID = myTab->addTab("TIA");
|
||||
TiaWidget* tia = new TiaWidget(myTab, *myFont,
|
||||
TiaWidget* tia = new TiaWidget(myTab, *myLFont, *myNFont,
|
||||
2, 2, widWidth, widHeight);
|
||||
myTab->setParentWidget(tabID, tia);
|
||||
addToFocusList(tia->getFocusList(), myTab, tabID);
|
||||
|
||||
// The input/output tab (includes RIOT and INPTx from TIA)
|
||||
tabID = myTab->addTab("I/O");
|
||||
RiotWidget* riot = new RiotWidget(myTab, *myFont,
|
||||
RiotWidget* riot = new RiotWidget(myTab, *myLFont, *myNFont,
|
||||
2, 2, widWidth, widHeight);
|
||||
myTab->setParentWidget(tabID, riot);
|
||||
addToFocusList(riot->getFocusList(), myTab, tabID);
|
||||
|
||||
// The Audio tab
|
||||
tabID = myTab->addTab("Audio");
|
||||
AudioWidget* aud = new AudioWidget(myTab, *myFont,
|
||||
AudioWidget* aud = new AudioWidget(myTab, *myLFont, *myNFont,
|
||||
2, 2, widWidth, widHeight);
|
||||
myTab->setParentWidget(tabID, aud);
|
||||
addToFocusList(aud->getFocusList(), myTab, tabID);
|
||||
|
@ -287,23 +334,22 @@ void DebuggerDialog::addTabArea()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DebuggerDialog::addStatusArea()
|
||||
{
|
||||
const GUI::Font& font = *myFont;
|
||||
const int lineHeight = font.getLineHeight();
|
||||
const int lineHeight = myLFont->getLineHeight();
|
||||
const GUI::Rect& r = getStatusBounds();
|
||||
int xpos, ypos;
|
||||
|
||||
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;
|
||||
myTiaZoom = new TiaZoomWidget(this, *myFont, xpos+10, ypos,
|
||||
myTiaZoom = new TiaZoomWidget(this, *myNFont, xpos+10, ypos,
|
||||
r.width()-10, r.height()-lineHeight-ypos-10);
|
||||
addToFocusList(myTiaZoom->getFocusList());
|
||||
|
||||
xpos += 10; ypos += myTiaZoom->getHeight() + 10;
|
||||
myMessageBox = new EditTextWidget(this, *myFont,
|
||||
myMessageBox = new EditTextWidget(this, *myLFont,
|
||||
xpos, ypos, myTiaZoom->getWidth(),
|
||||
font.getLineHeight(), "");
|
||||
myLFont->getLineHeight(), "");
|
||||
myMessageBox->setEditable(false);
|
||||
myMessageBox->clearFlags(WIDGET_RETAIN_FOCUS);
|
||||
myMessageBox->setTextColor(kTextColorEm);
|
||||
|
@ -315,43 +361,43 @@ void DebuggerDialog::addRomArea()
|
|||
const GUI::Rect& r = getRomBounds();
|
||||
const int vBorder = 4;
|
||||
|
||||
int bwidth = myFont->getStringWidth("Frame +1 "),
|
||||
bheight = myFont->getLineHeight() + 2;
|
||||
int bwidth = myLFont->getStringWidth("Frame +1 "),
|
||||
bheight = myLFont->getLineHeight() + 2;
|
||||
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);
|
||||
buttonY += bheight + 4;
|
||||
new ButtonWidget(this, *myFont, buttonX, buttonY,
|
||||
new ButtonWidget(this, *myLFont, buttonX, buttonY,
|
||||
bwidth, bheight, "Trace", kDDTraceCmd);
|
||||
buttonY += bheight + 4;
|
||||
new ButtonWidget(this, *myFont, buttonX, buttonY,
|
||||
new ButtonWidget(this, *myLFont, buttonX, buttonY,
|
||||
bwidth, bheight, "Scan +1", kDDSAdvCmd);
|
||||
buttonY += bheight + 4;
|
||||
new ButtonWidget(this, *myFont, buttonX, buttonY,
|
||||
new ButtonWidget(this, *myLFont, buttonX, buttonY,
|
||||
bwidth, bheight, "Frame +1", kDDAdvCmd);
|
||||
buttonY += bheight + 4;
|
||||
new ButtonWidget(this, *myFont, buttonX, buttonY,
|
||||
new ButtonWidget(this, *myLFont, buttonX, buttonY,
|
||||
bwidth, bheight, "Exit", kDDExitCmd);
|
||||
|
||||
bwidth = myFont->getStringWidth("< ") + 4;
|
||||
bwidth = myLFont->getStringWidth("< ") + 4;
|
||||
bheight = bheight * 5 + 4*4;
|
||||
buttonX -= (bwidth + 5);
|
||||
buttonY = r.top + 5;
|
||||
myRewindButton =
|
||||
new ButtonWidget(this, *myFont, buttonX, buttonY,
|
||||
new ButtonWidget(this, *myLFont, buttonX, buttonY,
|
||||
bwidth, bheight, "<", kDDRewindCmd);
|
||||
myRewindButton->clearFlags(WIDGET_ENABLED);
|
||||
|
||||
int xpos = buttonX - 8*myFont->getMaxCharWidth() - 20, ypos = 20;
|
||||
DataGridOpsWidget* ops = new DataGridOpsWidget(this, *myFont, xpos, ypos);
|
||||
int xpos = buttonX - 8*myLFont->getMaxCharWidth() - 20, ypos = 20;
|
||||
DataGridOpsWidget* ops = new DataGridOpsWidget(this, *myLFont, xpos, ypos);
|
||||
|
||||
int max_w = xpos - r.left - 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());
|
||||
|
||||
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());
|
||||
|
||||
// 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
|
||||
// assign an ID of 1
|
||||
myRomTab = new TabWidget(
|
||||
this, *myFont, xpos, ypos, tabWidth, tabHeight);
|
||||
this, *myLFont, xpos, ypos, tabWidth, tabHeight);
|
||||
myRomTab->setID(1);
|
||||
addTabWidget(myRomTab);
|
||||
|
||||
// The main disassembly tab
|
||||
tabID = myRomTab->addTab(" Disassembly ");
|
||||
myRom = new RomWidget(myRomTab, *myFont,
|
||||
2, 2, tabWidth - 1,
|
||||
myRom = new RomWidget(myRomTab, *myLFont, *myNFont, 2, 2, tabWidth - 1,
|
||||
tabHeight - myRomTab->getTabHeight() - 2);
|
||||
myRomTab->setParentWidget(tabID, myRom);
|
||||
addToFocusList(myRom->getFocusList(), myRomTab, tabID);
|
||||
|
@ -385,7 +430,7 @@ void DebuggerDialog::addRomArea()
|
|||
// The 'cart-specific' information tab
|
||||
tabID = myRomTab->addTab(instance().console().cartridge().name());
|
||||
myCartDebug = instance().console().cartridge().debugWidget(
|
||||
myRomTab, *myFont, 2, 2, tabWidth - 1,
|
||||
myRomTab, *myLFont, *myNFont, 2, 2, tabWidth - 1,
|
||||
tabHeight - myRomTab->getTabHeight() - 2);
|
||||
if(myCartDebug) // TODO - make this always non-null
|
||||
{
|
||||
|
|
|
@ -52,7 +52,8 @@ class DebuggerDialog : public Dialog
|
|||
int x, int y, int w, int h);
|
||||
~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; }
|
||||
TiaInfoWidget& tiaInfo() const { return *myTiaInfo; }
|
||||
TiaOutputWidget& tiaOutput() const { return *myTiaOutput; }
|
||||
|
@ -101,7 +102,8 @@ class DebuggerDialog : public Dialog
|
|||
|
||||
TabWidget *myTab, *myRomTab;
|
||||
|
||||
GUI::Font* myFont;
|
||||
GUI::Font* myLFont; // used for labels
|
||||
GUI::Font* myNFont; // used for normal text
|
||||
PromptWidget* myPrompt;
|
||||
TiaInfoWidget* myTiaInfo;
|
||||
TiaOutputWidget* myTiaOutput;
|
||||
|
|
|
@ -31,51 +31,52 @@
|
|||
#include "RamWidget.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
|
||||
: Widget(boss, font, x, y, 16, 16),
|
||||
RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
|
||||
int x, int y)
|
||||
: Widget(boss, lfont, x, y, 16, 16),
|
||||
CommandSender(boss),
|
||||
myUndoAddress(-1),
|
||||
myUndoValue(-1),
|
||||
myCurrentRamBank(0)
|
||||
{
|
||||
const int fontWidth = font.getMaxCharWidth(),
|
||||
fontHeight = font.getFontHeight(),
|
||||
lineHeight = font.getLineHeight(),
|
||||
bwidth = font.getStringWidth("Compare "),
|
||||
const int fontWidth = lfont.getMaxCharWidth(),
|
||||
fontHeight = lfont.getFontHeight(),
|
||||
lineHeight = lfont.getLineHeight(),
|
||||
bwidth = lfont.getStringWidth("Compare "),
|
||||
bheight = lineHeight + 2;
|
||||
int xpos, ypos, lwidth;
|
||||
|
||||
// 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
|
||||
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);
|
||||
myRamGrid->setTarget(this);
|
||||
addFocusWidget(myRamGrid);
|
||||
|
||||
// Create actions buttons to the left of the RAM grid
|
||||
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);
|
||||
myUndoButton->setTarget(this);
|
||||
|
||||
ypos += bheight + 4;
|
||||
myRevertButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight,
|
||||
myRevertButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
|
||||
"Revert", kRevertCmd);
|
||||
myRevertButton->setTarget(this);
|
||||
|
||||
ypos += 2 * bheight + 2;
|
||||
mySearchButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight,
|
||||
mySearchButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
|
||||
"Search", kSearchCmd);
|
||||
mySearchButton->setTarget(this);
|
||||
|
||||
ypos += bheight + 4;
|
||||
myCompareButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight,
|
||||
myCompareButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
|
||||
"Compare", kCmpCmd);
|
||||
myCompareButton->setTarget(this);
|
||||
|
||||
ypos += bheight + 4;
|
||||
myRestartButton = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight,
|
||||
myRestartButton = new ButtonWidget(boss, lfont, xpos, ypos, bwidth, bheight,
|
||||
"Reset", kRestartCmd);
|
||||
myRestartButton->setTarget(this);
|
||||
|
||||
|
@ -85,13 +86,13 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
|
|||
// Labels for RAM grid
|
||||
xpos = x; ypos = y + lineHeight;
|
||||
myRamStart =
|
||||
new StaticTextWidget(boss, font, xpos, ypos - lineHeight,
|
||||
font.getStringWidth("xxxx"), fontHeight,
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos - lineHeight,
|
||||
lfont.getStringWidth("xxxx"), fontHeight,
|
||||
"00xx", kTextAlignLeft);
|
||||
|
||||
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,
|
||||
fontWidth, fontHeight,
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
// one resizes as much as possible
|
||||
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);
|
||||
myBinValue = new EditTextWidget(boss, font, xpos + 4*fontWidth + 5,
|
||||
myBinValue = new EditTextWidget(boss, nfont, xpos + 4*fontWidth + 5,
|
||||
ypos-2, 9*fontWidth, lineHeight, "");
|
||||
myBinValue->setEditable(false);
|
||||
|
||||
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);
|
||||
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, "");
|
||||
myDecValue->setEditable(false);
|
||||
|
||||
xpos_r = xpos - 20;
|
||||
xpos = x + 10;
|
||||
new StaticTextWidget(boss, font, xpos, ypos,
|
||||
6*fontWidth, fontHeight,
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos, 6*fontWidth, fontHeight,
|
||||
"Label:", kTextAlignLeft);
|
||||
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, "");
|
||||
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
|
||||
StringList labels;
|
||||
labels.push_back("Search: ");
|
||||
myInputBox = new InputTextDialog(boss, font, labels);
|
||||
myInputBox = new InputTextDialog(boss, lfont, nfont, labels);
|
||||
myInputBox->setTarget(this);
|
||||
|
||||
// Start with these buttons disabled
|
||||
|
|
|
@ -34,7 +34,8 @@ class StaticTextWidget;
|
|||
class RamWidget : public Widget, public CommandSender
|
||||
{
|
||||
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();
|
||||
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
#include "RiotWidget.hxx"
|
||||
|
||||
#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); \
|
||||
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->setID(bitsID); \
|
||||
if(editable) addFocusWidget(bits); else bits->setEditable(false); \
|
||||
|
@ -50,14 +50,15 @@
|
|||
bits->setList(off, on);
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
||||
RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
const GUI::Font& nfont,
|
||||
int x, int y, int w, int h)
|
||||
: Widget(boss, font, x, y, w, h),
|
||||
: Widget(boss, lfont, x, y, w, h),
|
||||
CommandSender(boss)
|
||||
{
|
||||
const int fontWidth = font.getMaxCharWidth(),
|
||||
fontHeight = font.getFontHeight(),
|
||||
lineHeight = font.getLineHeight();
|
||||
const int fontWidth = lfont.getMaxCharWidth(),
|
||||
fontHeight = lfont.getFontHeight(),
|
||||
lineHeight = lfont.getLineHeight();
|
||||
int xpos = 10, ypos = 25, lwidth = 9 * fontWidth, col = 0;
|
||||
StaticTextWidget* t;
|
||||
VariantList items;
|
||||
|
@ -100,11 +101,11 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
|||
xpos = 10; ypos += 2*lineHeight;
|
||||
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);
|
||||
}
|
||||
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->setID(kTimWriteID);
|
||||
addFocusWidget(myTimWrite);
|
||||
|
@ -114,21 +115,21 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
|||
xpos = 10; ypos += myTimWrite->getHeight() + lineHeight;
|
||||
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);
|
||||
}
|
||||
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->setEditable(false);
|
||||
|
||||
// Controller ports
|
||||
const RiotDebug& riot = instance().debugger().riotDebug();
|
||||
xpos = col; ypos = 10;
|
||||
myLeftControl = addControlWidget(boss, font, xpos, ypos,
|
||||
myLeftControl = addControlWidget(boss, lfont, xpos, ypos,
|
||||
riot.controller(Controller::Left));
|
||||
xpos += myLeftControl->getWidth() + 15;
|
||||
myRightControl = addControlWidget(boss, font, xpos, ypos,
|
||||
myRightControl = addControlWidget(boss, lfont, xpos, ypos,
|
||||
riot.controller(Controller::Right));
|
||||
|
||||
// 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;
|
||||
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);
|
||||
}
|
||||
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->setEditable(false);
|
||||
|
||||
|
@ -149,38 +150,38 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
|||
xpos = col + myLeftControl->getWidth() + 15;
|
||||
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);
|
||||
}
|
||||
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->setEditable(false);
|
||||
|
||||
// TIA INPTx VBLANK bits (D6-latch, D7-dump) (R)
|
||||
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->setEditable(false);
|
||||
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->setEditable(false);
|
||||
|
||||
// PO & P1 difficulty switches
|
||||
int pwidth = font.getStringWidth("B/easy");
|
||||
lwidth = font.getStringWidth("P0 Diff: ");
|
||||
int pwidth = lfont.getStringWidth("B/easy");
|
||||
lwidth = lfont.getStringWidth("P0 Diff: ");
|
||||
xpos = col; ypos += 2 * lineHeight;
|
||||
int col2_ypos = ypos;
|
||||
items.clear();
|
||||
items.push_back("B/easy", "b");
|
||||
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);
|
||||
myP0Diff->setTarget(this);
|
||||
addFocusWidget(myP0Diff);
|
||||
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);
|
||||
myP1Diff->setTarget(this);
|
||||
addFocusWidget(myP1Diff);
|
||||
|
@ -190,20 +191,20 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
|||
items.clear();
|
||||
items.push_back("B&W", "bw");
|
||||
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);
|
||||
myTVType->setTarget(this);
|
||||
addFocusWidget(myTVType);
|
||||
|
||||
// Select and Reset
|
||||
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);
|
||||
mySelect->setID(kSelectID);
|
||||
mySelect->setTarget(this);
|
||||
addFocusWidget(mySelect);
|
||||
ypos += mySelect->getHeight() + 5;
|
||||
myReset = new CheckboxWidget(boss, font, xpos, ypos, "Reset",
|
||||
myReset = new CheckboxWidget(boss, lfont, xpos, ypos, "Reset",
|
||||
kCheckActionCmd);
|
||||
myReset->setID(kResetID);
|
||||
myReset->setTarget(this);
|
||||
|
@ -211,13 +212,13 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// Randomize items
|
||||
xpos = 10; ypos += 3*lineHeight;
|
||||
new StaticTextWidget(boss, font, xpos, ypos,
|
||||
font.getStringWidth("When loading a ROM:"), fontHeight,
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos,
|
||||
lfont.getStringWidth("When loading a ROM:"), fontHeight,
|
||||
"When loading a ROM:", kTextAlignLeft);
|
||||
|
||||
// Randomize CPU
|
||||
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);
|
||||
myRandomizeCPU->setID(kRandCPUID);
|
||||
myRandomizeCPU->setTarget(this);
|
||||
|
@ -225,7 +226,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// Randomize RAM
|
||||
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);
|
||||
myRandomizeRAM->setID(kRandRAMID);
|
||||
myRandomizeRAM->setTarget(this);
|
||||
|
|
|
@ -34,7 +34,7 @@ class ControllerWidget;
|
|||
class RiotWidget : public Widget, public CommandSender
|
||||
{
|
||||
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);
|
||||
virtual ~RiotWidget();
|
||||
|
||||
|
|
|
@ -27,9 +27,10 @@
|
|||
#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)
|
||||
: EditableWidget(boss, font, x, y, 16, 16),
|
||||
: EditableWidget(boss, nfont, x, y, 16, 16),
|
||||
myMenu(NULL),
|
||||
_rows(0),
|
||||
_cols(0),
|
||||
|
@ -53,14 +54,14 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& font,
|
|||
_h = h + 2;
|
||||
|
||||
// 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);
|
||||
|
||||
// Add settings menu
|
||||
myMenu = new RomListSettings(this, font);
|
||||
myMenu = new RomListSettings(this, lfont);
|
||||
|
||||
// Take advantage of a wide debugger window when possible
|
||||
const int fontWidth = font.getMaxCharWidth(),
|
||||
const int fontWidth = lfont.getMaxCharWidth(),
|
||||
numchars = w / fontWidth;
|
||||
|
||||
_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;
|
||||
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->setID(i);
|
||||
t->setFill(CheckboxWidget::Circle);
|
||||
|
|
|
@ -49,7 +49,7 @@ class RomListWidget : public EditableWidget
|
|||
};
|
||||
|
||||
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);
|
||||
virtual ~RomListWidget();
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
#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)
|
||||
: Widget(boss, font, x, y, w, h),
|
||||
: Widget(boss, lfont, x, y, w, h),
|
||||
CommandSender(boss),
|
||||
myListIsDirty(true)
|
||||
{
|
||||
|
@ -45,19 +45,19 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// Show current bank state
|
||||
xpos = x; ypos = y + 7;
|
||||
t = new StaticTextWidget(boss, font, xpos, ypos,
|
||||
font.getStringWidth("Bank state: "),
|
||||
font.getFontHeight(),
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos,
|
||||
lfont.getStringWidth("Bank state: "),
|
||||
lfont.getFontHeight(),
|
||||
"Bank state: ", kTextAlignLeft);
|
||||
|
||||
xpos += t->getWidth() + 5;
|
||||
myBank = new EditTextWidget(boss, font, xpos, ypos-1,
|
||||
_w - 2 - xpos, font.getLineHeight());
|
||||
myBank = new EditTextWidget(boss, nfont, xpos, ypos-1,
|
||||
_w - 2 - xpos, nfont.getLineHeight());
|
||||
|
||||
// Create rom listing
|
||||
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);
|
||||
addFocusWidget(myRomList);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,8 @@ class RomWidget : public Widget, public CommandSender
|
|||
};
|
||||
|
||||
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();
|
||||
|
||||
void invalidate(bool forcereload = true)
|
||||
|
|
|
@ -29,75 +29,76 @@
|
|||
#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)
|
||||
: Widget(boss, font, x, y, 16, 16),
|
||||
: Widget(boss, lfont, x, y, 16, 16),
|
||||
CommandSender(boss)
|
||||
{
|
||||
bool longstr = 34 * font.getMaxCharWidth() <= max_w;
|
||||
bool longstr = 34 * lfont.getMaxCharWidth() <= max_w;
|
||||
|
||||
x += 5;
|
||||
const int lineHeight = font.getLineHeight();
|
||||
const int lineHeight = lfont.getLineHeight();
|
||||
int xpos = x, ypos = y;
|
||||
int lwidth = font.getStringWidth(longstr ? "Frame Cycle:" : "F. Cycle:");
|
||||
int fwidth = 5 * font.getMaxCharWidth() + 4;
|
||||
int lwidth = lfont.getStringWidth(longstr ? "Frame Cycle:" : "F. Cycle:");
|
||||
int fwidth = 5 * lfont.getMaxCharWidth() + 4;
|
||||
|
||||
// Add frame info
|
||||
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:",
|
||||
kTextAlignLeft);
|
||||
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);
|
||||
|
||||
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:",
|
||||
kTextAlignLeft);
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
xpos = x + lwidth + myFrameCycles->getWidth() + 8; ypos = y + 10;
|
||||
lwidth = font.getStringWidth(longstr ? "Color Clock:" : "Pixel Pos:");
|
||||
fwidth = 3 * font.getMaxCharWidth() + 4;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight,
|
||||
lwidth = lfont.getStringWidth(longstr ? "Color Clock:" : "Pixel Pos:");
|
||||
fwidth = 3 * lfont.getMaxCharWidth() + 4;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
|
||||
"Scanline:", kTextAlignLeft);
|
||||
|
||||
myScanlineCount = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth,
|
||||
myScanlineCount = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
|
||||
lineHeight, "");
|
||||
myScanlineCount->setEditable(false);
|
||||
|
||||
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);
|
||||
|
||||
myScanlineCycles = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth,
|
||||
myScanlineCycles = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
|
||||
lineHeight, "");
|
||||
myScanlineCycles->setEditable(false);
|
||||
|
||||
ypos += lineHeight + 5;
|
||||
new StaticTextWidget(boss, font, xpos, ypos, lwidth, lineHeight,
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
|
||||
"Pixel Pos:", kTextAlignLeft);
|
||||
|
||||
myPixelPosition = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth,
|
||||
myPixelPosition = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
|
||||
lineHeight, "");
|
||||
myPixelPosition->setEditable(false);
|
||||
|
||||
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);
|
||||
|
||||
myColorClocks = new EditTextWidget(boss, font, xpos+lwidth, ypos-1, fwidth,
|
||||
myColorClocks = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
|
||||
lineHeight, "");
|
||||
myColorClocks->setEditable(false);
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@ class EditTextWidget;
|
|||
class TiaInfoWidget : public Widget, public CommandSender
|
||||
{
|
||||
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();
|
||||
|
||||
void loadConfig();
|
||||
|
|
|
@ -33,14 +33,15 @@
|
|||
#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)
|
||||
: Widget(boss, font, x, y, w, h),
|
||||
: Widget(boss, lfont, x, y, w, h),
|
||||
CommandSender(boss)
|
||||
{
|
||||
const int fontWidth = font.getMaxCharWidth(),
|
||||
fontHeight = font.getFontHeight(),
|
||||
lineHeight = font.getLineHeight();
|
||||
const int fontWidth = lfont.getMaxCharWidth(),
|
||||
fontHeight = lfont.getFontHeight(),
|
||||
lineHeight = lfont.getLineHeight();
|
||||
int xpos = 10, ypos = 15 + lineHeight, lwidth = 4 * fontWidth;
|
||||
StaticTextWidget* t;
|
||||
|
||||
|
@ -48,32 +49,32 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
const char* regNames[] = { "COLUP0:", "COLUP1:", "COLUPF:", "COLUBK:" };
|
||||
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,
|
||||
regNames[row],
|
||||
kTextAlignLeft);
|
||||
}
|
||||
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);
|
||||
myColorRegs->setTarget(this);
|
||||
myColorRegs->setID(kColorRegsID);
|
||||
addFocusWidget(myColorRegs);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
////////////////////////////
|
||||
|
@ -81,11 +82,11 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
////////////////////////////
|
||||
// Add horizontal labels
|
||||
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);
|
||||
|
||||
// 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,
|
||||
"Strobes:", kTextAlignLeft);
|
||||
|
||||
|
@ -94,7 +95,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
const char* collLabel[] = { "P0", "P1", "M0", "M1", "BL" };
|
||||
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,
|
||||
collLabel[row], kTextAlignLeft);
|
||||
}
|
||||
|
@ -106,7 +107,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
{
|
||||
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);
|
||||
myCollision[idx]->setTarget(this);
|
||||
myCollision[idx]->setID(idx);
|
||||
|
@ -129,52 +130,52 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
unsigned int buttonX, buttonY, buttonW;
|
||||
buttonX = collX + 20*fontWidth; buttonY = ypos;
|
||||
buttonW = 7 * fontWidth;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"WSync", kWsyncCmd);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"ResP0", kResP0Cmd);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"ResM0", kResM0Cmd);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"ResBL", kResBLCmd);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"HmClr", kHmclrCmd);
|
||||
b->setTarget(this);
|
||||
|
||||
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);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"ResP1", kResP1Cmd);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"ResM1", kResM1Cmd);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"HMove", kHmoveCmd);
|
||||
b->setTarget(this);
|
||||
|
||||
buttonY += lineHeight + 3;
|
||||
b = new ButtonWidget(boss, font, buttonX, buttonY, buttonW, lineHeight,
|
||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||
"CxClr", kCxclrCmd);
|
||||
b->setTarget(this);
|
||||
|
||||
|
@ -183,22 +184,22 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
////////////////////////////
|
||||
// grP0
|
||||
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,
|
||||
"P0: GR:", kTextAlignLeft);
|
||||
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->setID(kGRP0ID);
|
||||
addFocusWidget(myGRP0);
|
||||
|
||||
// posP0
|
||||
xpos += myGRP0->getWidth() + 8;
|
||||
t = new StaticTextWidget(boss, font, xpos, ypos+2,
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2,
|
||||
6*fontWidth, fontHeight,
|
||||
"Pos: #", kTextAlignLeft);
|
||||
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);
|
||||
myPosP0->setTarget(this);
|
||||
myPosP0->setID(kPosP0ID);
|
||||
|
@ -207,11 +208,11 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// hmP0
|
||||
xpos += myPosP0->getWidth() + 8;
|
||||
t = new StaticTextWidget(boss, font, xpos, ypos+2,
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2,
|
||||
3*fontWidth, fontHeight,
|
||||
"HM:", kTextAlignLeft);
|
||||
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);
|
||||
myHMP0->setTarget(this);
|
||||
myHMP0->setID(kHMP0ID);
|
||||
|
@ -219,14 +220,14 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// P0 reflect and delay
|
||||
xpos += myHMP0->getWidth() + 15;
|
||||
myRefP0 = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myRefP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Reflect", kCheckActionCmd);
|
||||
myRefP0->setTarget(this);
|
||||
myRefP0->setID(kRefP0ID);
|
||||
addFocusWidget(myRefP0);
|
||||
|
||||
xpos += myRefP0->getWidth() + 15;
|
||||
myDelP0 = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myDelP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Delay", kCheckActionCmd);
|
||||
myDelP0->setTarget(this);
|
||||
myDelP0->setID(kDelP0ID);
|
||||
|
@ -234,18 +235,18 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// NUSIZ0 (player portion)
|
||||
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,
|
||||
"NusizP0:", kTextAlignLeft);
|
||||
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);
|
||||
myNusizP0->setTarget(this);
|
||||
myNusizP0->setID(kNusizP0ID);
|
||||
addFocusWidget(myNusizP0);
|
||||
|
||||
xpos += myNusizP0->getWidth() + 5;
|
||||
myNusizP0Text = new EditTextWidget(boss, font, xpos, ypos, 23*fontWidth,
|
||||
myNusizP0Text = new EditTextWidget(boss, nfont, xpos, ypos, 23*fontWidth,
|
||||
lineHeight, "");
|
||||
myNusizP0Text->setEditable(false);
|
||||
|
||||
|
@ -254,20 +255,20 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
////////////////////////////
|
||||
// grP1
|
||||
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);
|
||||
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->setID(kGRP1ID);
|
||||
addFocusWidget(myGRP1);
|
||||
|
||||
// posP1
|
||||
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);
|
||||
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);
|
||||
myPosP1->setTarget(this);
|
||||
myPosP1->setID(kPosP1ID);
|
||||
|
@ -276,10 +277,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// hmP1
|
||||
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);
|
||||
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);
|
||||
myHMP1->setTarget(this);
|
||||
myHMP1->setID(kHMP1ID);
|
||||
|
@ -287,14 +288,14 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// P1 reflect and delay
|
||||
xpos += myHMP1->getWidth() + 15;
|
||||
myRefP1 = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myRefP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Reflect", kCheckActionCmd);
|
||||
myRefP1->setTarget(this);
|
||||
myRefP1->setID(kRefP1ID);
|
||||
addFocusWidget(myRefP1);
|
||||
|
||||
xpos += myRefP1->getWidth() + 15;
|
||||
myDelP1 = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myDelP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Delay", kCheckActionCmd);
|
||||
myDelP1->setTarget(this);
|
||||
myDelP1->setID(kDelP1ID);
|
||||
|
@ -302,17 +303,17 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// NUSIZ1 (player portion)
|
||||
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);
|
||||
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);
|
||||
myNusizP1->setTarget(this);
|
||||
myNusizP1->setID(kNusizP1ID);
|
||||
addFocusWidget(myNusizP1);
|
||||
|
||||
xpos += myNusizP1->getWidth() + 5;
|
||||
myNusizP1Text = new EditTextWidget(boss, font, xpos, ypos, 23*fontWidth,
|
||||
myNusizP1Text = new EditTextWidget(boss, nfont, xpos, ypos, 23*fontWidth,
|
||||
lineHeight, "");
|
||||
myNusizP1Text->setEditable(false);
|
||||
|
||||
|
@ -321,10 +322,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
////////////////////////////
|
||||
// enaM0
|
||||
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);
|
||||
xpos += 3*fontWidth + 8;
|
||||
myEnaM0 = new CheckboxWidget(boss, font, xpos, ypos+2,
|
||||
myEnaM0 = new CheckboxWidget(boss, lfont, xpos, ypos+2,
|
||||
"Enable", kCheckActionCmd);
|
||||
myEnaM0->setTarget(this);
|
||||
myEnaM0->setID(kEnaM0ID);
|
||||
|
@ -332,10 +333,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// posM0
|
||||
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);
|
||||
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);
|
||||
myPosM0->setTarget(this);
|
||||
myPosM0->setID(kPosM0ID);
|
||||
|
@ -344,10 +345,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// hmM0
|
||||
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);
|
||||
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);
|
||||
myHMM0->setTarget(this);
|
||||
myHMM0->setID(kHMM0ID);
|
||||
|
@ -355,10 +356,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// NUSIZ0 (missile portion)
|
||||
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);
|
||||
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);
|
||||
myNusizM0->setTarget(this);
|
||||
myNusizM0->setID(kNusizM0ID);
|
||||
|
@ -366,7 +367,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// M0 reset
|
||||
xpos += myNusizM0->getWidth() + 15;
|
||||
myResMP0 = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myResMP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Reset", kCheckActionCmd);
|
||||
myResMP0->setTarget(this);
|
||||
myResMP0->setID(kResMP0ID);
|
||||
|
@ -377,10 +378,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
////////////////////////////
|
||||
// enaM1
|
||||
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);
|
||||
xpos += 3*fontWidth + 8;
|
||||
myEnaM1 = new CheckboxWidget(boss, font, xpos, ypos+2,
|
||||
myEnaM1 = new CheckboxWidget(boss, lfont, xpos, ypos+2,
|
||||
"Enable", kCheckActionCmd);
|
||||
myEnaM1->setTarget(this);
|
||||
myEnaM1->setID(kEnaM1ID);
|
||||
|
@ -388,10 +389,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// posM0
|
||||
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);
|
||||
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);
|
||||
myPosM1->setTarget(this);
|
||||
myPosM1->setID(kPosM1ID);
|
||||
|
@ -400,10 +401,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// hmM0
|
||||
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);
|
||||
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);
|
||||
myHMM1->setTarget(this);
|
||||
myHMM1->setID(kHMM1ID);
|
||||
|
@ -411,10 +412,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// NUSIZ1 (missile portion)
|
||||
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);
|
||||
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);
|
||||
myNusizM1->setTarget(this);
|
||||
myNusizM1->setID(kNusizM1ID);
|
||||
|
@ -422,7 +423,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// M1 reset
|
||||
xpos += myNusizM1->getWidth() + 15;
|
||||
myResMP1 = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myResMP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Reset", kCheckActionCmd);
|
||||
myResMP1->setTarget(this);
|
||||
myResMP1->setID(kResMP1ID);
|
||||
|
@ -433,10 +434,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
////////////////////////////
|
||||
// enaBL
|
||||
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);
|
||||
xpos += 3*fontWidth + 8;
|
||||
myEnaBL = new CheckboxWidget(boss, font, xpos, ypos+2,
|
||||
myEnaBL = new CheckboxWidget(boss, lfont, xpos, ypos+2,
|
||||
"Enable", kCheckActionCmd);
|
||||
myEnaBL->setTarget(this);
|
||||
myEnaBL->setID(kEnaBLID);
|
||||
|
@ -444,10 +445,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// posBL
|
||||
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);
|
||||
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);
|
||||
myPosBL->setTarget(this);
|
||||
myPosBL->setID(kPosBLID);
|
||||
|
@ -456,10 +457,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// hmBL
|
||||
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);
|
||||
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);
|
||||
myHMBL->setTarget(this);
|
||||
myHMBL->setID(kHMBLID);
|
||||
|
@ -467,10 +468,10 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// CTRLPF (size portion)
|
||||
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);
|
||||
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);
|
||||
mySizeBL->setTarget(this);
|
||||
mySizeBL->setID(kSizeBLID);
|
||||
|
@ -478,7 +479,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// BL delay
|
||||
xpos += mySizeBL->getWidth() + 15;
|
||||
myDelBL = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myDelBL = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Delay", kCheckActionCmd);
|
||||
myDelBL->setTarget(this);
|
||||
myDelBL->setID(kDelBLID);
|
||||
|
@ -489,45 +490,45 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
////////////////////////////
|
||||
// PF0
|
||||
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);
|
||||
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]->setID(kPF0ID);
|
||||
addFocusWidget(myPF[0]);
|
||||
|
||||
// PF1
|
||||
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]->setID(kPF1ID);
|
||||
addFocusWidget(myPF[1]);
|
||||
|
||||
// PF2
|
||||
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]->setID(kPF2ID);
|
||||
addFocusWidget(myPF[2]);
|
||||
|
||||
// PF reflect, score, priority
|
||||
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);
|
||||
myRefPF->setTarget(this);
|
||||
myRefPF->setID(kRefPFID);
|
||||
addFocusWidget(myRefPF);
|
||||
|
||||
xpos += myRefPF->getWidth() + 15;
|
||||
myScorePF = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myScorePF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Score", kCheckActionCmd);
|
||||
myScorePF->setTarget(this);
|
||||
myScorePF->setID(kScorePFID);
|
||||
addFocusWidget(myScorePF);
|
||||
|
||||
xpos += myScorePF->getWidth() + 15;
|
||||
myPriorityPF = new CheckboxWidget(boss, font, xpos, ypos+1,
|
||||
myPriorityPF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||
"Priority", kCheckActionCmd);
|
||||
myPriorityPF->setTarget(this);
|
||||
myPriorityPF->setID(kPriorityPFID);
|
||||
|
@ -535,7 +536,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// How to handle undriven pins
|
||||
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);
|
||||
myUndrivenPins->setTarget(this);
|
||||
addFocusWidget(myUndrivenPins);
|
||||
|
|
|
@ -35,7 +35,7 @@ class ColorWidget;
|
|||
class TiaWidget : public Widget, public CommandSender
|
||||
{
|
||||
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);
|
||||
virtual ~TiaWidget();
|
||||
|
||||
|
|
|
@ -208,8 +208,8 @@ class Cartridge : public Device
|
|||
each specific cart type, since the bankswitching/inner workings
|
||||
of each cart type can be very different from each other.
|
||||
*/
|
||||
virtual CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h) { return NULL; }
|
||||
virtual CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
const GUI::Font& nfont, int x, int y, int w, int h) { return NULL; }
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
|
@ -128,10 +128,10 @@ class Cartridge0840 : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -131,10 +131,10 @@ class Cartridge2K : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -159,10 +159,10 @@ class Cartridge3E : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -136,10 +136,10 @@ class Cartridge3F : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -144,10 +144,10 @@ class Cartridge4A50 : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -130,10 +130,10 @@ class Cartridge4K : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -143,10 +143,10 @@ class CartridgeAR : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -201,10 +201,10 @@ class CartridgeCM : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -220,10 +220,10 @@ class CartridgeCTY : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -133,10 +133,10 @@ class CartridgeCV : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -142,10 +142,10 @@ class CartridgeDPC : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -145,10 +145,10 @@ class CartridgeDPCPlus : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -139,10 +139,10 @@ class CartridgeE0 : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
|
@ -156,10 +156,10 @@ class CartridgeE7 : public Cartridge
|
|||
Get debugger widget responsible for accessing the inner workings
|
||||
of the cart.
|
||||
*/
|
||||
CartDebugWidget* debugWidget(GuiObject* boss,
|
||||
const GUI::Font& font, int x, int y, int w, int h)
|
||||
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||
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
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue