Converted some raw enum to 'enum class' in FrameBufferConstants.

This commit is contained in:
Stephen Anthony 2017-12-14 21:29:45 -03:30
parent 31da99f48b
commit 434d2dfc83
62 changed files with 283 additions and 284 deletions

View File

@ -42,7 +42,7 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& lfont,
// AudF registers // AudF registers
new StaticTextWidget(boss, lfont, xpos, ypos+2, new StaticTextWidget(boss, lfont, xpos, ypos+2,
lwidth, fontHeight, lwidth, fontHeight,
"AUDF", kTextAlignLeft); "AUDF", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myAudF = new DataGridWidget(boss, nfont, xpos, ypos, myAudF = new DataGridWidget(boss, nfont, xpos, ypos,
2, 1, 2, 5, Common::Base::F_16); 2, 1, 2, 5, Common::Base::F_16);
@ -55,13 +55,13 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& lfont,
new StaticTextWidget(boss, lfont, xpos + col * myAudF->colWidth() + int(myAudF->colWidth() / 2.75), new StaticTextWidget(boss, lfont, xpos + col * myAudF->colWidth() + int(myAudF->colWidth() / 2.75),
ypos - lineHeight, fontWidth, fontHeight, ypos - lineHeight, fontWidth, fontHeight,
Common::Base::toString(col, Common::Base::F_16_1), Common::Base::toString(col, Common::Base::F_16_1),
kTextAlignLeft); TextAlign::Left);
} }
// AudC registers // AudC registers
xpos = 10; ypos += lineHeight + 5; xpos = 10; ypos += lineHeight + 5;
new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,
"AUDC", kTextAlignLeft); "AUDC", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myAudC = new DataGridWidget(boss, nfont, xpos + int(myAudF->colWidth() / 2.75), ypos, myAudC = new DataGridWidget(boss, nfont, xpos + int(myAudF->colWidth() / 2.75), ypos,
2, 1, 1, 4, Common::Base::F_16_1); 2, 1, 1, 4, Common::Base::F_16_1);
@ -72,7 +72,7 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& lfont,
// AudV registers // AudV registers
xpos = 10; ypos += lineHeight + 5; xpos = 10; ypos += lineHeight + 5;
new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,
"AUDV", kTextAlignLeft); "AUDV", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myAudV = new DataGridWidget(boss, nfont, xpos + int(myAudF->colWidth() / 2.75), ypos, myAudV = new DataGridWidget(boss, nfont, xpos + int(myAudF->colWidth() / 2.75), ypos,
2, 1, 1, 4, Common::Base::F_16_1); 2, 1, 1, 4, Common::Base::F_16_1);

View File

@ -29,7 +29,7 @@ BoosterWidget::BoosterWidget(GuiObject* boss, const GUI::Font& font,
StaticTextWidget* t; StaticTextWidget* t;
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
fontHeight, label, kTextAlignLeft); fontHeight, label, TextAlign::Left);
xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10; xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10;
myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "", myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "",
CheckboxWidget::kCheckActionCmd); CheckboxWidget::kCheckActionCmd);

View File

@ -63,7 +63,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget(
label << "Set segment " << i << " as "; label << "Set segment " << i << " as ";
new StaticTextWidget(boss, _font, xpos, ypos, _font.getStringWidth(label.str()), new StaticTextWidget(boss, _font, xpos, ypos, _font.getStringWidth(label.str()),
myFontHeight, label.str(), kTextAlignLeft); myFontHeight, label.str(), TextAlign::Left);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
xpos += 20; xpos += 20;
@ -95,7 +95,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget(
label.str(""); label.str("");
label << Common::Base::HEX4 << addr1 << "-" << Common::Base::HEX4 << addr2; label << Common::Base::HEX4 << addr1 << "-" << Common::Base::HEX4 << addr2;
t = new StaticTextWidget(boss, _font, xpos_s, ypos_s+2, t = new StaticTextWidget(boss, _font, xpos_s, ypos_s+2,
_font.getStringWidth(label.str()), myFontHeight, label.str(), kTextAlignLeft); _font.getStringWidth(label.str()), myFontHeight, label.str(), TextAlign::Left);
int xoffset = xpos_s+t->getWidth() + 10; int xoffset = xpos_s+t->getWidth() + 10;
myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s, myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s,
@ -106,7 +106,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget(
label.str(""); label.str("");
label << Common::Base::HEX4 << (addr2 + 1) << "-" << Common::Base::HEX4 << (addr2 + 1 + 0x1FF); label << Common::Base::HEX4 << (addr2 + 1) << "-" << Common::Base::HEX4 << (addr2 + 1 + 0x1FF);
new StaticTextWidget(boss, _font, xpos_s, ypos_s+2, new StaticTextWidget(boss, _font, xpos_s, ypos_s+2,
_font.getStringWidth(label.str()), myFontHeight, label.str(), kTextAlignLeft); _font.getStringWidth(label.str()), myFontHeight, label.str(), TextAlign::Left);
myBankState[2*i+1] = new EditTextWidget(boss, _font, xoffset, ypos_s, myBankState[2*i+1] = new EditTextWidget(boss, _font, xoffset, ypos_s,
w - xoffset - 10, myLineHeight, ""); w - xoffset - 10, myLineHeight, "");

View File

@ -65,7 +65,7 @@ Cartridge3EWidget::Cartridge3EWidget(
<< (start+0x7FF) << "): "; << (start+0x7FF) << "): ";
new StaticTextWidget(_boss, _font, xpos, ypos, _font.getStringWidth(label.str()), new StaticTextWidget(_boss, _font, xpos, ypos, _font.getStringWidth(label.str()),
myFontHeight, label.str(), kTextAlignLeft); myFontHeight, label.str(), TextAlign::Left);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
xpos += 40; xpos += 40;

View File

@ -65,7 +65,7 @@ Cartridge4A50Widget::Cartridge4A50Widget(
// Lower bank/region configuration // Lower bank/region configuration
xpos = 10; xpos = 10;
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth, new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
myFontHeight, lowerlabel, kTextAlignLeft); myFontHeight, lowerlabel, TextAlign::Left);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
xpos += 40; xpos += 40;
@ -85,7 +85,7 @@ Cartridge4A50Widget::Cartridge4A50Widget(
// Middle bank/region configuration // Middle bank/region configuration
xpos = 10; ypos += myLineHeight + 14; xpos = 10; ypos += myLineHeight + 14;
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth, new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
myFontHeight, middlelabel, kTextAlignLeft); myFontHeight, middlelabel, TextAlign::Left);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
xpos += 40; xpos += 40;
@ -105,7 +105,7 @@ Cartridge4A50Widget::Cartridge4A50Widget(
// High bank/region configuration // High bank/region configuration
xpos = 10; ypos += myLineHeight + 14; xpos = 10; ypos += myLineHeight + 14;
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth, new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
myFontHeight, highlabel, kTextAlignLeft); myFontHeight, highlabel, TextAlign::Left);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
xpos += 40; xpos += 40;

View File

@ -74,7 +74,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
xpos = DS_X; xpos = DS_X;
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Datastream Pointers", kTextAlignLeft); myFontHeight, "Datastream Pointers", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myDatastreamPointers = new DataGridWidget(boss, _nfont, DS_X, ypos+myLineHeight-2, 4, 4, 6, 32, Common::Base::F_16_3_2); myDatastreamPointers = new DataGridWidget(boss, _nfont, DS_X, ypos+myLineHeight-2, 4, 4, 6, 32, Common::Base::F_16_3_2);
@ -91,23 +91,23 @@ CartridgeBUSWidget::CartridgeBUSWidget(
myDatastreamLabels[row] = myDatastreamLabels[row] =
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "), new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
ypos+myLineHeight-2 + row*myLineHeight + 2, ypos+myLineHeight-2 + row*myLineHeight + 2,
myFontWidth*2, myFontHeight, "", kTextAlignLeft); myFontWidth*2, myFontHeight, "", TextAlign::Left);
myDatastreamLabels[row]->setLabel(Common::Base::toString(row * 4, Common::Base::F_16_2)); myDatastreamLabels[row]->setLabel(Common::Base::toString(row * 4, Common::Base::F_16_2));
} }
lwidth = _font.getStringWidth("Write Data (stream 16)"); lwidth = _font.getStringWidth("Write Data (stream 16)");
myDatastreamLabels[4] = myDatastreamLabels[4] =
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "), new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
ypos+myLineHeight-2 + 4*myLineHeight + 2, ypos+myLineHeight-2 + 4*myLineHeight + 2,
lwidth, myFontHeight, "Write Data (stream 16)", kTextAlignLeft); lwidth, myFontHeight, "Write Data (stream 16)", TextAlign::Left);
myDatastreamLabels[5] = myDatastreamLabels[5] =
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "), new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
ypos+myLineHeight-2 + 5*myLineHeight + 2, ypos+myLineHeight-2 + 5*myLineHeight + 2,
lwidth, myFontHeight, "Jump Data (stream 17)", kTextAlignLeft); lwidth, myFontHeight, "Jump Data (stream 17)", TextAlign::Left);
// Datastream Increments // Datastream Increments
xpos = DS_X + myDatastreamPointers->getWidth() + 20; xpos = DS_X + myDatastreamPointers->getWidth() + 20;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Datastream Increments", kTextAlignLeft); myFontHeight, "Datastream Increments", TextAlign::Left);
myDatastreamIncrements = new DataGridWidget(boss, _nfont, xpos, ypos+myLineHeight-2, 4, 4, 5, 32, Common::Base::F_16_2_2); myDatastreamIncrements = new DataGridWidget(boss, _nfont, xpos, ypos+myLineHeight-2, 4, 4, 5, 32, Common::Base::F_16_2_2);
myDatastreamIncrements->setTarget(this); myDatastreamIncrements->setTarget(this);
@ -120,7 +120,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
// Datastream Maps // Datastream Maps
xpos = 0; ypos += myLineHeight*7 + 4; xpos = 0; ypos += myLineHeight*7 + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Address Maps", kTextAlignLeft); myFontHeight, "Address Maps", TextAlign::Left);
myAddressMaps = new DataGridWidget(boss, _nfont, 0, ypos+myLineHeight-2, 8, 5, 8, 32, Common::Base::F_16_8); myAddressMaps = new DataGridWidget(boss, _nfont, 0, ypos+myLineHeight-2, 8, 5, 8, 32, Common::Base::F_16_8);
myAddressMaps->setTarget(this); myAddressMaps->setTarget(this);
@ -129,7 +129,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
// Music counters // Music counters
xpos = 10; ypos += myLineHeight*6 + 4; xpos = 10; ypos += myLineHeight*6 + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Counters", kTextAlignLeft); myFontHeight, "Music Counters", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicCounters = new DataGridWidget(boss, _nfont, 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);
@ -139,7 +139,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
// Music frequencies // Music frequencies
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Frequencies", kTextAlignLeft); myFontHeight, "Music Frequencies", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicFrequencies = new DataGridWidget(boss, _nfont, 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);
@ -149,7 +149,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
// Music waveforms // Music waveforms
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Waveforms", kTextAlignLeft); myFontHeight, "Music Waveforms", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicWaveforms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2); myMusicWaveforms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2);
@ -159,7 +159,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
int xpossp = xpos + myMusicWaveforms->getWidth() + 20; int xpossp = xpos + myMusicWaveforms->getWidth() + 20;
int lwidth2 = _font.getStringWidth("Sample Pointer "); int lwidth2 = _font.getStringWidth("Sample Pointer ");
new StaticTextWidget(boss, _font, xpossp, ypos, lwidth2, new StaticTextWidget(boss, _font, xpossp, ypos, lwidth2,
myFontHeight, "Sample Pointer ", kTextAlignLeft); myFontHeight, "Sample Pointer ", TextAlign::Left);
mySamplePointer = new DataGridWidget(boss, _nfont, xpossp + lwidth2, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8); mySamplePointer = new DataGridWidget(boss, _nfont, xpossp + lwidth2, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8);
mySamplePointer->setTarget(this); mySamplePointer->setTarget(this);
@ -168,7 +168,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
// Music waveform sizes // Music waveform sizes
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Waveform Sizes", kTextAlignLeft); myFontHeight, "Music Waveform Sizes", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicWaveformSizes = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2); myMusicWaveformSizes = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2);

View File

@ -74,7 +74,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
xpos = DS_X; xpos = DS_X;
ypos += myLineHeight + 4; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Datastream Pointers", kTextAlignLeft); myFontHeight, "Datastream Pointers", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myDatastreamPointers = new DataGridWidget(boss, _nfont, DS_X, ypos+myLineHeight-2, 4, 8, 6, 32, Common::Base::F_16_3_2); myDatastreamPointers = new DataGridWidget(boss, _nfont, DS_X, ypos+myLineHeight-2, 4, 8, 6, 32, Common::Base::F_16_3_2);
@ -92,23 +92,23 @@ CartridgeCDFWidget::CartridgeCDFWidget(
myDatastreamLabels[row] = myDatastreamLabels[row] =
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "), new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
ypos+myLineHeight-2 + row*myLineHeight + 2, ypos+myLineHeight-2 + row*myLineHeight + 2,
myFontWidth*2, myFontHeight, "", kTextAlignLeft); myFontWidth*2, myFontHeight, "", TextAlign::Left);
myDatastreamLabels[row]->setLabel(Common::Base::toString(row * 4, Common::Base::F_16_2)); myDatastreamLabels[row]->setLabel(Common::Base::toString(row * 4, Common::Base::F_16_2));
} }
lwidth = _font.getStringWidth("Write Data (stream 20)"); lwidth = _font.getStringWidth("Write Data (stream 20)");
myDatastreamLabels[8] = myDatastreamLabels[8] =
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "), new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
ypos+myLineHeight-2 + 8*myLineHeight + 2, ypos+myLineHeight-2 + 8*myLineHeight + 2,
lwidth, myFontHeight, "Write Data (stream 20)", kTextAlignLeft); lwidth, myFontHeight, "Write Data (stream 20)", TextAlign::Left);
myDatastreamLabels[9] = myDatastreamLabels[9] =
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "), new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
ypos+myLineHeight-2 + 9*myLineHeight + 2, ypos+myLineHeight-2 + 9*myLineHeight + 2,
lwidth, myFontHeight, "Jump Data (stream 21)", kTextAlignLeft); lwidth, myFontHeight, "Jump Data (stream 21)", TextAlign::Left);
// Datastream Increments // Datastream Increments
xpos = DS_X + myDatastreamPointers->getWidth() + 20; xpos = DS_X + myDatastreamPointers->getWidth() + 20;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Datastream Increments", kTextAlignLeft); myFontHeight, "Datastream Increments", TextAlign::Left);
myDatastreamIncrements = new DataGridWidget(boss, _nfont, xpos, ypos+myLineHeight-2, 4, 8, 5, 32, Common::Base::F_16_2_2); myDatastreamIncrements = new DataGridWidget(boss, _nfont, xpos, ypos+myLineHeight-2, 4, 8, 5, 32, Common::Base::F_16_2_2);
myDatastreamIncrements->setTarget(this); myDatastreamIncrements->setTarget(this);
@ -121,7 +121,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
// Music counters // Music counters
xpos = 10; ypos += myLineHeight*12 + 4; xpos = 10; ypos += myLineHeight*12 + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Counters", kTextAlignLeft); myFontHeight, "Music Counters", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicCounters = new DataGridWidget(boss, _nfont, 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);
@ -131,7 +131,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
// Music frequencies // Music frequencies
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Frequencies", kTextAlignLeft); myFontHeight, "Music Frequencies", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicFrequencies = new DataGridWidget(boss, _nfont, 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);
@ -141,7 +141,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
// Music waveforms // Music waveforms
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Waveforms", kTextAlignLeft); myFontHeight, "Music Waveforms", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicWaveforms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2); myMusicWaveforms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2);
@ -151,7 +151,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
int xpossp = xpos + myMusicWaveforms->getWidth() + 20; int xpossp = xpos + myMusicWaveforms->getWidth() + 20;
int lwidth2 = _font.getStringWidth("Sample Pointer "); int lwidth2 = _font.getStringWidth("Sample Pointer ");
new StaticTextWidget(boss, _font, xpossp, ypos, lwidth2, new StaticTextWidget(boss, _font, xpossp, ypos, lwidth2,
myFontHeight, "Sample Pointer ", kTextAlignLeft); myFontHeight, "Sample Pointer ", TextAlign::Left);
mySamplePointer = new DataGridWidget(boss, _nfont, xpossp + lwidth2, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8); mySamplePointer = new DataGridWidget(boss, _nfont, xpossp + lwidth2, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8);
mySamplePointer->setTarget(this); mySamplePointer->setTarget(this);
@ -160,7 +160,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
// Music waveform sizes // Music waveform sizes
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Waveform Sizes", kTextAlignLeft); myFontHeight, "Music Waveform Sizes", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicWaveformSizes = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2); myMusicWaveformSizes = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2);

View File

@ -61,7 +61,7 @@ CartridgeCMWidget::CartridgeCMWidget(
int lwidth = _font.getStringWidth("Current column "); int lwidth = _font.getStringWidth("Current column ");
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
new StaticTextWidget(boss, _font, xpos, ypos+2, lwidth, myFontHeight, new StaticTextWidget(boss, _font, xpos, ypos+2, lwidth, myFontHeight,
"Current SWCHA ", kTextAlignLeft); "Current SWCHA ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
mySWCHA = new ToggleBitWidget(boss, _nfont, xpos, ypos, 8, 1); mySWCHA = new ToggleBitWidget(boss, _nfont, xpos, ypos, 8, 1);
mySWCHA->setTarget(this); mySWCHA->setTarget(this);
@ -70,7 +70,7 @@ CartridgeCMWidget::CartridgeCMWidget(
// Current column number // Current column number
xpos = 10; ypos += myLineHeight + 5; xpos = 10; ypos += myLineHeight + 5;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Current column ", kTextAlignLeft); myFontHeight, "Current column ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myColumn = new DataGridWidget(boss, _nfont, 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);
@ -140,7 +140,7 @@ CartridgeCMWidget::CartridgeCMWidget(
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
lwidth = _font.getStringWidth("Ram State "); lwidth = _font.getStringWidth("Ram State ");
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Ram State ", kTextAlignLeft); myFontHeight, "Ram State ", TextAlign::Left);
myRAM = new EditTextWidget(boss, _nfont, xpos+lwidth, ypos-2, myRAM = new EditTextWidget(boss, _nfont, xpos+lwidth, ypos-2,
_nfont.getStringWidth(" Write-only "), myLineHeight, ""); _nfont.getStringWidth(" Write-only "), myLineHeight, "");
myRAM->setEditable(false, true); myRAM->setEditable(false, true);

View File

@ -63,7 +63,7 @@ CartridgeDASHWidget::CartridgeDASHWidget(
label << "Set segment " << i << " as: "; label << "Set segment " << i << " as: ";
new StaticTextWidget(boss, _font, xpos, ypos, _font.getStringWidth(label.str()), new StaticTextWidget(boss, _font, xpos, ypos, _font.getStringWidth(label.str()),
myFontHeight, label.str(), kTextAlignLeft); myFontHeight, label.str(), TextAlign::Left);
ypos += myLineHeight + 8; ypos += myLineHeight + 8;
xpos += 20; xpos += 20;
@ -95,7 +95,7 @@ CartridgeDASHWidget::CartridgeDASHWidget(
label.str(""); label.str("");
label << Common::Base::HEX4 << addr1 << "-" << Common::Base::HEX4 << addr2; label << Common::Base::HEX4 << addr1 << "-" << Common::Base::HEX4 << addr2;
t = new StaticTextWidget(boss, _font, xpos_s, ypos_s+2, t = new StaticTextWidget(boss, _font, xpos_s, ypos_s+2,
_font.getStringWidth(label.str()), myFontHeight, label.str(), kTextAlignLeft); _font.getStringWidth(label.str()), myFontHeight, label.str(), TextAlign::Left);
int xoffset = xpos_s+t->getWidth() + 10; int xoffset = xpos_s+t->getWidth() + 10;
myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s, myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s,
@ -106,7 +106,7 @@ CartridgeDASHWidget::CartridgeDASHWidget(
label.str(""); label.str("");
label << Common::Base::HEX4 << (addr2 + 1) << "-" << Common::Base::HEX4 << (addr2 + 1 + 0x1FF); label << Common::Base::HEX4 << (addr2 + 1) << "-" << Common::Base::HEX4 << (addr2 + 1 + 0x1FF);
new StaticTextWidget(boss, _font, xpos_s, ypos_s+2, new StaticTextWidget(boss, _font, xpos_s, ypos_s+2,
_font.getStringWidth(label.str()), myFontHeight, label.str(), kTextAlignLeft); _font.getStringWidth(label.str()), myFontHeight, label.str(), TextAlign::Left);
myBankState[2*i+1] = new EditTextWidget(boss, _font, xoffset, ypos_s, myBankState[2*i+1] = new EditTextWidget(boss, _font, xoffset, ypos_s,
w - xoffset - 10, myLineHeight, ""); w - xoffset - 10, myLineHeight, "");

View File

@ -70,7 +70,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
int lwidth = _font.getStringWidth("Counter Registers "); int lwidth = _font.getStringWidth("Counter Registers ");
xpos = 10; ypos += myLineHeight + 8; xpos = 10; ypos += myLineHeight + 8;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Top Registers ", kTextAlignLeft); myFontHeight, "Top Registers ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myTops = new DataGridWidget(boss, _nfont, 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);
@ -80,7 +80,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Bottom registers // Bottom registers
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Bottom Registers ", kTextAlignLeft); myFontHeight, "Bottom Registers ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myBottoms = new DataGridWidget(boss, _nfont, 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);
@ -90,7 +90,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Counter registers // Counter registers
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Counter Registers ", kTextAlignLeft); myFontHeight, "Counter Registers ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myCounters = new DataGridWidget(boss, _nfont, 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);
@ -100,7 +100,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Fractional counter registers // Fractional counter registers
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Frac Counters ", kTextAlignLeft); myFontHeight, "Frac Counters ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myFracCounters = new DataGridWidget(boss, _nfont, 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);
@ -110,7 +110,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Fractional increment registers // Fractional increment registers
xpos = 10; ypos += myFracCounters->getHeight() + 8; xpos = 10; ypos += myFracCounters->getHeight() + 8;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Frac Increments ", kTextAlignLeft); myFontHeight, "Frac Increments ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myFracIncrements = new DataGridWidget(boss, _nfont, 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);
@ -120,7 +120,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Special function parameters // Special function parameters
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Function Params ", kTextAlignLeft); myFontHeight, "Function Params ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myParameter = new DataGridWidget(boss, _nfont, 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);
@ -130,7 +130,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Music counters // Music counters
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Counters ", kTextAlignLeft); myFontHeight, "Music Counters ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicCounters = new DataGridWidget(boss, _nfont, 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);
@ -140,7 +140,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Music frequencies // Music frequencies
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Frequencies ", kTextAlignLeft); myFontHeight, "Music Frequencies ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicFrequencies = new DataGridWidget(boss, _nfont, 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);
@ -150,7 +150,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
// Music waveforms // Music waveforms
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music Waveforms ", kTextAlignLeft); myFontHeight, "Music Waveforms ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicWaveforms = new DataGridWidget(boss, _nfont, 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);
@ -161,7 +161,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
lwidth = _font.getStringWidth("Current random number "); lwidth = _font.getStringWidth("Current random number ");
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Current random number ", kTextAlignLeft); myFontHeight, "Current random number ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myRandom = new DataGridWidget(boss, _nfont, 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);

View File

@ -63,13 +63,13 @@ CartridgeDPCWidget::CartridgeDPCWidget(
// Data fetchers // Data fetchers
int lwidth = _font.getStringWidth("Data Fetchers "); int lwidth = _font.getStringWidth("Data Fetchers ");
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Data Fetchers ", kTextAlignLeft); myFontHeight, "Data Fetchers ", TextAlign::Left);
// Top registers // Top registers
lwidth = _font.getStringWidth("Counter Registers "); lwidth = _font.getStringWidth("Counter Registers ");
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Top Registers ", kTextAlignLeft); myFontHeight, "Top Registers ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myTops = new DataGridWidget(boss, _nfont, 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);
@ -79,7 +79,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
// Bottom registers // Bottom registers
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Bottom Registers ", kTextAlignLeft); myFontHeight, "Bottom Registers ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myBottoms = new DataGridWidget(boss, _nfont, 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);
@ -89,7 +89,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
// Counter registers // Counter registers
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Counter Registers ", kTextAlignLeft); myFontHeight, "Counter Registers ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myCounters = new DataGridWidget(boss, _nfont, 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);
@ -99,7 +99,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
// Flag registers // Flag registers
xpos = 18; ypos += myLineHeight + 4; xpos = 18; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Flag Registers ", kTextAlignLeft); myFontHeight, "Flag Registers ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myFlags = new DataGridWidget(boss, _nfont, 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);
@ -110,7 +110,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
xpos = 10; ypos += myLineHeight + 12; xpos = 10; ypos += myLineHeight + 12;
lwidth = _font.getStringWidth("Music mode (DF5/DF6/DF7) "); lwidth = _font.getStringWidth("Music mode (DF5/DF6/DF7) ");
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Music mode (DF5/DF6/DF7) ", kTextAlignLeft); myFontHeight, "Music mode (DF5/DF6/DF7) ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myMusicMode = new DataGridWidget(boss, _nfont, 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);
@ -120,7 +120,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
// Current random number // Current random number
xpos = 10; ypos += myLineHeight + 4; xpos = 10; ypos += myLineHeight + 4;
new StaticTextWidget(boss, _font, xpos, ypos, lwidth, new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
myFontHeight, "Current random number ", kTextAlignLeft); myFontHeight, "Current random number ", TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myRandom = new DataGridWidget(boss, _nfont, 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);

View File

@ -49,7 +49,7 @@ int CartDebugWidget::addBaseInformation(int bytes, const string& manufacturer,
// Add ROM size, manufacturer and bankswitch info // Add ROM size, manufacturer and bankswitch info
new StaticTextWidget(_boss, _font, x, y, lwidth, new StaticTextWidget(_boss, _font, x, y, lwidth,
myFontHeight, "ROM Size ", kTextAlignLeft); myFontHeight, "ROM Size ", TextAlign::Left);
buf << bytes << " bytes"; buf << bytes << " bytes";
if(bytes >= 1024) if(bytes >= 1024)
buf << " / " << (bytes/1024) << "KB"; buf << " / " << (bytes/1024) << "KB";
@ -60,7 +60,7 @@ int CartDebugWidget::addBaseInformation(int bytes, const string& manufacturer,
y += myLineHeight + 4; y += myLineHeight + 4;
new StaticTextWidget(_boss, _font, x, y, lwidth, new StaticTextWidget(_boss, _font, x, y, lwidth,
myFontHeight, "Manufacturer ", kTextAlignLeft); myFontHeight, "Manufacturer ", TextAlign::Left);
w = new EditTextWidget(_boss, _nfont, x+lwidth, y, w = new EditTextWidget(_boss, _nfont, x+lwidth, y,
fwidth, myLineHeight, manufacturer); fwidth, myLineHeight, manufacturer);
w->setEditable(false); w->setEditable(false);
@ -73,7 +73,7 @@ int CartDebugWidget::addBaseInformation(int bytes, const string& manufacturer,
if(lines > maxlines) lines = maxlines; if(lines > maxlines) lines = maxlines;
new StaticTextWidget(_boss, _font, x, y, lwidth, new StaticTextWidget(_boss, _font, x, y, lwidth,
myFontHeight, "Description ", kTextAlignLeft); myFontHeight, "Description ", TextAlign::Left);
myDesc = new StringListWidget(_boss, _nfont, x+lwidth, y, myDesc = new StringListWidget(_boss, _nfont, x+lwidth, y,
fwidth, lines * myLineHeight, false); fwidth, lines * myLineHeight, false);
myDesc->setEditable(false); myDesc->setEditable(false);

View File

@ -73,7 +73,7 @@ CartridgeFA2Widget::CartridgeFA2Widget(
StaticTextWidget* t = new StaticTextWidget(boss, _font, xpos, ypos, StaticTextWidget* t = new StaticTextWidget(boss, _font, xpos, ypos,
_font.getStringWidth("Harmony Flash "), _font.getStringWidth("Harmony Flash "),
myFontHeight, "Harmony Flash ", kTextAlignLeft); myFontHeight, "Harmony Flash ", TextAlign::Left);
xpos += t->getWidth() + 4; xpos += t->getWidth() + 4;
myFlashErase = myFlashErase =

View File

@ -48,7 +48,7 @@ CartRamWidget::CartRamWidget(
// Add RAM size // Add RAM size
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth, new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
myFontHeight, "RAM Size ", kTextAlignLeft); myFontHeight, "RAM Size ", TextAlign::Left);
uInt32 ramsize = cartDebug.internalRamSize(); uInt32 ramsize = cartDebug.internalRamSize();
buf << ramsize << " bytes"; buf << ramsize << " bytes";
@ -70,7 +70,7 @@ CartRamWidget::CartRamWidget(
if(lines > maxlines) lines = maxlines; if(lines > maxlines) lines = maxlines;
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth, new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
myFontHeight, "Description ", kTextAlignLeft); myFontHeight, "Description ", TextAlign::Left);
myDesc = new StringListWidget(boss, nfont, xpos+lwidth, ypos, myDesc = new StringListWidget(boss, nfont, xpos+lwidth, ypos,
fwidth, lines * myLineHeight, false); fwidth, lines * myLineHeight, false);
myDesc->setEditable(false); myDesc->setEditable(false);

View File

@ -44,7 +44,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
// Create a 1x1 grid with label for the PC register // Create a 1x1 grid with label for the PC register
xpos = x; ypos = y; lwidth = 4 * fontWidth; xpos = x; ypos = y; lwidth = 4 * fontWidth;
new StaticTextWidget(boss, lfont, xpos, ypos+1, lwidth-2, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+1, lwidth-2, fontHeight,
"PC ", kTextAlignLeft); "PC ", TextAlign::Left);
myPCGrid = myPCGrid =
new DataGridWidget(boss, nfont, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::F_16); new DataGridWidget(boss, nfont, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::F_16);
myPCGrid->setTarget(this); myPCGrid->setTarget(this);
@ -96,7 +96,7 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
int swidth = lfont.getStringWidth("Source Address"); int swidth = lfont.getStringWidth("Source Address");
new StaticTextWidget(boss, lfont, xpos, src_y + 4, src_w, new StaticTextWidget(boss, lfont, xpos, src_y + 4, src_w,
fontHeight, swidth <= src_w ? "Source Address" : "Source Addr", fontHeight, swidth <= src_w ? "Source Address" : "Source Addr",
kTextAlignCenter); TextAlign::Center);
// Add labels for other CPU registers // Add labels for other CPU registers
xpos = x; xpos = x;
@ -105,13 +105,13 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
{ {
new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 1, new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 1,
lwidth-2, fontHeight, lwidth-2, fontHeight,
labels[row], kTextAlignLeft); labels[row], TextAlign::Left);
} }
// Create a bitfield widget for changing the processor status // Create a bitfield widget for changing the processor status
xpos = x; ypos += 4*lineHeight + 2; xpos = x; ypos += 4*lineHeight + 2;
new StaticTextWidget(boss, lfont, xpos, ypos+1, lwidth-2, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+1, lwidth-2, fontHeight,
"PS ", kTextAlignLeft); "PS ", TextAlign::Left);
myPSRegister = new ToggleBitWidget(boss, nfont, xpos+lwidth, ypos, 8, 1); myPSRegister = new ToggleBitWidget(boss, nfont, xpos+lwidth, ypos, 8, 1);
myPSRegister->setTarget(this); myPSRegister->setTarget(this);
addFocusWidget(myPSRegister); addFocusWidget(myPSRegister);

View File

@ -609,7 +609,7 @@ void DataGridWidget::drawWidget(bool hilite)
{ {
adjustOffset(); adjustOffset();
s.drawString(_font, editString(), x, y, _colWidth, kTextColor, s.drawString(_font, editString(), x, y, _colWidth, kTextColor,
kTextAlignLeft, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
} }
else else
{ {

View File

@ -33,7 +33,7 @@ DrivingWidget::DrivingWidget(GuiObject* boss, const GUI::Font& font,
StaticTextWidget* t; StaticTextWidget* t;
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
fontHeight, label, kTextAlignLeft); fontHeight, label, TextAlign::Left);
ypos += t->getHeight() + 20; ypos += t->getHeight() + 20;
myGrayUp = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight, myGrayUp = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight,

View File

@ -29,7 +29,7 @@ GenesisWidget::GenesisWidget(GuiObject* boss, const GUI::Font& font,
StaticTextWidget* t; StaticTextWidget* t;
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
fontHeight, label, kTextAlignLeft); fontHeight, label, TextAlign::Left);
xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 20; xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 20;
myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "", myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "",
CheckboxWidget::kCheckActionCmd); CheckboxWidget::kCheckActionCmd);

View File

@ -28,7 +28,7 @@ JoystickWidget::JoystickWidget(GuiObject* boss, const GUI::Font& font,
StaticTextWidget* t; StaticTextWidget* t;
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
fontHeight, label, kTextAlignLeft); fontHeight, label, TextAlign::Left);
xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 20; xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 20;
myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "", myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "",
CheckboxWidget::kCheckActionCmd); CheckboxWidget::kCheckActionCmd);

View File

@ -31,7 +31,7 @@ KeyboardWidget::KeyboardWidget(GuiObject* boss, const GUI::Font& font,
StaticTextWidget* t; StaticTextWidget* t;
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
fontHeight, label, kTextAlignLeft); fontHeight, label, TextAlign::Left);
xpos += 30; ypos += t->getHeight() + 20; xpos += 30; ypos += t->getHeight() + 20;

View File

@ -36,12 +36,12 @@ class NullControlWidget : public ControllerWidget
lwidth = std::max(font.getStringWidth(buf.str()), lwidth = std::max(font.getStringWidth(buf.str()),
font.getStringWidth("Controller input")); font.getStringWidth("Controller input"));
new StaticTextWidget(boss, font, x, y+2, lwidth, new StaticTextWidget(boss, font, x, y+2, lwidth,
fontHeight, buf.str(), kTextAlignLeft); fontHeight, buf.str(), TextAlign::Left);
new StaticTextWidget(boss, font, x, y+2+2*lineHeight, lwidth, new StaticTextWidget(boss, font, x, y+2+2*lineHeight, lwidth,
fontHeight, "Controller input", kTextAlignCenter); fontHeight, "Controller input", TextAlign::Center);
new StaticTextWidget(boss, font, x, y+2+3*lineHeight, lwidth, new StaticTextWidget(boss, font, x, y+2+3*lineHeight, lwidth,
fontHeight, "not available", fontHeight, "not available",
kTextAlignCenter); TextAlign::Center);
} }
virtual ~NullControlWidget() = default; virtual ~NullControlWidget() = default;

View File

@ -32,7 +32,7 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font,
int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Paddles)"); int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Paddles)");
new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
fontHeight, label, kTextAlignLeft); fontHeight, label, TextAlign::Left);
ypos += lineHeight + 20; ypos += lineHeight + 20;
const string& p0string = leftport ? "P0 pot " : "P2 pot "; const string& p0string = leftport ? "P0 pot " : "P2 pot ";

View File

@ -90,7 +90,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
new StaticTextWidget(_boss, lfont, xpos - _font.getStringWidth("xxxx"), new StaticTextWidget(_boss, lfont, xpos - _font.getStringWidth("xxxx"),
ypos - myLineHeight, ypos - myLineHeight,
lfont.getStringWidth("xxxx"), myFontHeight, lfont.getStringWidth("xxxx"), myFontHeight,
"00xx", kTextAlignLeft); "00xx", TextAlign::Left);
for(int col = 0; col < 16; ++col) for(int col = 0; col < 16; ++col)
{ {
@ -98,7 +98,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
ypos - myLineHeight, ypos - myLineHeight,
myFontWidth, myFontHeight, myFontWidth, myFontHeight,
Common::Base::toString(col, Common::Base::F_16_1), Common::Base::toString(col, Common::Base::F_16_1),
kTextAlignLeft); TextAlign::Left);
} }
uInt32 row; uInt32 row;
@ -107,7 +107,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
myRamLabels[row] = myRamLabels[row] =
new StaticTextWidget(_boss, _font, xpos - _font.getStringWidth("x "), new StaticTextWidget(_boss, _font, xpos - _font.getStringWidth("x "),
ypos + row*myLineHeight + 2, ypos + row*myLineHeight + 2,
myFontWidth, myFontHeight, "", kTextAlignLeft); myFontWidth, myFontHeight, "", TextAlign::Left);
} }
// For smaller grids, make sure RAM cell detail fields are below the RESET button // For smaller grids, make sure RAM cell detail fields are below the RESET button

View File

@ -67,7 +67,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
#define CREATE_IO_REGS(desc, bits, bitsID, editable) \ #define CREATE_IO_REGS(desc, bits, bitsID, editable) \
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,\ t = new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,\
desc, kTextAlignLeft); \ desc, TextAlign::Left); \
xpos += t->getWidth() + 5; \ xpos += t->getWidth() + 5; \
bits = new ToggleBitWidget(boss, nfont, xpos, ypos, 8, 1); \ bits = new ToggleBitWidget(boss, nfont, xpos, ypos, 8, 1); \
bits->setTarget(this); \ bits->setTarget(this); \
@ -106,7 +106,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
for(int row = 0; row < 4; ++row) for(int row = 0; row < 4; ++row)
{ {
t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
lwidth, fontHeight, writeNames[row], kTextAlignLeft); lwidth, fontHeight, writeNames[row], TextAlign::Left);
} }
xpos += t->getWidth() + 5; xpos += t->getWidth() + 5;
myTimWrite = new DataGridWidget(boss, nfont, 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);
@ -120,7 +120,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
for(int row = 0; row < 4; ++row) for(int row = 0; row < 4; ++row)
{ {
t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
10*fontWidth, fontHeight, readNames[row], kTextAlignLeft); 10*fontWidth, fontHeight, readNames[row], TextAlign::Left);
} }
xpos += t->getWidth() + 5; xpos += t->getWidth() + 5;
myTimRead = new DataGridWidget(boss, nfont, 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);
@ -142,7 +142,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
for(int row = 0; row < 3; ++row) for(int row = 0; row < 3; ++row)
{ {
new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
5*fontWidth, fontHeight, contLeftReadNames[row], kTextAlignLeft); 5*fontWidth, fontHeight, contLeftReadNames[row], TextAlign::Left);
} }
xpos += 5*fontWidth + 5; xpos += 5*fontWidth + 5;
myLeftINPT = new DataGridWidget(boss, nfont, 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);
@ -155,7 +155,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
for(int row = 0; row < 3; ++row) for(int row = 0; row < 3; ++row)
{ {
new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
5*fontWidth, fontHeight, contRightReadNames[row], kTextAlignLeft); 5*fontWidth, fontHeight, contRightReadNames[row], TextAlign::Left);
} }
xpos += 5*fontWidth + 5; xpos += 5*fontWidth + 5;
myRightINPT = new DataGridWidget(boss, nfont, 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);

View File

@ -529,7 +529,7 @@ void RomListWidget::drawWidget(bool hilite)
{ {
adjustOffset(); adjustOffset();
s.drawString(_font, editString(), _x + r.x(), ypos, r.width(), kTextColor, s.drawString(_font, editString(), _x + r.x(), ypos, r.width(), kTextColor,
kTextAlignLeft, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
drawCaret(); drawCaret();
} }

View File

@ -45,7 +45,7 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
t = new StaticTextWidget(boss, lfont, xpos, ypos, t = new StaticTextWidget(boss, lfont, xpos, ypos,
lfont.getStringWidth("Bank"), lfont.getStringWidth("Bank"),
lfont.getFontHeight(), lfont.getFontHeight(),
"Bank", kTextAlignLeft); "Bank", TextAlign::Left);
xpos += t->getWidth() + 5; xpos += t->getWidth() + 5;
myBank = new EditTextWidget(boss, nfont, xpos, ypos-2, myBank = new EditTextWidget(boss, nfont, xpos, ypos-2,

View File

@ -44,7 +44,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
// Add frame info // Add frame info
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Frame Count " : "Frame ", longstr ? "Frame Count " : "Frame ",
kTextAlignLeft); TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myFrameCount = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, ""); myFrameCount = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, "");
myFrameCount->setEditable(false, true); myFrameCount->setEditable(false, true);
@ -52,7 +52,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
xpos = x; ypos += lineHeight + 5; xpos = x; ypos += lineHeight + 5;
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Frame Cycle " : "F. Cycle ", longstr ? "Frame Cycle " : "F. Cycle ",
kTextAlignLeft); TextAlign::Left);
xpos += lwidth; xpos += lwidth;
myFrameCycles = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, ""); myFrameCycles = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, "");
myFrameCycles->setEditable(false, true); myFrameCycles->setEditable(false, true);
@ -71,7 +71,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
new StaticTextWidget(boss, lfont, xpos, ypos, new StaticTextWidget(boss, lfont, xpos, ypos,
lfont.getStringWidth(longstr ? "Scanline" : "Scn Ln"), lineHeight, lfont.getStringWidth(longstr ? "Scanline" : "Scn Ln"), lineHeight,
longstr ? "Scanline" : "Scn Ln", kTextAlignLeft); longstr ? "Scanline" : "Scn Ln", TextAlign::Left);
myScanlineCountLast = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth, myScanlineCountLast = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");
@ -84,7 +84,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
ypos += lineHeight + 5; ypos += lineHeight + 5;
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Scan Cycle " : "Scn Cycle", kTextAlignLeft); longstr ? "Scan Cycle " : "Scn Cycle", TextAlign::Left);
myScanlineCycles = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth, myScanlineCycles = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");
@ -92,7 +92,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
ypos += lineHeight + 5; ypos += lineHeight + 5;
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
"Pixel Pos ", kTextAlignLeft); "Pixel Pos ", TextAlign::Left);
myPixelPosition = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth, myPixelPosition = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");
@ -100,7 +100,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
ypos += lineHeight + 5; ypos += lineHeight + 5;
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight, new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
longstr ? "Color Clock " : "Color Clk ", kTextAlignLeft); longstr ? "Color Clock " : "Color Clk ", TextAlign::Left);
myColorClocks = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth, myColorClocks = new EditTextWidget(boss, nfont, xpos+lwidth, ypos-1, fwidth,
lineHeight, ""); lineHeight, "");

View File

@ -52,7 +52,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
for(int row = 0; row < 4; ++row) for(int row = 0; row < 4; ++row)
{ {
new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
6*fontWidth, fontHeight, regNames[row], kTextAlignLeft); 6*fontWidth, fontHeight, regNames[row], TextAlign::Left);
} }
xpos += 6*fontWidth + 8; xpos += 6*fontWidth + 8;
myColorRegs = new DataGridWidget(boss, nfont, xpos, ypos, myColorRegs = new DataGridWidget(boss, nfont, xpos, ypos,
@ -92,7 +92,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
{ {
ypos += lineHeight; ypos += lineHeight;
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight,
dbgLabels[row], kTextAlignLeft); dbgLabels[row], TextAlign::Left);
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4, myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4,
ypos + 2, uInt32(1.5*lineHeight), lineHeight - 4); ypos + 2, uInt32(1.5*lineHeight), lineHeight - 4);
myFixedColors[row]->setTarget(this); myFixedColors[row]->setTarget(this);
@ -103,7 +103,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
{ {
ypos += lineHeight; ypos += lineHeight;
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight,
dbgLabels[row], kTextAlignLeft); dbgLabels[row], TextAlign::Left);
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4, myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4,
ypos + 2, uInt32(1.5*lineHeight), lineHeight - 4); ypos + 2, uInt32(1.5*lineHeight), lineHeight - 4);
myFixedColors[row]->setTarget(this); myFixedColors[row]->setTarget(this);
@ -125,7 +125,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// Add vertical label // Add vertical label
new StaticTextWidget(boss, lfont, xpos, ypos + row*(lineHeight+3), new StaticTextWidget(boss, lfont, xpos, ypos + row*(lineHeight+3),
2*fontWidth, fontHeight, 2*fontWidth, fontHeight,
rowLabel[row], kTextAlignLeft); rowLabel[row], TextAlign::Left);
for(uInt32 col = 0; col < 5 - row; ++col) for(uInt32 col = 0; col < 5 - row; ++col)
{ {
@ -147,7 +147,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
labelx += (myCollision[idx]->getWidth() - lwidth) / 2; labelx += (myCollision[idx]->getWidth() - lwidth) / 2;
new StaticTextWidget(boss, lfont, labelx, ypos-lineHeight, lwidth, fontHeight, new StaticTextWidget(boss, lfont, labelx, ypos-lineHeight, lwidth, fontHeight,
colLabel[col], kTextAlignLeft); colLabel[col], TextAlign::Left);
collX += myCollision[idx]->getWidth() + 10; collX += myCollision[idx]->getWidth() + 10;
idx++; idx++;
@ -170,7 +170,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// grP0 (new) // grP0 (new)
xpos = 10; ypos = collY + 4; xpos = 10; ypos = collY + 4;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"P0", kTextAlignLeft); "P0", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myGRP0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1); myGRP0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
myGRP0->setTarget(this); myGRP0->setTarget(this);
@ -181,7 +181,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// posP0 // posP0
xpos += myGRP0->getWidth() + 12; xpos += myGRP0->getWidth() + 12;
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Pos#", kTextAlignLeft); "Pos#", TextAlign::Left);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosP0 = new DataGridWidget(boss, nfont, xpos, ypos, myPosP0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
@ -193,7 +193,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// hmP0 // hmP0
xpos += myPosP0->getWidth() + fontWidth + 12; xpos += myPosP0->getWidth() + fontWidth + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"HM", kTextAlignLeft); "HM", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myHMP0 = new DataGridWidget(boss, nfont, xpos, ypos, myHMP0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
@ -236,7 +236,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// NUSIZ0 (player portion) // NUSIZ0 (player portion)
xpos += myDelP0->getWidth() + 12; xpos += myDelP0->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
"NuSiz", kTextAlignLeft); "NuSiz", TextAlign::Left);
xpos += 5*fontWidth + 5; xpos += 5*fontWidth + 5;
myNusizP0 = new DataGridWidget(boss, nfont, xpos, ypos, myNusizP0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 3, Common::Base::F_16_1); 1, 1, 1, 3, Common::Base::F_16_1);
@ -255,7 +255,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// grP1 (new) // grP1 (new)
xpos = 10; ypos += lineHeight + 12; xpos = 10; ypos += lineHeight + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"P1", kTextAlignLeft); "P1", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myGRP1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1); myGRP1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
myGRP1->setTarget(this); myGRP1->setTarget(this);
@ -266,7 +266,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// posP1 // posP1
xpos += myGRP1->getWidth() + 12; xpos += myGRP1->getWidth() + 12;
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Pos#", kTextAlignLeft); "Pos#", TextAlign::Left);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosP1 = new DataGridWidget(boss, nfont, xpos, ypos, myPosP1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
@ -278,7 +278,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// hmP1 // hmP1
xpos += myPosP1->getWidth() + fontWidth + 12; xpos += myPosP1->getWidth() + fontWidth + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"HM", kTextAlignLeft); "HM", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myHMP1 = new DataGridWidget(boss, nfont, xpos, ypos, myHMP1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
@ -320,7 +320,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// NUSIZ1 (player portion) // NUSIZ1 (player portion)
xpos += myDelP1->getWidth() + 12; xpos += myDelP1->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
"NuSiz", kTextAlignLeft); "NuSiz", TextAlign::Left);
xpos += 5*fontWidth + 5; xpos += 5*fontWidth + 5;
myNusizP1 = new DataGridWidget(boss, nfont, xpos, ypos, myNusizP1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 3, Common::Base::F_16_1); 1, 1, 1, 3, Common::Base::F_16_1);
@ -339,7 +339,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// enaM0 // enaM0
xpos = 10; ypos += lineHeight + 12; xpos = 10; ypos += lineHeight + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"M0", kTextAlignLeft); "M0", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myEnaM0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1); myEnaM0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
myEnaM0->setTarget(this); myEnaM0->setTarget(this);
@ -350,7 +350,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// posM0 // posM0
xpos += myEnaM0->getWidth() + 12; xpos += myEnaM0->getWidth() + 12;
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Pos#", kTextAlignLeft); "Pos#", TextAlign::Left);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosM0 = new DataGridWidget(boss, nfont, xpos, ypos, myPosM0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
@ -362,7 +362,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// hmM0 // hmM0
xpos += myPosM0->getWidth() + 12; xpos += myPosM0->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"HM", kTextAlignLeft); "HM", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myHMM0 = new DataGridWidget(boss, nfont, xpos, ypos, myHMM0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
@ -373,7 +373,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// NUSIZ0 (missile portion) // NUSIZ0 (missile portion)
xpos += myHMM0->getWidth() + 12; xpos += myHMM0->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Size", kTextAlignLeft); "Size", TextAlign::Left);
xpos += 4*fontWidth + 5; xpos += 4*fontWidth + 5;
myNusizM0 = new DataGridWidget(boss, nfont, xpos, ypos, myNusizM0 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 2, Common::Base::F_16_1); 1, 1, 1, 2, Common::Base::F_16_1);
@ -402,7 +402,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// enaM1 // enaM1
xpos = 10; ypos += lineHeight + 4; xpos = 10; ypos += lineHeight + 4;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"M1", kTextAlignLeft); "M1", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myEnaM1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1); myEnaM1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
myEnaM1->setTarget(this); myEnaM1->setTarget(this);
@ -413,7 +413,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// posM0 // posM0
xpos += myEnaM1->getWidth() + 12; xpos += myEnaM1->getWidth() + 12;
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Pos#", kTextAlignLeft); "Pos#", TextAlign::Left);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosM1 = new DataGridWidget(boss, nfont, xpos, ypos, myPosM1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
@ -425,7 +425,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// hmM0 // hmM0
xpos += myPosM1->getWidth() + 12; xpos += myPosM1->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"HM", kTextAlignLeft); "HM", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myHMM1 = new DataGridWidget(boss, nfont, xpos, ypos, myHMM1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
@ -436,7 +436,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// NUSIZ1 (missile portion) // NUSIZ1 (missile portion)
xpos += myHMM1->getWidth() + 12; xpos += myHMM1->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Size", kTextAlignLeft); "Size", TextAlign::Left);
xpos += 4*fontWidth + 5; xpos += 4*fontWidth + 5;
myNusizM1 = new DataGridWidget(boss, nfont, xpos, ypos, myNusizM1 = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 2, Common::Base::F_16_1); 1, 1, 1, 2, Common::Base::F_16_1);
@ -465,7 +465,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// enaBL // enaBL
xpos = 10; ypos += lineHeight + 4; xpos = 10; ypos += lineHeight + 4;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"BL", kTextAlignLeft); "BL", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myEnaBL = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1); myEnaBL = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
myEnaBL->setTarget(this); myEnaBL->setTarget(this);
@ -476,7 +476,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// posBL // posBL
xpos += myEnaBL->getWidth() + 12; xpos += myEnaBL->getWidth() + 12;
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Pos#", kTextAlignLeft); "Pos#", TextAlign::Left);
xpos += t->getWidth() + 2; xpos += t->getWidth() + 2;
myPosBL = new DataGridWidget(boss, nfont, xpos, ypos, myPosBL = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 3, 8, Common::Base::F_10); 1, 1, 3, 8, Common::Base::F_10);
@ -488,7 +488,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// hmBL // hmBL
xpos += myPosBL->getWidth() + 12; xpos += myPosBL->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"HM", kTextAlignLeft); "HM", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myHMBL = new DataGridWidget(boss, nfont, xpos, ypos, myHMBL = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 4, Common::Base::F_16_1); 1, 1, 1, 4, Common::Base::F_16_1);
@ -499,7 +499,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// CTRLPF (size portion) // CTRLPF (size portion)
xpos += myHMBL->getWidth() + 12; xpos += myHMBL->getWidth() + 12;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
"Size", kTextAlignLeft); "Size", TextAlign::Left);
xpos += 4*fontWidth + 5; xpos += 4*fontWidth + 5;
mySizeBL = new DataGridWidget(boss, nfont, xpos, ypos, mySizeBL = new DataGridWidget(boss, nfont, xpos, ypos,
1, 1, 1, 2, Common::Base::F_16_1); 1, 1, 1, 2, Common::Base::F_16_1);
@ -541,7 +541,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
// PF0 // PF0
xpos = 10; ypos += lineHeight + sfHeight + 6; xpos = 10; ypos += lineHeight + sfHeight + 6;
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight, new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
"PF", kTextAlignLeft); "PF", TextAlign::Left);
xpos += 2*fontWidth + 5; xpos += 2*fontWidth + 5;
myPF[0] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 4, 1); myPF[0] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 4, 1);
myPF[0]->setTarget(this); myPF[0]->setTarget(this);
@ -570,14 +570,14 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
for(int i = 4; i <= 7; ++i) for(int i = 4; i <= 7; ++i)
{ {
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight, new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
bitNames[i], kTextAlignLeft); bitNames[i], TextAlign::Left);
xpos += colw; xpos += colw;
} }
xpos = 10 + 2*fontWidth + 5 + myPF[0]->getWidth() + 2 + start(colw); xpos = 10 + 2*fontWidth + 5 + myPF[0]->getWidth() + 2 + start(colw);
for(int i = 7; i >= 0; --i) for(int i = 7; i >= 0; --i)
{ {
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight, new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
bitNames[i], kTextAlignLeft); bitNames[i], TextAlign::Left);
xpos += colw; xpos += colw;
} }
xpos = 10 + 2*fontWidth + 5 + myPF[0]->getWidth() + 2 + xpos = 10 + 2*fontWidth + 5 + myPF[0]->getWidth() + 2 +
@ -585,7 +585,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
for(int i = 0; i <= 7; ++i) for(int i = 0; i <= 7; ++i)
{ {
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight, new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
bitNames[i], kTextAlignLeft); bitNames[i], TextAlign::Left);
xpos += colw; xpos += colw;
} }
@ -614,7 +614,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
xpos = 10; xpos = 10;
ypos += 2 * lineHeight; ypos += 2 * lineHeight;
t = new StaticTextWidget(boss, lfont, xpos, ypos, 13*fontWidth, fontHeight, t = new StaticTextWidget(boss, lfont, xpos, ypos, 13*fontWidth, fontHeight,
"Queued Writes", kTextAlignLeft); "Queued Writes", TextAlign::Left);
xpos += t->getWidth() + 10; xpos += t->getWidth() + 10;
myDelayQueueWidget = new DelayQueueWidget(boss, lfont, xpos, ypos); myDelayQueueWidget = new DelayQueueWidget(boss, lfont, xpos, ypos);

View File

@ -527,7 +527,7 @@ void Console::setProperties(const Properties& props)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FBInitStatus Console::initializeVideo(bool full) FBInitStatus Console::initializeVideo(bool full)
{ {
FBInitStatus fbstatus = kSuccess; FBInitStatus fbstatus = FBInitStatus::Success;
if(full) if(full)
{ {
@ -535,7 +535,7 @@ FBInitStatus Console::initializeVideo(bool full)
": \"" + myProperties.get(Cartridge_Name) + "\""; ": \"" + myProperties.get(Cartridge_Name) + "\"";
fbstatus = myOSystem.frameBuffer().createDisplay(title, fbstatus = myOSystem.frameBuffer().createDisplay(title,
myTIA->width() << 1, myTIA->height()); myTIA->width() << 1, myTIA->height());
if(fbstatus != kSuccess) if(fbstatus != FBInitStatus::Success)
return fbstatus; return fbstatus;
myOSystem.frameBuffer().showFrameStats( myOSystem.frameBuffer().showFrameStats(

View File

@ -2097,20 +2097,20 @@ bool EventHandler::enterDebugMode()
setEventState(S_DEBUGGER); setEventState(S_DEBUGGER);
FBInitStatus fbstatus = myOSystem.createFrameBuffer(); FBInitStatus fbstatus = myOSystem.createFrameBuffer();
if(fbstatus != kSuccess) if(fbstatus != FBInitStatus::Success)
{ {
myOSystem.debugger().setQuitState(); myOSystem.debugger().setQuitState();
setEventState(S_EMULATE); setEventState(S_EMULATE);
if(fbstatus == kFailTooLarge) if(fbstatus == FBInitStatus::FailTooLarge)
myOSystem.frameBuffer().showMessage("Debugger window too large for screen", myOSystem.frameBuffer().showMessage("Debugger window too large for screen",
kBottomCenter, true); MessagePosition::BottomCenter, true);
return false; return false;
} }
myOverlay->reStack(); myOverlay->reStack();
myOSystem.sound().mute(true); myOSystem.sound().mute(true);
#else #else
myOSystem.frameBuffer().showMessage("Debugger support not included", myOSystem.frameBuffer().showMessage("Debugger support not included",
kBottomCenter, true); MessagePosition::BottomCenter, true);
#endif #endif
return true; return true;

View File

@ -184,14 +184,14 @@ void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
{ {
switch(style) switch(style)
{ {
case kSolidLine: case FrameStyle::Solid:
hLine(x, y, x + w - 1, color); hLine(x, y, x + w - 1, color);
hLine(x, y + h - 1, x + w - 1, color); hLine(x, y + h - 1, x + w - 1, color);
vLine(x, y, y + h - 1, color); vLine(x, y, y + h - 1, color);
vLine(x + w - 1, y, y + h - 1, color); vLine(x + w - 1, y, y + h - 1, color);
break; break;
case kDashLine: case FrameStyle::Dashed:
uInt32 i, skip, lwidth = 1; uInt32 i, skip, lwidth = 1;
for(i = x, skip = 1; i < x+w-1; i=i+lwidth+1, ++skip) for(i = x, skip = 1; i < x+w-1; i=i+lwidth+1, ++skip)
@ -217,7 +217,7 @@ void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FBSurface::drawString(const GUI::Font& font, const string& s, void FBSurface::drawString(const GUI::Font& font, const string& s,
int x, int y, int w, int x, int y, int w,
uInt32 color, TextAlignment align, uInt32 color, TextAlign align,
int deltax, bool useEllipsis) int deltax, bool useEllipsis)
{ {
const string ELLIPSIS = "\x1d"; // "..." const string ELLIPSIS = "\x1d"; // "..."
@ -273,9 +273,9 @@ void FBSurface::drawString(const GUI::Font& font, const string& s,
else else
str = s; str = s;
if(align == kTextAlignCenter) if(align == TextAlign::Center)
x = x + (w - width - 1)/2; x = x + (w - width - 1)/2;
else if(align == kTextAlignRight) else if(align == TextAlign::Right)
x = x + w - width; x = x + w - width;
x += deltax; x += deltax;

View File

@ -179,7 +179,7 @@ class FBSurface
@param style The 'FrameStyle' to use for the surrounding frame @param style The 'FrameStyle' to use for the surrounding frame
*/ */
virtual void frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, virtual void frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
uInt32 color, FrameStyle style = kSolidLine); uInt32 color, FrameStyle style = FrameStyle::Solid);
/** /**
This method should be called to draw the specified string. This method should be called to draw the specified string.
@ -196,7 +196,7 @@ class FBSurface
*/ */
virtual void drawString( virtual void drawString(
const GUI::Font& font, const string& s, int x, int y, int w, const GUI::Font& font, const string& s, int x, int y, int w,
uInt32 color, TextAlignment align = kTextAlignLeft, uInt32 color, TextAlign align = TextAlign::Left,
int deltax = 0, bool useEllipsis = true); int deltax = 0, bool useEllipsis = true);
/** /**

View File

@ -176,7 +176,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
// Otherwise, we treat the system as if WINDOWED_SUPPORT is not defined // Otherwise, we treat the system as if WINDOWED_SUPPORT is not defined
if(myDesktopSize.w < kFBMinW && myDesktopSize.h < kFBMinH && if(myDesktopSize.w < kFBMinW && myDesktopSize.h < kFBMinH &&
(myDesktopSize.w < width || myDesktopSize.h < height)) (myDesktopSize.w < width || myDesktopSize.h < height))
return kFailTooLarge; return FBInitStatus::FailTooLarge;
useFullscreen = myOSystem.settings().getBool("fullscreen"); useFullscreen = myOSystem.settings().getBool("fullscreen");
#else #else
@ -184,7 +184,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
// We only really need to worry about it in non-windowed environments, // We only really need to worry about it in non-windowed environments,
// where requesting a window that's too large will probably cause a crash // where requesting a window that's too large will probably cause a crash
if(myDesktopSize.w < width || myDesktopSize.h < height) if(myDesktopSize.w < width || myDesktopSize.h < height)
return kFailTooLarge; return FBInitStatus::FailTooLarge;
#endif #endif
// Set the available video modes for this framebuffer // Set the available video modes for this framebuffer
@ -213,11 +213,11 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
else else
{ {
myOSystem.logMessage("ERROR: Couldn't initialize video subsystem", 0); myOSystem.logMessage("ERROR: Couldn't initialize video subsystem", 0);
return kFailNotSupported; return FBInitStatus::FailNotSupported;
} }
} }
else else
return kFailTooLarge; return FBInitStatus::FailTooLarge;
// Erase any messages from a previous run // Erase any messages from a previous run
myMsg.counter = 0; myMsg.counter = 0;
@ -245,7 +245,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
myOSystem.logMessage(post_about, 1); myOSystem.logMessage(post_about, 1);
} }
return kSuccess; return FBInitStatus::Success;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -283,9 +283,9 @@ void FrameBuffer::update()
myOSystem.console().getFramerate(), info.DisplayFormat.c_str()); myOSystem.console().getFramerate(), info.DisplayFormat.c_str());
myStatsMsg.surface->fillRect(0, 0, myStatsMsg.w, myStatsMsg.h, kBGColor); myStatsMsg.surface->fillRect(0, 0, myStatsMsg.w, myStatsMsg.h, kBGColor);
myStatsMsg.surface->drawString(infoFont(), myStatsMsg.surface->drawString(infoFont(),
msg, 1, 1, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft); msg, 1, 1, myStatsMsg.w, myStatsMsg.color, TextAlign::Left);
myStatsMsg.surface->drawString(infoFont(), myStatsMsg.surface->drawString(infoFont(),
info.BankSwitch, 1, 15, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft); info.BankSwitch, 1, 15, myStatsMsg.w, myStatsMsg.color, TextAlign::Left);
myStatsMsg.surface->setDirty(); myStatsMsg.surface->setDirty();
myStatsMsg.surface->setDstPos(myImageRect.x() + 1, myImageRect.y() + 1); myStatsMsg.surface->setDstPos(myImageRect.x() + 1, myImageRect.y() + 1);
myStatsMsg.surface->render(); myStatsMsg.surface->render();
@ -302,7 +302,7 @@ void FrameBuffer::update()
if (myPausedCount-- <= 0) if (myPausedCount-- <= 0)
{ {
resetPauseDelay(); resetPauseDelay();
showMessage("Paused", kMiddleCenter); showMessage("Paused", MessagePosition::MiddleCenter);
} }
break; // S_PAUSE break; // S_PAUSE
} }
@ -408,47 +408,47 @@ inline void FrameBuffer::drawMessage()
// Draw the bounded box and text // Draw the bounded box and text
switch(myMsg.position) switch(myMsg.position)
{ {
case kTopLeft: case MessagePosition::TopLeft:
myMsg.x = 5; myMsg.x = 5;
myMsg.y = 5; myMsg.y = 5;
break; break;
case kTopCenter: case MessagePosition::TopCenter:
myMsg.x = (myImageRect.width() - myMsg.w) >> 1; myMsg.x = (myImageRect.width() - myMsg.w) >> 1;
myMsg.y = 5; myMsg.y = 5;
break; break;
case kTopRight: case MessagePosition::TopRight:
myMsg.x = myImageRect.width() - myMsg.w - 5; myMsg.x = myImageRect.width() - myMsg.w - 5;
myMsg.y = 5; myMsg.y = 5;
break; break;
case kMiddleLeft: case MessagePosition::MiddleLeft:
myMsg.x = 5; myMsg.x = 5;
myMsg.y = (myImageRect.height() - myMsg.h) >> 1; myMsg.y = (myImageRect.height() - myMsg.h) >> 1;
break; break;
case kMiddleCenter: case MessagePosition::MiddleCenter:
myMsg.x = (myImageRect.width() - myMsg.w) >> 1; myMsg.x = (myImageRect.width() - myMsg.w) >> 1;
myMsg.y = (myImageRect.height() - myMsg.h) >> 1; myMsg.y = (myImageRect.height() - myMsg.h) >> 1;
break; break;
case kMiddleRight: case MessagePosition::MiddleRight:
myMsg.x = myImageRect.width() - myMsg.w - 5; myMsg.x = myImageRect.width() - myMsg.w - 5;
myMsg.y = (myImageRect.height() - myMsg.h) >> 1; myMsg.y = (myImageRect.height() - myMsg.h) >> 1;
break; break;
case kBottomLeft: case MessagePosition::BottomLeft:
myMsg.x = 5; myMsg.x = 5;
myMsg.y = myImageRect.height() - myMsg.h - 5; myMsg.y = myImageRect.height() - myMsg.h - 5;
break; break;
case kBottomCenter: case MessagePosition::BottomCenter:
myMsg.x = (myImageRect.width() - myMsg.w) >> 1; myMsg.x = (myImageRect.width() - myMsg.w) >> 1;
myMsg.y = myImageRect.height() - myMsg.h - 5; myMsg.y = myImageRect.height() - myMsg.h - 5;
break; break;
case kBottomRight: case MessagePosition::BottomRight:
myMsg.x = myImageRect.width() - myMsg.w - 5; myMsg.x = myImageRect.width() - myMsg.w - 5;
myMsg.y = myImageRect.height() - myMsg.h - 5; myMsg.y = myImageRect.height() - myMsg.h - 5;
break; break;
@ -458,7 +458,7 @@ inline void FrameBuffer::drawMessage()
myMsg.surface->fillRect(1, 1, myMsg.w-2, myMsg.h-2, kBtnColor); myMsg.surface->fillRect(1, 1, myMsg.w-2, myMsg.h-2, kBtnColor);
myMsg.surface->box(0, 0, myMsg.w, myMsg.h, kColor, kShadowColor); myMsg.surface->box(0, 0, myMsg.w, myMsg.h, kColor, kShadowColor);
myMsg.surface->drawString(font(), myMsg.text, 4, 4, myMsg.surface->drawString(font(), myMsg.text, 4, 4,
myMsg.w, myMsg.color, kTextAlignLeft); myMsg.w, myMsg.color, TextAlign::Left);
// Either erase the entire message (when time is reached), // Either erase the entire message (when time is reached),
// or show again this frame // or show again this frame

View File

@ -125,7 +125,7 @@ class FrameBuffer
@param force Force showing this message, even if messages are disabled @param force Force showing this message, even if messages are disabled
*/ */
void showMessage(const string& message, void showMessage(const string& message,
MessagePosition position = kBottomCenter, MessagePosition position = MessagePosition::BottomCenter,
bool force = false); bool force = false);
/** /**

View File

@ -15,32 +15,31 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
// FIXME - perhaps add to namespace or something
#ifndef FRAMEBUFFER_CONSTANTS_HXX #ifndef FRAMEBUFFER_CONSTANTS_HXX
#define FRAMEBUFFER_CONSTANTS_HXX #define FRAMEBUFFER_CONSTANTS_HXX
// Return values for initialization of framebuffer window // Return values for initialization of framebuffer window
enum FBInitStatus { enum class FBInitStatus {
kSuccess, Success,
kFailComplete, FailComplete,
kFailTooLarge, FailTooLarge,
kFailNotSupported FailNotSupported
}; };
// Positions for onscreen/overlaid messages // Positions for onscreen/overlaid messages
enum MessagePosition { enum class MessagePosition {
kTopLeft, TopLeft,
kTopCenter, TopCenter,
kTopRight, TopRight,
kMiddleLeft, MiddleLeft,
kMiddleCenter, MiddleCenter,
kMiddleRight, MiddleRight,
kBottomLeft, BottomLeft,
kBottomCenter, BottomCenter,
kBottomRight BottomRight
}; };
// TODO - make this 'enum class'
// Colors indices to use for the various GUI elements // Colors indices to use for the various GUI elements
enum { enum {
kColor = 256, kColor = 256,
@ -70,16 +69,16 @@ enum {
}; };
// Text alignment modes for drawString() // Text alignment modes for drawString()
enum TextAlignment { enum class TextAlign {
kTextAlignLeft, Left,
kTextAlignCenter, Center,
kTextAlignRight Right
}; };
// Line types for drawing rectangular frames // Line types for drawing rectangular frames
enum FrameStyle { enum class FrameStyle {
kSolidLine, Solid,
kDashLine Dashed
}; };
#endif // FRAMEBUFFER_CONSTANTS_HXX #endif // FRAMEBUFFER_CONSTANTS_HXX

View File

@ -245,25 +245,25 @@ void OSystem::setFramerate(float framerate)
FBInitStatus OSystem::createFrameBuffer() FBInitStatus OSystem::createFrameBuffer()
{ {
// Re-initialize the framebuffer to current settings // Re-initialize the framebuffer to current settings
FBInitStatus fbstatus = kFailComplete; FBInitStatus fbstatus = FBInitStatus::FailComplete;
switch(myEventHandler->state()) switch(myEventHandler->state())
{ {
case EventHandler::S_EMULATE: case EventHandler::S_EMULATE:
case EventHandler::S_PAUSE: case EventHandler::S_PAUSE:
case EventHandler::S_MENU: case EventHandler::S_MENU:
case EventHandler::S_CMDMENU: case EventHandler::S_CMDMENU:
if((fbstatus = myConsole->initializeVideo()) != kSuccess) if((fbstatus = myConsole->initializeVideo()) != FBInitStatus::Success)
return fbstatus; return fbstatus;
break; // S_EMULATE, S_PAUSE, S_MENU, S_CMDMENU break; // S_EMULATE, S_PAUSE, S_MENU, S_CMDMENU
case EventHandler::S_LAUNCHER: case EventHandler::S_LAUNCHER:
if((fbstatus = myLauncher->initializeVideo()) != kSuccess) if((fbstatus = myLauncher->initializeVideo()) != FBInitStatus::Success)
return fbstatus; return fbstatus;
break; // S_LAUNCHER break; // S_LAUNCHER
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
case EventHandler::S_DEBUGGER: case EventHandler::S_DEBUGGER:
if((fbstatus = myDebugger->initializeVideo()) != kSuccess) if((fbstatus = myDebugger->initializeVideo()) != FBInitStatus::Success)
return fbstatus; return fbstatus;
break; // S_DEBUGGER break; // S_DEBUGGER
#endif #endif
@ -333,7 +333,7 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum,
#endif #endif
myEventHandler->reset(EventHandler::S_EMULATE); myEventHandler->reset(EventHandler::S_EMULATE);
myEventHandler->setMouseControllerMode(mySettings->getString("usemouse")); myEventHandler->setMouseControllerMode(mySettings->getString("usemouse"));
if(createFrameBuffer() != kSuccess) // Takes care of initializeVideo() if(createFrameBuffer() != FBInitStatus::Success) // Takes care of initializeVideo()
{ {
logMessage("ERROR: Couldn't create framebuffer for console", 0); logMessage("ERROR: Couldn't create framebuffer for console", 0);
myEventHandler->reset(EventHandler::S_LAUNCHER); myEventHandler->reset(EventHandler::S_LAUNCHER);
@ -392,7 +392,7 @@ bool OSystem::createLauncher(const string& startdir)
bool status = false; bool status = false;
myEventHandler->reset(EventHandler::S_LAUNCHER); myEventHandler->reset(EventHandler::S_LAUNCHER);
if(createFrameBuffer() == kSuccess) if(createFrameBuffer() == FBInitStatus::Success)
{ {
myLauncher->reStack(); myLauncher->reStack();
myFrameBuffer->setCursorState(); myFrameBuffer->setCursorState();

View File

@ -65,14 +65,14 @@ AboutDialog::AboutDialog(OSystem& osystem, DialogContainer& parent,
xpos = 5; ypos = 5; xpos = 5; ypos = 5;
myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight, myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight,
"", kTextAlignCenter); "", TextAlign::Center);
myTitle->setTextColor(kTextColorEm); myTitle->setTextColor(kTextColorEm);
xpos = 10; ypos += lineHeight + 4; xpos = 10; ypos += lineHeight + 4;
for(int i = 0; i < myLinesPerPage; i++) for(int i = 0; i < myLinesPerPage; i++)
{ {
myDesc.push_back(new StaticTextWidget(this, font, xpos, ypos, _w - 20, myDesc.push_back(new StaticTextWidget(this, font, xpos, ypos, _w - 20,
fontHeight, "", kTextAlignLeft)); fontHeight, "", TextAlign::Left));
myDescStr.push_back(""); myDescStr.push_back("");
ypos += fontHeight; ypos += fontHeight;
} }
@ -168,7 +168,7 @@ void AboutDialog::displayInfo()
for(int i = 0; i < myLinesPerPage; i++) for(int i = 0; i < myLinesPerPage; i++)
{ {
const char* str = myDescStr[i].c_str(); const char* str = myDescStr[i].c_str();
TextAlignment align = kTextAlignCenter; TextAlign align = TextAlign::Center;
uInt32 color = kTextColor; uInt32 color = kTextColor;
while (str[0] == '\\') while (str[0] == '\\')
@ -176,15 +176,15 @@ void AboutDialog::displayInfo()
switch (str[1]) switch (str[1])
{ {
case 'C': case 'C':
align = kTextAlignCenter; align = TextAlign::Center;
break; break;
case 'L': case 'L':
align = kTextAlignLeft; align = TextAlign::Left;
break; break;
case 'R': case 'R':
align = kTextAlignRight; align = TextAlign::Right;
break; break;
case 'c': case 'c':

View File

@ -62,7 +62,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
myVolumeLabel = new StaticTextWidget(this, font, myVolumeLabel = new StaticTextWidget(this, font,
xpos + myVolumeSlider->getWidth() + 4, xpos + myVolumeSlider->getWidth() + 4,
ypos + 1, ypos + 1,
3*fontWidth, fontHeight, "", kTextAlignLeft); 3*fontWidth, fontHeight, "", TextAlign::Left);
myVolumeLabel->setFlags(WIDGET_CLEARBG); myVolumeLabel->setFlags(WIDGET_CLEARBG);
ypos += lineHeight + 4; ypos += lineHeight + 4;
@ -105,7 +105,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& infofont = instance().frameBuffer().infoFont(); const GUI::Font& infofont = instance().frameBuffer().infoFont();
new StaticTextWidget(this, infofont, 10, ypos, new StaticTextWidget(this, infofont, 10, ypos,
font.getStringWidth("(*) Requires application restart"), fontHeight, font.getStringWidth("(*) Requires application restart"), fontHeight,
"(*) Requires application restart", kTextAlignLeft); "(*) Requires application restart", TextAlign::Left);
// Add Defaults, OK and Cancel buttons // Add Defaults, OK and Cancel buttons
ButtonWidget* b; ButtonWidget* b;

View File

@ -53,13 +53,13 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font,
xpos = 10; ypos = 4; xpos = 10; ypos = 4;
_title = new StaticTextWidget(this, font, xpos, ypos, _title = new StaticTextWidget(this, font, xpos, ypos,
_w - 2 * xpos, lineHeight, _w - 2 * xpos, lineHeight,
"", kTextAlignCenter); "", TextAlign::Center);
// Current path - TODO: handle long paths ? // Current path - TODO: handle long paths ?
ypos += lineHeight + 4; ypos += lineHeight + 4;
_currentPath = new StaticTextWidget(this, font, xpos, ypos, _currentPath = new StaticTextWidget(this, font, xpos, ypos,
_w - 2 * xpos, lineHeight, _w - 2 * xpos, lineHeight,
"", kTextAlignLeft); "", TextAlign::Left);
// Add file list // Add file list
ypos += lineHeight + 4; ypos += lineHeight + 4;
@ -73,7 +73,7 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font,
_type = new StaticTextWidget(this, font, xpos, ypos+2, _type = new StaticTextWidget(this, font, xpos, ypos+2,
font.getStringWidth("Name "), lineHeight, font.getStringWidth("Name "), lineHeight,
"Name", kTextAlignCenter); "Name", TextAlign::Center);
_selected = new EditTextWidget(this, font, xpos + _type->getWidth(), ypos, _selected = new EditTextWidget(this, font, xpos + _type->getWidth(), ypos,
_w - _type->getWidth() - 2 * xpos, lineHeight, ""); _w - _type->getWidth() - 2 * xpos, lineHeight, "");
_selected->setEditable(false); _selected->setEditable(false);

View File

@ -118,7 +118,7 @@ void CheckListWidget::drawWidget(bool hilite)
{ {
adjustOffset(); adjustOffset();
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor, s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
kTextAlignLeft, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
} }
else else
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor); s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor);

View File

@ -52,7 +52,7 @@ ComboDialog::ComboDialog(GuiObject* boss, const GUI::Font& font,
// Label for dialog, indicating which combo is being changed // Label for dialog, indicating which combo is being changed
myComboName = new StaticTextWidget(this, font, xpos, ypos, _w - xpos - 10, myComboName = new StaticTextWidget(this, font, xpos, ypos, _w - xpos - 10,
fontHeight, "", kTextAlignCenter); fontHeight, "", TextAlign::Center);
ypos += (lineHeight + 4) + 5; ypos += (lineHeight + 4) + 5;
// Add event popup for 8 events // Add event popup for 8 events

View File

@ -201,7 +201,7 @@ void DeveloperDialog::addVideoTab(const GUI::Font& font)
myTVJitterRecLabelWidget = new StaticTextWidget(myTab, font, myTVJitterRecLabelWidget = new StaticTextWidget(myTab, font,
myTVJitterRecWidget->getRight() + 4, myTVJitterRecWidget->getRight() + 4,
myTVJitterRecWidget->getTop() + 2, myTVJitterRecWidget->getTop() + 2,
5 * fontWidth, fontHeight, "", kTextAlignLeft); 5 * fontWidth, fontHeight, "", TextAlign::Left);
myTVJitterRecLabelWidget->setFlags(WIDGET_CLEARBG); myTVJitterRecLabelWidget->setFlags(WIDGET_CLEARBG);
wid.push_back(myTVJitterRecLabelWidget); wid.push_back(myTVJitterRecLabelWidget);
ypos += lineHeight + VGAP; ypos += lineHeight + VGAP;
@ -430,7 +430,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
myDebuggerWidthLabel = myDebuggerWidthLabel =
new StaticTextWidget(myTab, font, new StaticTextWidget(myTab, font,
xpos + myDebuggerWidthSlider->getWidth() + 4, xpos + myDebuggerWidthSlider->getWidth() + 4,
ypos + 1, 4 * fontWidth, fontHeight, "", kTextAlignLeft); ypos + 1, 4 * fontWidth, fontHeight, "", TextAlign::Left);
myDebuggerWidthLabel->setFlags(WIDGET_CLEARBG); myDebuggerWidthLabel->setFlags(WIDGET_CLEARBG);
ypos += lineHeight + VGAP; ypos += lineHeight + VGAP;
@ -444,7 +444,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
myDebuggerHeightLabel = myDebuggerHeightLabel =
new StaticTextWidget(myTab, font, new StaticTextWidget(myTab, font,
xpos + myDebuggerHeightSlider->getWidth() + 4, xpos + myDebuggerHeightSlider->getWidth() + 4,
ypos + 1, 4 * fontWidth, fontHeight, "", kTextAlignLeft); ypos + 1, 4 * fontWidth, fontHeight, "", TextAlign::Left);
myDebuggerHeightLabel->setFlags(WIDGET_CLEARBG); myDebuggerHeightLabel->setFlags(WIDGET_CLEARBG);
// Add message concerning usage // Add message concerning usage
@ -472,7 +472,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
addToFocusList(wid, myTab, tabID); addToFocusList(wid, myTab, tabID);
#else #else
new StaticTextWidget(myTab, font, 0, 20, _w - 20, fontHeight, new StaticTextWidget(myTab, font, 0, 20, _w - 20, fontHeight,
"Debugger support not included", kTextAlignCenter); "Debugger support not included", TextAlign::Center);
#endif #endif
addToFocusList(wid, myTab, tabID); addToFocusList(wid, myTab, tabID);

View File

@ -83,7 +83,7 @@ void EditTextWidget::drawWidget(bool hilite)
adjustOffset(); adjustOffset();
s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(), s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(),
!_changed ? _textcolor : uInt32(kDbgChangedTextColor), !_changed ? _textcolor : uInt32(kDbgChangedTextColor),
kTextAlignLeft, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
// Draw the caret // Draw the caret
drawCaret(); drawCaret();

View File

@ -108,7 +108,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
xpos = 10; ypos = 5 + myActionsList->getHeight() + 5; xpos = 10; ypos = 5 + myActionsList->getHeight() + 5;
StaticTextWidget* t; StaticTextWidget* t;
t = new StaticTextWidget(boss, font, xpos, ypos+2, font.getStringWidth("Action"), t = new StaticTextWidget(boss, font, xpos, ypos+2, font.getStringWidth("Action"),
fontHeight, "Action", kTextAlignLeft); fontHeight, "Action", TextAlign::Left);
t->setFlags(WIDGET_CLEARBG); t->setFlags(WIDGET_CLEARBG);
myKeyMapping = new EditTextWidget(boss, font, xpos + t->getWidth() + 8, ypos, myKeyMapping = new EditTextWidget(boss, font, xpos + t->getWidth() + 8, ypos,

View File

@ -76,49 +76,49 @@ GameInfoDialog::GameInfoDialog(
lwidth = font.getStringWidth("Manufacturer "); lwidth = font.getStringWidth("Manufacturer ");
fwidth = _w - xpos - lwidth - hSpace - hBorder * 2; fwidth = _w - xpos - lwidth - hSpace - hBorder * 2;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Name", kTextAlignLeft); "Name", TextAlign::Left);
myName = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1, myName = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, ""); fwidth, lineHeight, "");
wid.push_back(myName); wid.push_back(myName);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"MD5", kTextAlignLeft); "MD5", TextAlign::Left);
myMD5 = new EditTextWidget(myTab, font, xpos + lwidth, ypos-1, myMD5 = new EditTextWidget(myTab, font, xpos + lwidth, ypos-1,
fwidth, lineHeight, ""); fwidth, lineHeight, "");
myMD5->setEditable(false); myMD5->setEditable(false);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Manufacturer", kTextAlignLeft); "Manufacturer", TextAlign::Left);
myManufacturer = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1, myManufacturer = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, ""); fwidth, lineHeight, "");
wid.push_back(myManufacturer); wid.push_back(myManufacturer);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Model", kTextAlignLeft); "Model", TextAlign::Left);
myModelNo = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1, myModelNo = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, ""); fwidth, lineHeight, "");
wid.push_back(myModelNo); wid.push_back(myModelNo);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Rarity", kTextAlignLeft); "Rarity", TextAlign::Left);
myRarity = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1, myRarity = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, ""); fwidth, lineHeight, "");
wid.push_back(myRarity); wid.push_back(myRarity);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Note", kTextAlignLeft); "Note", TextAlign::Left);
myNote = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1, myNote = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
fwidth, lineHeight, ""); fwidth, lineHeight, "");
wid.push_back(myNote); wid.push_back(myNote);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Sound", kTextAlignLeft); "Sound", TextAlign::Left);
pwidth = font.getStringWidth("Stereo"); pwidth = font.getStringWidth("Stereo");
items.clear(); items.clear();
VarList::push_back(items, "Mono", "MONO"); VarList::push_back(items, "Mono", "MONO");
@ -129,7 +129,7 @@ GameInfoDialog::GameInfoDialog(
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Type", kTextAlignLeft); "Type", TextAlign::Left);
pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)"); pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)");
items.clear(); items.clear();
for(int i = 0; i < int(BSType::NumSchemes); ++i) for(int i = 0; i < int(BSType::NumSchemes); ++i)
@ -150,7 +150,7 @@ GameInfoDialog::GameInfoDialog(
lwidth = font.getStringWidth("Right Difficulty "); lwidth = font.getStringWidth("Right Difficulty ");
pwidth = font.getStringWidth("B & W"); pwidth = font.getStringWidth("B & W");
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Left Difficulty", kTextAlignLeft); "Left Difficulty", TextAlign::Left);
items.clear(); items.clear();
VarList::push_back(items, "B", "B"); VarList::push_back(items, "B", "B");
VarList::push_back(items, "A", "A"); VarList::push_back(items, "A", "A");
@ -160,7 +160,7 @@ GameInfoDialog::GameInfoDialog(
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"Right Difficulty", kTextAlignLeft); "Right Difficulty", TextAlign::Left);
// ... use same items as above // ... use same items as above
myRightDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos, myRightDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
pwidth, lineHeight, items, "", 0, 0); pwidth, lineHeight, items, "", 0, 0);
@ -168,7 +168,7 @@ GameInfoDialog::GameInfoDialog(
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
"TV Type", kTextAlignLeft); "TV Type", TextAlign::Left);
items.clear(); items.clear();
VarList::push_back(items, "Color", "COLOR"); VarList::push_back(items, "Color", "COLOR");
VarList::push_back(items, "B & W", "BW"); VarList::push_back(items, "B & W", "BW");
@ -187,7 +187,7 @@ GameInfoDialog::GameInfoDialog(
ypos = vBorder; ypos = vBorder;
pwidth = font.getStringWidth("Paddles_IAxis"); pwidth = font.getStringWidth("Paddles_IAxis");
myP0Label = new StaticTextWidget(myTab, font, hSpace, ypos+1, myP0Label = new StaticTextWidget(myTab, font, hSpace, ypos+1,
"P0 Controller ", kTextAlignLeft); "P0 Controller ", TextAlign::Left);
ctrls.clear(); ctrls.clear();
VarList::push_back(ctrls, "Joystick", "JOYSTICK" ); VarList::push_back(ctrls, "Joystick", "JOYSTICK" );
VarList::push_back(ctrls, "Paddles", "PADDLES" ); VarList::push_back(ctrls, "Paddles", "PADDLES" );
@ -213,7 +213,7 @@ GameInfoDialog::GameInfoDialog(
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
pwidth = font.getStringWidth("Paddles_IAxis"); pwidth = font.getStringWidth("Paddles_IAxis");
myP1Label = new StaticTextWidget(myTab, font, hSpace, ypos+1, myP1Label = new StaticTextWidget(myTab, font, hSpace, ypos+1,
"P1 Controller ", kTextAlignLeft); "P1 Controller ", TextAlign::Left);
myP1Controller = new PopUpWidget(myTab, font, myP1Label->getRight(), myP1Label->getTop()-1, myP1Controller = new PopUpWidget(myTab, font, myP1Label->getRight(), myP1Label->getTop()-1,
pwidth, lineHeight, ctrls, "", 0, kRightCChanged); pwidth, lineHeight, ctrls, "", 0, kRightCChanged);
wid.push_back(myP1Controller); wid.push_back(myP1Controller);
@ -281,7 +281,7 @@ GameInfoDialog::GameInfoDialog(
myMouseRangeLabel = new StaticTextWidget(myTab, font, myMouseRangeLabel = new StaticTextWidget(myTab, font,
myMouseRange->getRight() + 4, myMouseRange->getTop()+1, myMouseRange->getRight() + 4, myMouseRange->getTop()+1,
" ", kTextAlignLeft); " ", TextAlign::Left);
myMouseRangeLabel->setFlags(WIDGET_CLEARBG); myMouseRangeLabel->setFlags(WIDGET_CLEARBG);
// Add items for tab 2 // Add items for tab 2
@ -294,7 +294,7 @@ GameInfoDialog::GameInfoDialog(
ypos = vBorder; ypos = vBorder;
pwidth = font.getStringWidth("Auto-detect"); pwidth = font.getStringWidth("Auto-detect");
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Format ", kTextAlignLeft); t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Format ", TextAlign::Left);
items.clear(); items.clear();
VarList::push_back(items, "Auto-detect", "AUTO"); VarList::push_back(items, "Auto-detect", "AUTO");
VarList::push_back(items, "NTSC", "NTSC"); VarList::push_back(items, "NTSC", "NTSC");
@ -308,25 +308,25 @@ GameInfoDialog::GameInfoDialog(
wid.push_back(myFormat); wid.push_back(myFormat);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "YStart ", kTextAlignLeft); t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "YStart ", TextAlign::Left);
myYStart = new SliderWidget(myTab, font, t->getRight(), ypos, 8*fontWidth, lineHeight, myYStart = new SliderWidget(myTab, font, t->getRight(), ypos, 8*fontWidth, lineHeight,
"", 0, kYStartChanged); "", 0, kYStartChanged);
myYStart->setMinValue(TIAConstants::minYStart-1); myYStart->setMinValue(TIAConstants::minYStart-1);
myYStart->setMaxValue(TIAConstants::maxYStart); myYStart->setMaxValue(TIAConstants::maxYStart);
wid.push_back(myYStart); wid.push_back(myYStart);
myYStartLabel = new StaticTextWidget(myTab, font, myYStart->getRight() + 4, myYStartLabel = new StaticTextWidget(myTab, font, myYStart->getRight() + 4,
ypos+1, 5*fontWidth, fontHeight, "", kTextAlignLeft); ypos+1, 5*fontWidth, fontHeight, "", TextAlign::Left);
myYStartLabel->setFlags(WIDGET_CLEARBG); myYStartLabel->setFlags(WIDGET_CLEARBG);
ypos += lineHeight + vGap; ypos += lineHeight + vGap;
t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Height ", kTextAlignLeft); t = new StaticTextWidget(myTab, font, hSpace, ypos+1, "Height ", TextAlign::Left);
myHeight = new SliderWidget(myTab, font, t->getRight(), ypos, 8*fontWidth, lineHeight, myHeight = new SliderWidget(myTab, font, t->getRight(), ypos, 8*fontWidth, lineHeight,
"", 0, kHeightChanged); "", 0, kHeightChanged);
myHeight->setMinValue(TIAConstants::minViewableHeight-1); myHeight->setMinValue(TIAConstants::minViewableHeight-1);
myHeight->setMaxValue(TIAConstants::maxViewableHeight); myHeight->setMaxValue(TIAConstants::maxViewableHeight);
wid.push_back(myHeight); wid.push_back(myHeight);
myHeightLabel = new StaticTextWidget(myTab, font, myHeight->getRight() + 4, myHeightLabel = new StaticTextWidget(myTab, font, myHeight->getRight() + 4,
ypos+1, 5*fontWidth, fontHeight, "", kTextAlignLeft); ypos+1, 5*fontWidth, fontHeight, "", TextAlign::Left);
myHeightLabel->setFlags(WIDGET_CLEARBG); myHeightLabel->setFlags(WIDGET_CLEARBG);
// Phosphor // Phosphor
@ -344,7 +344,7 @@ GameInfoDialog::GameInfoDialog(
myPPBlendLabel = new StaticTextWidget(myTab, font, myPPBlendLabel = new StaticTextWidget(myTab, font,
myPPBlend->getRight() + 4, myPhosphor->getTop(), myPPBlend->getRight() + 4, myPhosphor->getTop(),
5*fontWidth, fontHeight, "", kTextAlignLeft); 5*fontWidth, fontHeight, "", TextAlign::Left);
myPPBlendLabel->setFlags(WIDGET_CLEARBG); myPPBlendLabel->setFlags(WIDGET_CLEARBG);
// Add items for tab 3 // Add items for tab 3
@ -359,7 +359,7 @@ GameInfoDialog::GameInfoDialog(
new StaticTextWidget(this, ifont, hSpace, _h - (buttonHeight + fontHeight + 20), new StaticTextWidget(this, ifont, hSpace, _h - (buttonHeight + fontHeight + 20),
lwidth, fontHeight, lwidth, fontHeight,
"(*) Changes to properties require a ROM reload", "(*) Changes to properties require a ROM reload",
kTextAlignLeft); TextAlign::Left);
// Add Defaults, OK and Cancel buttons // Add Defaults, OK and Cancel buttons
wid.clear(); wid.clear();

View File

@ -53,7 +53,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
// Bankswitch type // Bankswitch type
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
"Bankswitch type", kTextAlignLeft); "Bankswitch type", TextAlign::Left);
for(int i = 0; i < int(BSType::NumSchemes); ++i) for(int i = 0; i < int(BSType::NumSchemes); ++i)
VarList::push_back(items, BSList[i].desc, BSList[i].name); VarList::push_back(items, BSList[i].desc, BSList[i].name);
myBSType = new PopUpWidget(this, font, xpos+lwidth, ypos, myBSType = new PopUpWidget(this, font, xpos+lwidth, ypos,
@ -64,7 +64,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
// Left difficulty // Left difficulty
pwidth = font.getStringWidth("Debugger"); pwidth = font.getStringWidth("Debugger");
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
"Left Difficulty", kTextAlignLeft); "Left Difficulty", TextAlign::Left);
items.clear(); items.clear();
VarList::push_back(items, "Default", "DEFAULT"); VarList::push_back(items, "Default", "DEFAULT");
VarList::push_back(items, "B", "B"); VarList::push_back(items, "B", "B");
@ -76,7 +76,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
// Right difficulty // Right difficulty
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
"Right Difficulty", kTextAlignLeft); "Right Difficulty", TextAlign::Left);
// ... use same items as above // ... use same items as above
myRightDiff = new PopUpWidget(this, font, xpos+lwidth, ypos, myRightDiff = new PopUpWidget(this, font, xpos+lwidth, ypos,
pwidth, lineHeight, items, "", 0, 0); pwidth, lineHeight, items, "", 0, 0);
@ -85,7 +85,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
// TV type // TV type
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
"TV Type", kTextAlignLeft); "TV Type", TextAlign::Left);
items.clear(); items.clear();
VarList::push_back(items, "Default", "DEFAULT"); VarList::push_back(items, "Default", "DEFAULT");
VarList::push_back(items, "Color", "COLOR"); VarList::push_back(items, "Color", "COLOR");
@ -97,7 +97,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
// Start in debugger mode // Start in debugger mode
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
"Startup Mode", kTextAlignLeft); "Startup Mode", TextAlign::Left);
items.clear(); items.clear();
VarList::push_back(items, "Console", "false"); VarList::push_back(items, "Console", "false");
VarList::push_back(items, "Debugger", "true"); VarList::push_back(items, "Debugger", "true");
@ -110,15 +110,15 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
new StaticTextWidget(this, font, xpos, ypos+1, new StaticTextWidget(this, font, xpos, ypos+1,
font.getStringWidth("Start console with the following held down:"), font.getStringWidth("Start console with the following held down:"),
fontHeight, "Start console with the following held down:", fontHeight, "Start console with the following held down:",
kTextAlignLeft); TextAlign::Left);
xpos += 10; ypos += lineHeight; xpos += 10; ypos += lineHeight;
new StaticTextWidget(this, infofont, xpos, ypos+1, _w - 40, infofont.getFontHeight(), new StaticTextWidget(this, infofont, xpos, ypos+1, _w - 40, infofont.getFontHeight(),
"(*) Buttons are automatically released shortly", "(*) Buttons are automatically released shortly",
kTextAlignLeft); TextAlign::Left);
ypos += infofont.getLineHeight(); ypos += infofont.getLineHeight();
new StaticTextWidget(this, infofont, xpos, ypos+1, _w - 40, infofont.getFontHeight(), new StaticTextWidget(this, infofont, xpos, ypos+1, _w - 40, infofont.getFontHeight(),
" after emulation has started", " after emulation has started",
kTextAlignLeft); TextAlign::Left);
// Start with console joystick direction/buttons held down // Start with console joystick direction/buttons held down
xpos = 30; ypos += lineHeight + 10; xpos = 30; ypos += lineHeight + 10;
@ -127,10 +127,10 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
// Add message concerning usage // Add message concerning usage
xpos = 10; ypos += 2 * fontHeight; xpos = 10; ypos += 2 * fontHeight;
new StaticTextWidget(this, infofont, xpos, ypos, _w - 20, infofont.getFontHeight(), new StaticTextWidget(this, infofont, xpos, ypos, _w - 20, infofont.getFontHeight(),
"(*) These options are not saved, but apply to all", kTextAlignLeft); "(*) These options are not saved, but apply to all", TextAlign::Left);
ypos += infofont.getLineHeight(); ypos += infofont.getLineHeight();
new StaticTextWidget(this, infofont, xpos, ypos, _w - 20, infofont.getFontHeight(), new StaticTextWidget(this, infofont, xpos, ypos, _w - 20, infofont.getFontHeight(),
" further ROMs until clicking 'Defaults'", kTextAlignLeft); " further ROMs until clicking 'Defaults'", TextAlign::Left);
// Add Defaults, OK and Cancel buttons // Add Defaults, OK and Cancel buttons
ButtonWidget* b; ButtonWidget* b;
@ -152,7 +152,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y,
// Left joystick // Left joystick
StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos+2, StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos+2,
font.getStringWidth("Left Joy"), fontHeight, "Left Joy", font.getStringWidth("Left Joy"), fontHeight, "Left Joy",
kTextAlignLeft); TextAlign::Left);
xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10; xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10;
myJoy[kJ0Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ0Up); myJoy[kJ0Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ0Up);
ypos += myJoy[kJ0Up]->getHeight() * 2 + 10; ypos += myJoy[kJ0Up]->getHeight() * 2 + 10;
@ -172,7 +172,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y,
// Right joystick // Right joystick
t = new StaticTextWidget(this, font, xpos, ypos+2, t = new StaticTextWidget(this, font, xpos, ypos+2,
font.getStringWidth("Right Joy"), fontHeight, "Right Joy", font.getStringWidth("Right Joy"), fontHeight, "Right Joy",
kTextAlignLeft); TextAlign::Left);
xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10; xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10;
myJoy[kJ1Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ1Up); myJoy[kJ1Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ1Up);
ypos += myJoy[kJ1Up]->getHeight() * 2 + 10; ypos += myJoy[kJ1Up]->getHeight() * 2 + 10;
@ -191,7 +191,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y,
// Console Select/Reset // Console Select/Reset
t = new StaticTextWidget(this, font, xpos, ypos+2, t = new StaticTextWidget(this, font, xpos, ypos+2,
font.getStringWidth("Console"), fontHeight, "Console", font.getStringWidth("Console"), fontHeight, "Console",
kTextAlignLeft); TextAlign::Left);
xpos -= 10; ypos += t->getHeight() + 10; xpos -= 10; ypos += t->getHeight() + 10;
myHoldSelect = new CheckboxWidget(this, font, xpos, ypos, "Select"); myHoldSelect = new CheckboxWidget(this, font, xpos, ypos, "Select");
ypos += myHoldSelect->getHeight() + 5; ypos += myHoldSelect->getHeight() + 5;

View File

@ -64,7 +64,7 @@ HelpDialog::HelpDialog(OSystem& osystem, DialogContainer& parent,
xpos = 5; ypos = 5; xpos = 5; ypos = 5;
myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight, myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight,
"", kTextAlignCenter); "", TextAlign::Center);
int lwidth = 12 * fontWidth; int lwidth = 12 * fontWidth;
xpos += 5; ypos += lineHeight + 4; xpos += 5; ypos += lineHeight + 4;
@ -72,10 +72,10 @@ HelpDialog::HelpDialog(OSystem& osystem, DialogContainer& parent,
{ {
myKey[i] = myKey[i] =
new StaticTextWidget(this, font, xpos, ypos, lwidth, new StaticTextWidget(this, font, xpos, ypos, lwidth,
fontHeight, "", kTextAlignLeft); fontHeight, "", TextAlign::Left);
myDesc[i] = myDesc[i] =
new StaticTextWidget(this, font, xpos+lwidth, ypos, _w - xpos - lwidth - 5, new StaticTextWidget(this, font, xpos+lwidth, ypos, _w - xpos - lwidth - 5,
fontHeight, "", kTextAlignLeft); fontHeight, "", TextAlign::Left);
ypos += fontHeight; ypos += fontHeight;
} }

View File

@ -162,7 +162,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
myDeadzone->setMinValue(0); myDeadzone->setMaxValue(29); myDeadzone->setMinValue(0); myDeadzone->setMaxValue(29);
xpos = hSpace + myDeadzone->getWidth() + 5; xpos = hSpace + myDeadzone->getWidth() + 5;
myDeadzoneLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 5*fontWidth, myDeadzoneLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 5*fontWidth,
lineHeight, "", kTextAlignLeft); lineHeight, "", TextAlign::Left);
myDeadzoneLabel->setFlags(WIDGET_CLEARBG); myDeadzoneLabel->setFlags(WIDGET_CLEARBG);
wid.push_back(myDeadzone); wid.push_back(myDeadzone);
@ -174,7 +174,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
myDPaddleSpeed->setMinValue(1); myDPaddleSpeed->setMaxValue(20); myDPaddleSpeed->setMinValue(1); myDPaddleSpeed->setMaxValue(20);
xpos = hSpace + myDPaddleSpeed->getWidth() + 5; xpos = hSpace + myDPaddleSpeed->getWidth() + 5;
myDPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, myDPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
"", kTextAlignLeft); "", TextAlign::Left);
myDPaddleLabel->setFlags(WIDGET_CLEARBG); myDPaddleLabel->setFlags(WIDGET_CLEARBG);
wid.push_back(myDPaddleSpeed); wid.push_back(myDPaddleSpeed);
@ -186,7 +186,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
myMPaddleSpeed->setMinValue(1); myMPaddleSpeed->setMaxValue(20); myMPaddleSpeed->setMinValue(1); myMPaddleSpeed->setMaxValue(20);
xpos = hSpace + myMPaddleSpeed->getWidth() + 5; xpos = hSpace + myMPaddleSpeed->getWidth() + 5;
myMPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, myMPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
"", kTextAlignLeft); "", TextAlign::Left);
myMPaddleSpeed->setFlags(WIDGET_CLEARBG); myMPaddleSpeed->setFlags(WIDGET_CLEARBG);
wid.push_back(myMPaddleSpeed); wid.push_back(myMPaddleSpeed);
@ -198,7 +198,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
myTrackBallSpeed->setMinValue(1); myTrackBallSpeed->setMaxValue(20); myTrackBallSpeed->setMinValue(1); myTrackBallSpeed->setMaxValue(20);
xpos = hSpace + myTrackBallSpeed->getWidth() + 5; xpos = hSpace + myTrackBallSpeed->getWidth() + 5;
myTrackBallLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight, myTrackBallLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
"", kTextAlignLeft); "", TextAlign::Left);
myTrackBallSpeed->setFlags(WIDGET_CLEARBG); myTrackBallSpeed->setFlags(WIDGET_CLEARBG);
wid.push_back(myTrackBallSpeed); wid.push_back(myTrackBallSpeed);

View File

@ -86,7 +86,7 @@ void InputTextDialog::initialize(const GUI::Font& lfont, const GUI::Font& nfont,
xpos = 10; xpos = 10;
new StaticTextWidget(this, lfont, xpos, ypos + 2, new StaticTextWidget(this, lfont, xpos, ypos + 2,
lwidth, fontHeight, lwidth, fontHeight,
labels[i], kTextAlignLeft); labels[i], TextAlign::Left);
xpos += lwidth + fontWidth; xpos += lwidth + fontWidth;
EditTextWidget* w = new EditTextWidget(this, nfont, xpos, ypos, EditTextWidget* w = new EditTextWidget(this, nfont, xpos, ypos,
@ -99,7 +99,7 @@ void InputTextDialog::initialize(const GUI::Font& lfont, const GUI::Font& nfont,
xpos = 10; xpos = 10;
myTitle = new StaticTextWidget(this, lfont, xpos, ypos, _w - 2*xpos, fontHeight, myTitle = new StaticTextWidget(this, lfont, xpos, ypos, _w - 2*xpos, fontHeight,
"", kTextAlignLeft); "", TextAlign::Left);
myTitle->setTextColor(kTextColorEm); myTitle->setTextColor(kTextColorEm);
addToFocusList(wid); addToFocusList(wid);

View File

@ -46,7 +46,7 @@ JoystickDialog::JoystickDialog(GuiObject* boss, const GUI::Font& font,
ypos = _h - buttonHeight - 10; ypos = _h - buttonHeight - 10;
StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos, StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos,
font.getStringWidth("Joystick ID "), font.getFontHeight(), font.getStringWidth("Joystick ID "), font.getFontHeight(),
"Joystick ID ", kTextAlignLeft); "Joystick ID ", TextAlign::Left);
xpos += t->getWidth() + 4; xpos += t->getWidth() + 4;
myJoyText = new EditTextWidget(this, font, xpos, ypos-2, myJoyText = new EditTextWidget(this, font, xpos, ypos-2,
font.getStringWidth("Unplugged")+8, font.getLineHeight(), ""); font.getStringWidth("Unplugged")+8, font.getLineHeight(), "");

View File

@ -66,13 +66,13 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
lwidth = font.getStringWidth("Select an item from the list ..."); lwidth = font.getStringWidth("Select an item from the list ...");
xpos += 10; ypos += 8; xpos += 10; ypos += 8;
new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight,
"Select an item from the list ...", kTextAlignLeft); "Select an item from the list ...", TextAlign::Left);
lwidth2 = font.getStringWidth("XXXX items found"); lwidth2 = font.getStringWidth("XXXX items found");
xpos = _w - lwidth2 - 10; xpos = _w - lwidth2 - 10;
myRomCount = new StaticTextWidget(this, font, xpos, ypos, myRomCount = new StaticTextWidget(this, font, xpos, ypos,
lwidth2, fontHeight, lwidth2, fontHeight,
"", kTextAlignRight); "", TextAlign::Right);
// Add filter that can narrow the results shown in the listing // Add filter that can narrow the results shown in the listing
// It has to fit between both labels // It has to fit between both labels
@ -116,7 +116,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
xpos += 5; ypos += myList->getHeight() + 4; xpos += 5; ypos += myList->getHeight() + 4;
lwidth = font.getStringWidth("Dir "); lwidth = font.getStringWidth("Dir ");
myDirLabel = new StaticTextWidget(this, font, xpos, ypos+2, lwidth, fontHeight, myDirLabel = new StaticTextWidget(this, font, xpos, ypos+2, lwidth, fontHeight,
"Dir", kTextAlignLeft); "Dir", TextAlign::Left);
xpos += lwidth + 5; xpos += lwidth + 5;
myDir = new EditTextWidget(this, font, xpos, ypos, _w - xpos - 10, lineHeight, ""); myDir = new EditTextWidget(this, font, xpos, ypos, _w - xpos - 10, lineHeight, "");
myDir->setEditable(false, true); myDir->setEditable(false, true);
@ -481,7 +481,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
if(result == EmptyString) if(result == EmptyString)
instance().settings().setValue("lastrom", myList->getSelectedString()); instance().settings().setValue("lastrom", myList->getSelectedString());
else else
instance().frameBuffer().showMessage(result, kMiddleCenter, true); instance().frameBuffer().showMessage(result, MessagePosition::MiddleCenter, true);
} }
} }
break; break;

View File

@ -70,7 +70,7 @@ void MessageBox::addText(const GUI::Font& font, const StringList& text)
for(const auto& s: text) for(const auto& s: text)
{ {
new StaticTextWidget(this, font, xpos, ypos, _w - 20, new StaticTextWidget(this, font, xpos, ypos, _w - 20,
fontHeight, s, kTextAlignLeft); fontHeight, s, TextAlign::Left);
ypos += fontHeight; ypos += fontHeight;
} }
} }

View File

@ -188,7 +188,7 @@ void PopUpWidget::drawWidget(bool hilite)
// Draw the label, if any // Draw the label, if any
if (_labelWidth > 0) if (_labelWidth > 0)
s.drawString(_font, _label, _x, _y + myTextY, _labelWidth, s.drawString(_font, _label, _x, _y + myTextY, _labelWidth,
isEnabled() ? _textcolor : uInt32(kColor), kTextAlignRight); isEnabled() ? _textcolor : uInt32(kColor), TextAlign::Right);
// Draw a thin frame around us. // Draw a thin frame around us.
s.hLine(x, _y, x + w - 1, kColor); s.hLine(x, _y, x + w - 1, kColor);
@ -205,8 +205,8 @@ void PopUpWidget::drawWidget(bool hilite)
// Draw the selected entry, if any // Draw the selected entry, if any
const string& name = myMenu->getSelectedName(); const string& name = myMenu->getSelectedName();
TextAlignment align = (_font.getStringWidth(name) > w-6) ? TextAlign align = (_font.getStringWidth(name) > w-6) ?
kTextAlignRight : kTextAlignLeft; TextAlign::Right : TextAlign::Left;
s.drawString(_font, name, x+2, _y+myTextY, w-6, s.drawString(_font, name, x+2, _y+myTextY, w-6,
!isEnabled() ? kColor : kTextColor, align); !isEnabled() ? kColor : kTextColor, align);
} }

View File

@ -46,7 +46,7 @@ ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font,
xpos = fontWidth; ypos = lineHeight; xpos = fontWidth; ypos = lineHeight;
myMessage = new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, myMessage = new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight,
message, kTextAlignCenter); message, TextAlign::Center);
myMessage->setTextColor(kTextColorEm); myMessage->setTextColor(kTextColorEm);
xpos = fontWidth; ypos += 2 * lineHeight; xpos = fontWidth; ypos += 2 * lineHeight;

View File

@ -69,13 +69,13 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent,
// Show results of ROM audit // Show results of ROM audit
ypos += buttonHeight + 16; ypos += buttonHeight + 16;
new StaticTextWidget(this, font, hBorder, ypos, lwidth, fontHeight, new StaticTextWidget(this, font, hBorder, ypos, lwidth, fontHeight,
"ROMs with properties (renamed) ", kTextAlignLeft); "ROMs with properties (renamed) ", TextAlign::Left);
myResults1 = new EditTextWidget(this, font, hBorder + lwidth, ypos - 2, myResults1 = new EditTextWidget(this, font, hBorder + lwidth, ypos - 2,
_w - hBorder*2 - lwidth, lineHeight, ""); _w - hBorder*2 - lwidth, lineHeight, "");
myResults1->setEditable(false, true); myResults1->setEditable(false, true);
ypos += buttonHeight; ypos += buttonHeight;
new StaticTextWidget(this, font, hBorder, ypos, lwidth, fontHeight, new StaticTextWidget(this, font, hBorder, ypos, lwidth, fontHeight,
"ROMs without properties (skipped) ", kTextAlignLeft); "ROMs without properties (skipped) ", TextAlign::Left);
myResults2 = new EditTextWidget(this, font, hBorder + lwidth, ypos - 2, myResults2 = new EditTextWidget(this, font, hBorder + lwidth, ypos - 2,
_w - hBorder*2 - lwidth, lineHeight, ""); _w - hBorder*2 - lwidth, lineHeight, "");
myResults2->setEditable(false, true); myResults2->setEditable(false, true);
@ -83,7 +83,7 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent,
ypos += buttonHeight + 8; ypos += buttonHeight + 8;
new StaticTextWidget(this, font, hBorder, ypos, _w - 20, fontHeight, new StaticTextWidget(this, font, hBorder, ypos, _w - 20, fontHeight,
"(*) WARNING: operation cannot be undone!", "(*) WARNING: operation cannot be undone!",
kTextAlignLeft); TextAlign::Left);
// Add OK and Cancel buttons // Add OK and Cancel buttons
addOKCancelBGroup(wid, font, "Audit", "Done"); addOKCancelBGroup(wid, font, "Audit", "Done");

View File

@ -99,7 +99,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
fwidth = font.getStringWidth("When saving snapshots:"); fwidth = font.getStringWidth("When saving snapshots:");
xpos = vBorder; ypos += buttonHeight + 5; xpos = vBorder; ypos += buttonHeight + 5;
new StaticTextWidget(this, font, xpos, ypos, fwidth, lineHeight, new StaticTextWidget(this, font, xpos, ypos, fwidth, lineHeight,
"When saving snapshots:", kTextAlignLeft); "When saving snapshots:", TextAlign::Left);
// Snapshot single or multiple saves // Snapshot single or multiple saves
xpos += 30; ypos += lineHeight + 3; xpos += 30; ypos += lineHeight + 3;

View File

@ -69,7 +69,7 @@ void StringListWidget::drawWidget(bool hilite)
{ {
adjustOffset(); adjustOffset();
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor, s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
kTextAlignLeft, -_editScrollOffset, false); TextAlign::Left, -_editScrollOffset, false);
} }
else else
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor); s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor);

View File

@ -289,7 +289,7 @@ void TabWidget::drawWidget(bool hilite)
box(x, _y + yOffset, _tabWidth, _tabHeight - yOffset, boxcolor, boxcolor, (i == _activeTab)); box(x, _y + yOffset, _tabWidth, _tabHeight - yOffset, boxcolor, boxcolor, (i == _activeTab));
s.drawString(_font, _tabs[i].title, x + kTabPadding, s.drawString(_font, _tabs[i].title, x + kTabPadding,
_y + yOffset / 2 + (_tabHeight - _fontHeight - 1), _y + yOffset / 2 + (_tabHeight - _fontHeight - 1),
_tabWidth - 2 * kTabPadding, fontcolor, kTextAlignCenter); _tabWidth - 2 * kTabPadding, fontcolor, TextAlign::Center);
x += _tabWidth + kTabSpacing; x += _tabWidth + kTabSpacing;
} }

View File

@ -76,7 +76,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
myLauncherWidthLabel = myLauncherWidthLabel =
new StaticTextWidget(myTab, font, new StaticTextWidget(myTab, font,
xpos + myLauncherWidthSlider->getWidth() + 4, xpos + myLauncherWidthSlider->getWidth() + 4,
ypos + 1, 4*fontWidth, fontHeight, "", kTextAlignLeft); ypos + 1, 4*fontWidth, fontHeight, "", TextAlign::Left);
myLauncherWidthLabel->setFlags(WIDGET_CLEARBG); myLauncherWidthLabel->setFlags(WIDGET_CLEARBG);
ypos += lineHeight + 4; ypos += lineHeight + 4;
@ -90,7 +90,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
myLauncherHeightLabel = myLauncherHeightLabel =
new StaticTextWidget(myTab, font, new StaticTextWidget(myTab, font,
xpos + myLauncherHeightSlider->getWidth() + 4, xpos + myLauncherHeightSlider->getWidth() + 4,
ypos + 1, 4*fontWidth, fontHeight, "", kTextAlignLeft); ypos + 1, 4*fontWidth, fontHeight, "", TextAlign::Left);
myLauncherHeightLabel->setFlags(WIDGET_CLEARBG); myLauncherHeightLabel->setFlags(WIDGET_CLEARBG);
ypos += lineHeight + 4; ypos += lineHeight + 4;
@ -133,7 +133,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
lwidth = ifont.getStringWidth("(*) Changes require application restart"); lwidth = ifont.getStringWidth("(*) Changes require application restart");
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight, new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
"(*) Changes require application restart", "(*) Changes require application restart",
kTextAlignLeft); TextAlign::Left);
// Add items for tab 0 // Add items for tab 0
addToFocusList(wid, myTab, tabID); addToFocusList(wid, myTab, tabID);
@ -194,7 +194,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
lwidth = ifont.getStringWidth("(*) Requires application restart"); lwidth = ifont.getStringWidth("(*) Requires application restart");
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight, new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
"(*) Requires application restart", "(*) Requires application restart",
kTextAlignLeft); TextAlign::Left);
// Add items for tab 2 // Add items for tab 2
addToFocusList(wid, myTab, tabID); addToFocusList(wid, myTab, tabID);

View File

@ -115,7 +115,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(myNAspectRatio); wid.push_back(myNAspectRatio);
myNAspectRatioLabel = myNAspectRatioLabel =
new StaticTextWidget(myTab, font, xpos + myNAspectRatio->getWidth() + 4, new StaticTextWidget(myTab, font, xpos + myNAspectRatio->getWidth() + 4,
ypos + 1, fontWidth * 3, fontHeight, "", kTextAlignLeft); ypos + 1, fontWidth * 3, fontHeight, "", TextAlign::Left);
myNAspectRatioLabel->setFlags(WIDGET_CLEARBG); myNAspectRatioLabel->setFlags(WIDGET_CLEARBG);
ypos += lineHeight + VGAP; ypos += lineHeight + VGAP;
@ -127,7 +127,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(myPAspectRatio); wid.push_back(myPAspectRatio);
myPAspectRatioLabel = myPAspectRatioLabel =
new StaticTextWidget(myTab, font, xpos + myPAspectRatio->getWidth() + 4, new StaticTextWidget(myTab, font, xpos + myPAspectRatio->getWidth() + 4,
ypos + 1, fontWidth * 3, fontHeight, "", kTextAlignLeft); ypos + 1, fontWidth * 3, fontHeight, "", TextAlign::Left);
myPAspectRatioLabel->setFlags(WIDGET_CLEARBG); myPAspectRatioLabel->setFlags(WIDGET_CLEARBG);
ypos += lineHeight + VGAP; ypos += lineHeight + VGAP;
@ -140,7 +140,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(myFrameRate); wid.push_back(myFrameRate);
myFrameRateLabel = myFrameRateLabel =
new StaticTextWidget(myTab, font, xpos + myFrameRate->getWidth() + 4, new StaticTextWidget(myTab, font, xpos + myFrameRate->getWidth() + 4,
ypos + 1, fontWidth * 4, fontHeight, "", kTextAlignLeft); ypos + 1, fontWidth * 4, fontHeight, "", TextAlign::Left);
myFrameRateLabel->setFlags(WIDGET_CLEARBG); myFrameRateLabel->setFlags(WIDGET_CLEARBG);
// Add message concerning usage // Add message concerning usage
@ -148,7 +148,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
ypos = myTab->getHeight() - 5 - fontHeight - infofont.getFontHeight() - 10; ypos = myTab->getHeight() - 5 - fontHeight - infofont.getFontHeight() - 10;
new StaticTextWidget(myTab, infofont, 10, ypos, new StaticTextWidget(myTab, infofont, 10, ypos,
font.getStringWidth("(*) Requires application restart"), fontHeight, font.getStringWidth("(*) Requires application restart"), fontHeight,
"(*) Requires application restart", kTextAlignLeft); "(*) Requires application restart", TextAlign::Left);
// Move over to the next column // Move over to the next column
xpos += myNAspectRatio->getWidth() + myNAspectRatioLabel->getWidth() + 30; xpos += myNAspectRatio->getWidth() + myNAspectRatioLabel->getWidth() + 30;
@ -228,7 +228,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(myTV ## obj); \ wid.push_back(myTV ## obj); \
myTV ## obj ## Label = \ myTV ## obj ## Label = \
new StaticTextWidget(myTab, font, xpos+myTV ## obj->getWidth()+4, \ new StaticTextWidget(myTab, font, xpos+myTV ## obj->getWidth()+4, \
ypos+1, fontWidth*3, fontHeight, "", kTextAlignLeft);\ ypos+1, fontWidth*3, fontHeight, "", TextAlign::Left);\
myTV ## obj->setFlags(WIDGET_CLEARBG); \ myTV ## obj->setFlags(WIDGET_CLEARBG); \
ypos += lineHeight + VGAP; ypos += lineHeight + VGAP;
@ -269,7 +269,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
xpos -= 8+8; xpos -= 8+8;
myTVScanLabel = myTVScanLabel =
new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings"), new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings"),
fontHeight, "Scanline settings", kTextAlignLeft); fontHeight, "Scanline settings", TextAlign::Left);
ypos += lineHeight; ypos += lineHeight;
xpos += 8+8; xpos += 8+8;

View File

@ -268,7 +268,7 @@ Widget* Widget::setFocusForChain(GuiObject* boss, WidgetArray& arr,
else else
tmp->_hasFocus = true; tmp->_hasFocus = true;
s.frameRect(x, y, w, h, kWidFrameColor, kDashLine); s.frameRect(x, y, w, h, kWidFrameColor, FrameStyle::Dashed);
tmp->setDirty(); tmp->setDirty();
s.setDirty(); s.setDirty();
@ -289,7 +289,7 @@ void Widget::setDirtyInChain(Widget* start)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int x, int y, int w, int h,
const string& text, TextAlignment align) const string& text, TextAlign align)
: Widget(boss, font, x, y, w, h), : Widget(boss, font, x, y, w, h),
_align(align) _align(align)
{ {
@ -306,7 +306,7 @@ StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int x, int y,
const string& text, TextAlignment align) const string& text, TextAlign align)
: StaticTextWidget(boss, font, x, y, font.getStringWidth(text), font.getLineHeight(), text, align) : StaticTextWidget(boss, font, x, y, font.getStringWidth(text), font.getLineHeight(), text, align)
{ {
} }
@ -341,7 +341,7 @@ void StaticTextWidget::drawWidget(bool hilite)
ButtonWidget::ButtonWidget(GuiObject* boss, const GUI::Font& font, ButtonWidget::ButtonWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int x, int y, int w, int h,
const string& label, int cmd) const string& label, int cmd)
: StaticTextWidget(boss, font, x, y, w, h, label, kTextAlignCenter), : StaticTextWidget(boss, font, x, y, w, h, label, TextAlign::Center),
CommandSender(boss), CommandSender(boss),
_cmd(cmd) _cmd(cmd)
{ {
@ -704,7 +704,7 @@ void SliderWidget::drawWidget(bool hilite)
// Draw the label, if any // Draw the label, if any
if(_labelWidth > 0) if(_labelWidth > 0)
s.drawString(_font, _label, _x, _y + 2, _labelWidth, s.drawString(_font, _label, _x, _y + 2, _labelWidth,
isEnabled() ? kTextColor : kColor, kTextAlignRight); isEnabled() ? kTextColor : kColor, TextAlign::Right);
// Draw the box // Draw the box
s.box(_x + _labelWidth, _y, _w - _labelWidth, _h, kColor, kShadowColor); s.box(_x + _labelWidth, _y, _w - _labelWidth, _h, kColor, kShadowColor);

View File

@ -176,23 +176,23 @@ class StaticTextWidget : public Widget
public: public:
StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int x, int y, int w, int h,
const string& text, TextAlignment align = kTextAlignLeft); const string& text, TextAlign align = TextAlign::Left);
StaticTextWidget(GuiObject* boss, const GUI::Font& font, StaticTextWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int x, int y,
const string& text, TextAlignment align = kTextAlignLeft); const string& text, TextAlign align = TextAlign::Left);
void setValue(int value); void setValue(int value);
void setLabel(const string& label); void setLabel(const string& label);
void setAlign(TextAlignment align) { _align = align; } void setAlign(TextAlign align) { _align = align; }
const string& getLabel() const { return _label; } const string& getLabel() const { return _label; }
bool isEditable() const { return _editable; } bool isEditable() const { return _editable; }
protected: protected:
void drawWidget(bool hilite) override; void drawWidget(bool hilite) override;
protected: protected:
string _label; string _label;
bool _editable; bool _editable;
TextAlignment _align; TextAlign _align;
private: private:
// Following constructors and assignment operators not supported // Following constructors and assignment operators not supported