mirror of https://github.com/stella-emu/stella.git
Converted some raw enum to 'enum class' in FrameBufferConstants.
This commit is contained in:
parent
31da99f48b
commit
434d2dfc83
|
@ -42,7 +42,7 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// AudF registers
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2,
|
||||
lwidth, fontHeight,
|
||||
"AUDF", kTextAlignLeft);
|
||||
"AUDF", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
myAudF = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
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),
|
||||
ypos - lineHeight, fontWidth, fontHeight,
|
||||
Common::Base::toString(col, Common::Base::F_16_1),
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
}
|
||||
|
||||
// AudC registers
|
||||
xpos = 10; ypos += lineHeight + 5;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,
|
||||
"AUDC", kTextAlignLeft);
|
||||
"AUDC", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
myAudC = new DataGridWidget(boss, nfont, xpos + int(myAudF->colWidth() / 2.75), ypos,
|
||||
2, 1, 1, 4, Common::Base::F_16_1);
|
||||
|
@ -72,7 +72,7 @@ AudioWidget::AudioWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// AudV registers
|
||||
xpos = 10; ypos += lineHeight + 5;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,
|
||||
"AUDV", kTextAlignLeft);
|
||||
"AUDV", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
myAudV = new DataGridWidget(boss, nfont, xpos + int(myAudF->colWidth() / 2.75), ypos,
|
||||
2, 1, 1, 4, Common::Base::F_16_1);
|
||||
|
|
|
@ -29,7 +29,7 @@ BoosterWidget::BoosterWidget(GuiObject* boss, const GUI::Font& font,
|
|||
StaticTextWidget* t;
|
||||
|
||||
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;
|
||||
myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "",
|
||||
CheckboxWidget::kCheckActionCmd);
|
||||
|
|
|
@ -63,7 +63,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget(
|
|||
label << "Set segment " << i << " as ";
|
||||
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, _font.getStringWidth(label.str()),
|
||||
myFontHeight, label.str(), kTextAlignLeft);
|
||||
myFontHeight, label.str(), TextAlign::Left);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
xpos += 20;
|
||||
|
@ -95,7 +95,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget(
|
|||
label.str("");
|
||||
label << Common::Base::HEX4 << addr1 << "-" << Common::Base::HEX4 << addr2;
|
||||
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;
|
||||
myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s,
|
||||
|
@ -106,7 +106,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget(
|
|||
label.str("");
|
||||
label << Common::Base::HEX4 << (addr2 + 1) << "-" << Common::Base::HEX4 << (addr2 + 1 + 0x1FF);
|
||||
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,
|
||||
w - xoffset - 10, myLineHeight, "");
|
||||
|
|
|
@ -65,7 +65,7 @@ Cartridge3EWidget::Cartridge3EWidget(
|
|||
<< (start+0x7FF) << "): ";
|
||||
|
||||
new StaticTextWidget(_boss, _font, xpos, ypos, _font.getStringWidth(label.str()),
|
||||
myFontHeight, label.str(), kTextAlignLeft);
|
||||
myFontHeight, label.str(), TextAlign::Left);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
xpos += 40;
|
||||
|
|
|
@ -65,7 +65,7 @@ Cartridge4A50Widget::Cartridge4A50Widget(
|
|||
// Lower bank/region configuration
|
||||
xpos = 10;
|
||||
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, lowerlabel, kTextAlignLeft);
|
||||
myFontHeight, lowerlabel, TextAlign::Left);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
xpos += 40;
|
||||
|
@ -85,7 +85,7 @@ Cartridge4A50Widget::Cartridge4A50Widget(
|
|||
// Middle bank/region configuration
|
||||
xpos = 10; ypos += myLineHeight + 14;
|
||||
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, middlelabel, kTextAlignLeft);
|
||||
myFontHeight, middlelabel, TextAlign::Left);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
xpos += 40;
|
||||
|
@ -105,7 +105,7 @@ Cartridge4A50Widget::Cartridge4A50Widget(
|
|||
// High bank/region configuration
|
||||
xpos = 10; ypos += myLineHeight + 14;
|
||||
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, highlabel, kTextAlignLeft);
|
||||
myFontHeight, highlabel, TextAlign::Left);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
xpos += 40;
|
||||
|
|
|
@ -74,7 +74,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
|
|||
xpos = DS_X;
|
||||
ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Datastream Pointers", kTextAlignLeft);
|
||||
myFontHeight, "Datastream Pointers", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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] =
|
||||
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
|
||||
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));
|
||||
}
|
||||
lwidth = _font.getStringWidth("Write Data (stream 16)");
|
||||
myDatastreamLabels[4] =
|
||||
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
|
||||
ypos+myLineHeight-2 + 4*myLineHeight + 2,
|
||||
lwidth, myFontHeight, "Write Data (stream 16)", kTextAlignLeft);
|
||||
lwidth, myFontHeight, "Write Data (stream 16)", TextAlign::Left);
|
||||
myDatastreamLabels[5] =
|
||||
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
|
||||
ypos+myLineHeight-2 + 5*myLineHeight + 2,
|
||||
lwidth, myFontHeight, "Jump Data (stream 17)", kTextAlignLeft);
|
||||
lwidth, myFontHeight, "Jump Data (stream 17)", TextAlign::Left);
|
||||
|
||||
// Datastream Increments
|
||||
xpos = DS_X + myDatastreamPointers->getWidth() + 20;
|
||||
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->setTarget(this);
|
||||
|
@ -120,7 +120,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
|
|||
// Datastream Maps
|
||||
xpos = 0; ypos += myLineHeight*7 + 4;
|
||||
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->setTarget(this);
|
||||
|
@ -129,7 +129,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
|
|||
// Music counters
|
||||
xpos = 10; ypos += myLineHeight*6 + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Counters", kTextAlignLeft);
|
||||
myFontHeight, "Music Counters", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Frequencies", kTextAlignLeft);
|
||||
myFontHeight, "Music Frequencies", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Waveforms", kTextAlignLeft);
|
||||
myFontHeight, "Music Waveforms", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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 lwidth2 = _font.getStringWidth("Sample Pointer ");
|
||||
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->setTarget(this);
|
||||
|
@ -168,7 +168,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
|
|||
// Music waveform sizes
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Waveform Sizes", kTextAlignLeft);
|
||||
myFontHeight, "Music Waveform Sizes", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myMusicWaveformSizes = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2);
|
||||
|
|
|
@ -74,7 +74,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
|
|||
xpos = DS_X;
|
||||
ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Datastream Pointers", kTextAlignLeft);
|
||||
myFontHeight, "Datastream Pointers", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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] =
|
||||
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
|
||||
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));
|
||||
}
|
||||
lwidth = _font.getStringWidth("Write Data (stream 20)");
|
||||
myDatastreamLabels[8] =
|
||||
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
|
||||
ypos+myLineHeight-2 + 8*myLineHeight + 2,
|
||||
lwidth, myFontHeight, "Write Data (stream 20)", kTextAlignLeft);
|
||||
lwidth, myFontHeight, "Write Data (stream 20)", TextAlign::Left);
|
||||
myDatastreamLabels[9] =
|
||||
new StaticTextWidget(_boss, _font, DS_X - _font.getStringWidth("xx "),
|
||||
ypos+myLineHeight-2 + 9*myLineHeight + 2,
|
||||
lwidth, myFontHeight, "Jump Data (stream 21)", kTextAlignLeft);
|
||||
lwidth, myFontHeight, "Jump Data (stream 21)", TextAlign::Left);
|
||||
|
||||
// Datastream Increments
|
||||
xpos = DS_X + myDatastreamPointers->getWidth() + 20;
|
||||
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->setTarget(this);
|
||||
|
@ -121,7 +121,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
|
|||
// Music counters
|
||||
xpos = 10; ypos += myLineHeight*12 + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Counters", kTextAlignLeft);
|
||||
myFontHeight, "Music Counters", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Frequencies", kTextAlignLeft);
|
||||
myFontHeight, "Music Frequencies", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Waveforms", kTextAlignLeft);
|
||||
myFontHeight, "Music Waveforms", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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 lwidth2 = _font.getStringWidth("Sample Pointer ");
|
||||
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->setTarget(this);
|
||||
|
@ -160,7 +160,7 @@ CartridgeCDFWidget::CartridgeCDFWidget(
|
|||
// Music waveform sizes
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Waveform Sizes", kTextAlignLeft);
|
||||
myFontHeight, "Music Waveform Sizes", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myMusicWaveformSizes = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2);
|
||||
|
|
|
@ -61,7 +61,7 @@ CartridgeCMWidget::CartridgeCMWidget(
|
|||
int lwidth = _font.getStringWidth("Current column ");
|
||||
ypos += myLineHeight + 8;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos+2, lwidth, myFontHeight,
|
||||
"Current SWCHA ", kTextAlignLeft);
|
||||
"Current SWCHA ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
mySWCHA = new ToggleBitWidget(boss, _nfont, xpos, ypos, 8, 1);
|
||||
mySWCHA->setTarget(this);
|
||||
|
@ -70,7 +70,7 @@ CartridgeCMWidget::CartridgeCMWidget(
|
|||
// Current column number
|
||||
xpos = 10; ypos += myLineHeight + 5;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Current column ", kTextAlignLeft);
|
||||
myFontHeight, "Current column ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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;
|
||||
lwidth = _font.getStringWidth("Ram State ");
|
||||
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,
|
||||
_nfont.getStringWidth(" Write-only "), myLineHeight, "");
|
||||
myRAM->setEditable(false, true);
|
||||
|
|
|
@ -63,7 +63,7 @@ CartridgeDASHWidget::CartridgeDASHWidget(
|
|||
label << "Set segment " << i << " as: ";
|
||||
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, _font.getStringWidth(label.str()),
|
||||
myFontHeight, label.str(), kTextAlignLeft);
|
||||
myFontHeight, label.str(), TextAlign::Left);
|
||||
ypos += myLineHeight + 8;
|
||||
|
||||
xpos += 20;
|
||||
|
@ -95,7 +95,7 @@ CartridgeDASHWidget::CartridgeDASHWidget(
|
|||
label.str("");
|
||||
label << Common::Base::HEX4 << addr1 << "-" << Common::Base::HEX4 << addr2;
|
||||
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;
|
||||
myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s,
|
||||
|
@ -106,7 +106,7 @@ CartridgeDASHWidget::CartridgeDASHWidget(
|
|||
label.str("");
|
||||
label << Common::Base::HEX4 << (addr2 + 1) << "-" << Common::Base::HEX4 << (addr2 + 1 + 0x1FF);
|
||||
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,
|
||||
w - xoffset - 10, myLineHeight, "");
|
||||
|
|
|
@ -70,7 +70,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
|
|||
int lwidth = _font.getStringWidth("Counter Registers ");
|
||||
xpos = 10; ypos += myLineHeight + 8;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Top Registers ", kTextAlignLeft);
|
||||
myFontHeight, "Top Registers ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myTops = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
|
||||
|
@ -80,7 +80,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
|
|||
// Bottom registers
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Bottom Registers ", kTextAlignLeft);
|
||||
myFontHeight, "Bottom Registers ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myBottoms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
|
||||
|
@ -90,7 +90,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
|
|||
// Counter registers
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Counter Registers ", kTextAlignLeft);
|
||||
myFontHeight, "Counter Registers ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Frac Counters ", kTextAlignLeft);
|
||||
myFontHeight, "Frac Counters ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myFracCounters->getHeight() + 8;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Frac Increments ", kTextAlignLeft);
|
||||
myFontHeight, "Frac Increments ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Function Params ", kTextAlignLeft);
|
||||
myFontHeight, "Function Params ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myParameter = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
|
||||
|
@ -130,7 +130,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget(
|
|||
// Music counters
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Counters ", kTextAlignLeft);
|
||||
myFontHeight, "Music Counters ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Frequencies ", kTextAlignLeft);
|
||||
myFontHeight, "Music Frequencies ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music Waveforms ", kTextAlignLeft);
|
||||
myFontHeight, "Music Waveforms ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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 ");
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Current random number ", kTextAlignLeft);
|
||||
myFontHeight, "Current random number ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myRandom = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8);
|
||||
|
|
|
@ -63,13 +63,13 @@ CartridgeDPCWidget::CartridgeDPCWidget(
|
|||
// Data fetchers
|
||||
int lwidth = _font.getStringWidth("Data Fetchers ");
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Data Fetchers ", kTextAlignLeft);
|
||||
myFontHeight, "Data Fetchers ", TextAlign::Left);
|
||||
|
||||
// Top registers
|
||||
lwidth = _font.getStringWidth("Counter Registers ");
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Top Registers ", kTextAlignLeft);
|
||||
myFontHeight, "Top Registers ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myTops = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
|
||||
|
@ -79,7 +79,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
|
|||
// Bottom registers
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Bottom Registers ", kTextAlignLeft);
|
||||
myFontHeight, "Bottom Registers ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myBottoms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16);
|
||||
|
@ -89,7 +89,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
|
|||
// Counter registers
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Counter Registers ", kTextAlignLeft);
|
||||
myFontHeight, "Counter Registers ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 18; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Flag Registers ", kTextAlignLeft);
|
||||
myFontHeight, "Flag Registers ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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;
|
||||
lwidth = _font.getStringWidth("Music mode (DF5/DF6/DF7) ");
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Music mode (DF5/DF6/DF7) ", kTextAlignLeft);
|
||||
myFontHeight, "Music mode (DF5/DF6/DF7) ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
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
|
||||
xpos = 10; ypos += myLineHeight + 4;
|
||||
new StaticTextWidget(boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Current random number ", kTextAlignLeft);
|
||||
myFontHeight, "Current random number ", TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
|
||||
myRandom = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 2, 8, Common::Base::F_16);
|
||||
|
|
|
@ -49,7 +49,7 @@ int CartDebugWidget::addBaseInformation(int bytes, const string& manufacturer,
|
|||
|
||||
// Add ROM size, manufacturer and bankswitch info
|
||||
new StaticTextWidget(_boss, _font, x, y, lwidth,
|
||||
myFontHeight, "ROM Size ", kTextAlignLeft);
|
||||
myFontHeight, "ROM Size ", TextAlign::Left);
|
||||
buf << bytes << " bytes";
|
||||
if(bytes >= 1024)
|
||||
buf << " / " << (bytes/1024) << "KB";
|
||||
|
@ -60,7 +60,7 @@ int CartDebugWidget::addBaseInformation(int bytes, const string& manufacturer,
|
|||
y += myLineHeight + 4;
|
||||
|
||||
new StaticTextWidget(_boss, _font, x, y, lwidth,
|
||||
myFontHeight, "Manufacturer ", kTextAlignLeft);
|
||||
myFontHeight, "Manufacturer ", TextAlign::Left);
|
||||
w = new EditTextWidget(_boss, _nfont, x+lwidth, y,
|
||||
fwidth, myLineHeight, manufacturer);
|
||||
w->setEditable(false);
|
||||
|
@ -73,7 +73,7 @@ int CartDebugWidget::addBaseInformation(int bytes, const string& manufacturer,
|
|||
if(lines > maxlines) lines = maxlines;
|
||||
|
||||
new StaticTextWidget(_boss, _font, x, y, lwidth,
|
||||
myFontHeight, "Description ", kTextAlignLeft);
|
||||
myFontHeight, "Description ", TextAlign::Left);
|
||||
myDesc = new StringListWidget(_boss, _nfont, x+lwidth, y,
|
||||
fwidth, lines * myLineHeight, false);
|
||||
myDesc->setEditable(false);
|
||||
|
|
|
@ -73,7 +73,7 @@ CartridgeFA2Widget::CartridgeFA2Widget(
|
|||
|
||||
StaticTextWidget* t = new StaticTextWidget(boss, _font, xpos, ypos,
|
||||
_font.getStringWidth("Harmony Flash "),
|
||||
myFontHeight, "Harmony Flash ", kTextAlignLeft);
|
||||
myFontHeight, "Harmony Flash ", TextAlign::Left);
|
||||
|
||||
xpos += t->getWidth() + 4;
|
||||
myFlashErase =
|
||||
|
|
|
@ -48,7 +48,7 @@ CartRamWidget::CartRamWidget(
|
|||
|
||||
// Add RAM size
|
||||
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "RAM Size ", kTextAlignLeft);
|
||||
myFontHeight, "RAM Size ", TextAlign::Left);
|
||||
|
||||
uInt32 ramsize = cartDebug.internalRamSize();
|
||||
buf << ramsize << " bytes";
|
||||
|
@ -70,7 +70,7 @@ CartRamWidget::CartRamWidget(
|
|||
if(lines > maxlines) lines = maxlines;
|
||||
|
||||
new StaticTextWidget(_boss, _font, xpos, ypos, lwidth,
|
||||
myFontHeight, "Description ", kTextAlignLeft);
|
||||
myFontHeight, "Description ", TextAlign::Left);
|
||||
myDesc = new StringListWidget(boss, nfont, xpos+lwidth, ypos,
|
||||
fwidth, lines * myLineHeight, false);
|
||||
myDesc->setEditable(false);
|
||||
|
|
|
@ -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
|
||||
xpos = x; ypos = y; lwidth = 4 * fontWidth;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+1, lwidth-2, fontHeight,
|
||||
"PC ", kTextAlignLeft);
|
||||
"PC ", TextAlign::Left);
|
||||
myPCGrid =
|
||||
new DataGridWidget(boss, nfont, xpos + lwidth, ypos, 1, 1, 4, 16, Common::Base::F_16);
|
||||
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");
|
||||
new StaticTextWidget(boss, lfont, xpos, src_y + 4, src_w,
|
||||
fontHeight, swidth <= src_w ? "Source Address" : "Source Addr",
|
||||
kTextAlignCenter);
|
||||
TextAlign::Center);
|
||||
|
||||
// Add labels for other CPU registers
|
||||
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,
|
||||
lwidth-2, fontHeight,
|
||||
labels[row], kTextAlignLeft);
|
||||
labels[row], TextAlign::Left);
|
||||
}
|
||||
|
||||
// Create a bitfield widget for changing the processor status
|
||||
xpos = x; ypos += 4*lineHeight + 2;
|
||||
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->setTarget(this);
|
||||
addFocusWidget(myPSRegister);
|
||||
|
|
|
@ -609,7 +609,7 @@ void DataGridWidget::drawWidget(bool hilite)
|
|||
{
|
||||
adjustOffset();
|
||||
s.drawString(_font, editString(), x, y, _colWidth, kTextColor,
|
||||
kTextAlignLeft, -_editScrollOffset, false);
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ DrivingWidget::DrivingWidget(GuiObject* boss, const GUI::Font& font,
|
|||
StaticTextWidget* t;
|
||||
|
||||
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
|
||||
fontHeight, label, kTextAlignLeft);
|
||||
fontHeight, label, TextAlign::Left);
|
||||
|
||||
ypos += t->getHeight() + 20;
|
||||
myGrayUp = new ButtonWidget(boss, font, xpos, ypos, bwidth, bheight,
|
||||
|
|
|
@ -29,7 +29,7 @@ GenesisWidget::GenesisWidget(GuiObject* boss, const GUI::Font& font,
|
|||
StaticTextWidget* t;
|
||||
|
||||
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;
|
||||
myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "",
|
||||
CheckboxWidget::kCheckActionCmd);
|
||||
|
|
|
@ -28,7 +28,7 @@ JoystickWidget::JoystickWidget(GuiObject* boss, const GUI::Font& font,
|
|||
StaticTextWidget* t;
|
||||
|
||||
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;
|
||||
myPins[kJUp] = new CheckboxWidget(boss, font, xpos, ypos, "",
|
||||
CheckboxWidget::kCheckActionCmd);
|
||||
|
|
|
@ -31,7 +31,7 @@ KeyboardWidget::KeyboardWidget(GuiObject* boss, const GUI::Font& font,
|
|||
StaticTextWidget* t;
|
||||
|
||||
t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
|
||||
fontHeight, label, kTextAlignLeft);
|
||||
fontHeight, label, TextAlign::Left);
|
||||
|
||||
xpos += 30; ypos += t->getHeight() + 20;
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@ class NullControlWidget : public ControllerWidget
|
|||
lwidth = std::max(font.getStringWidth(buf.str()),
|
||||
font.getStringWidth("Controller input"));
|
||||
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,
|
||||
fontHeight, "Controller input", kTextAlignCenter);
|
||||
fontHeight, "Controller input", TextAlign::Center);
|
||||
new StaticTextWidget(boss, font, x, y+2+3*lineHeight, lwidth,
|
||||
fontHeight, "not available",
|
||||
kTextAlignCenter);
|
||||
TextAlign::Center);
|
||||
}
|
||||
|
||||
virtual ~NullControlWidget() = default;
|
||||
|
|
|
@ -32,7 +32,7 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font,
|
|||
int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Paddles)");
|
||||
|
||||
new StaticTextWidget(boss, font, xpos, ypos+2, lwidth,
|
||||
fontHeight, label, kTextAlignLeft);
|
||||
fontHeight, label, TextAlign::Left);
|
||||
|
||||
ypos += lineHeight + 20;
|
||||
const string& p0string = leftport ? "P0 pot " : "P2 pot ";
|
||||
|
|
|
@ -90,7 +90,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
|
|||
new StaticTextWidget(_boss, lfont, xpos - _font.getStringWidth("xxxx"),
|
||||
ypos - myLineHeight,
|
||||
lfont.getStringWidth("xxxx"), myFontHeight,
|
||||
"00xx", kTextAlignLeft);
|
||||
"00xx", TextAlign::Left);
|
||||
|
||||
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,
|
||||
myFontWidth, myFontHeight,
|
||||
Common::Base::toString(col, Common::Base::F_16_1),
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
}
|
||||
|
||||
uInt32 row;
|
||||
|
@ -107,7 +107,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
|
|||
myRamLabels[row] =
|
||||
new StaticTextWidget(_boss, _font, xpos - _font.getStringWidth("x "),
|
||||
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
|
||||
|
|
|
@ -67,7 +67,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
|
||||
#define CREATE_IO_REGS(desc, bits, bitsID, editable) \
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, lwidth, fontHeight,\
|
||||
desc, kTextAlignLeft); \
|
||||
desc, TextAlign::Left); \
|
||||
xpos += t->getWidth() + 5; \
|
||||
bits = new ToggleBitWidget(boss, nfont, xpos, ypos, 8, 1); \
|
||||
bits->setTarget(this); \
|
||||
|
@ -106,7 +106,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
for(int row = 0; row < 4; ++row)
|
||||
{
|
||||
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;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
myRightINPT = new DataGridWidget(boss, nfont, xpos, ypos, 1, 3, 2, 8, Common::Base::F_16);
|
||||
|
|
|
@ -529,7 +529,7 @@ void RomListWidget::drawWidget(bool hilite)
|
|||
{
|
||||
adjustOffset();
|
||||
s.drawString(_font, editString(), _x + r.x(), ypos, r.width(), kTextColor,
|
||||
kTextAlignLeft, -_editScrollOffset, false);
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
|
||||
drawCaret();
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
|
|||
t = new StaticTextWidget(boss, lfont, xpos, ypos,
|
||||
lfont.getStringWidth("Bank"),
|
||||
lfont.getFontHeight(),
|
||||
"Bank", kTextAlignLeft);
|
||||
"Bank", TextAlign::Left);
|
||||
|
||||
xpos += t->getWidth() + 5;
|
||||
myBank = new EditTextWidget(boss, nfont, xpos, ypos-2,
|
||||
|
|
|
@ -44,7 +44,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// Add frame info
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
|
||||
longstr ? "Frame Count " : "Frame ",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
myFrameCount = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, "");
|
||||
myFrameCount->setEditable(false, true);
|
||||
|
@ -52,7 +52,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
xpos = x; ypos += lineHeight + 5;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos, lwidth, lineHeight,
|
||||
longstr ? "Frame Cycle " : "F. Cycle ",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
xpos += lwidth;
|
||||
myFrameCycles = new EditTextWidget(boss, nfont, xpos, ypos-1, fwidth, lineHeight, "");
|
||||
myFrameCycles->setEditable(false, true);
|
||||
|
@ -71,7 +71,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos,
|
||||
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,
|
||||
lineHeight, "");
|
||||
|
@ -84,7 +84,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
|
||||
ypos += lineHeight + 5;
|
||||
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,
|
||||
lineHeight, "");
|
||||
|
@ -92,7 +92,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
|
||||
ypos += lineHeight + 5;
|
||||
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,
|
||||
lineHeight, "");
|
||||
|
@ -100,7 +100,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
|
||||
ypos += lineHeight + 5;
|
||||
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,
|
||||
lineHeight, "");
|
||||
|
|
|
@ -52,7 +52,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
for(int row = 0; row < 4; ++row)
|
||||
{
|
||||
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;
|
||||
myColorRegs = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
|
@ -92,7 +92,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
{
|
||||
ypos += lineHeight;
|
||||
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,
|
||||
ypos + 2, uInt32(1.5*lineHeight), lineHeight - 4);
|
||||
myFixedColors[row]->setTarget(this);
|
||||
|
@ -103,7 +103,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
{
|
||||
ypos += lineHeight;
|
||||
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,
|
||||
ypos + 2, uInt32(1.5*lineHeight), lineHeight - 4);
|
||||
myFixedColors[row]->setTarget(this);
|
||||
|
@ -125,7 +125,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// Add vertical label
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos + row*(lineHeight+3),
|
||||
2*fontWidth, fontHeight,
|
||||
rowLabel[row], kTextAlignLeft);
|
||||
rowLabel[row], TextAlign::Left);
|
||||
|
||||
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;
|
||||
|
||||
new StaticTextWidget(boss, lfont, labelx, ypos-lineHeight, lwidth, fontHeight,
|
||||
colLabel[col], kTextAlignLeft);
|
||||
colLabel[col], TextAlign::Left);
|
||||
|
||||
collX += myCollision[idx]->getWidth() + 10;
|
||||
idx++;
|
||||
|
@ -170,7 +170,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// grP0 (new)
|
||||
xpos = 10; ypos = collY + 4;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"P0", kTextAlignLeft);
|
||||
"P0", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myGRP0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
||||
myGRP0->setTarget(this);
|
||||
|
@ -181,7 +181,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// posP0
|
||||
xpos += myGRP0->getWidth() + 12;
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Pos#", kTextAlignLeft);
|
||||
"Pos#", TextAlign::Left);
|
||||
xpos += t->getWidth() + 2;
|
||||
myPosP0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 3, 8, Common::Base::F_10);
|
||||
|
@ -193,7 +193,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// hmP0
|
||||
xpos += myPosP0->getWidth() + fontWidth + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"HM", kTextAlignLeft);
|
||||
"HM", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myHMP0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 4, Common::Base::F_16_1);
|
||||
|
@ -236,7 +236,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// NUSIZ0 (player portion)
|
||||
xpos += myDelP0->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
|
||||
"NuSiz", kTextAlignLeft);
|
||||
"NuSiz", TextAlign::Left);
|
||||
xpos += 5*fontWidth + 5;
|
||||
myNusizP0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 3, Common::Base::F_16_1);
|
||||
|
@ -255,7 +255,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// grP1 (new)
|
||||
xpos = 10; ypos += lineHeight + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"P1", kTextAlignLeft);
|
||||
"P1", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myGRP1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
||||
myGRP1->setTarget(this);
|
||||
|
@ -266,7 +266,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// posP1
|
||||
xpos += myGRP1->getWidth() + 12;
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Pos#", kTextAlignLeft);
|
||||
"Pos#", TextAlign::Left);
|
||||
xpos += t->getWidth() + 2;
|
||||
myPosP1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 3, 8, Common::Base::F_10);
|
||||
|
@ -278,7 +278,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// hmP1
|
||||
xpos += myPosP1->getWidth() + fontWidth + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"HM", kTextAlignLeft);
|
||||
"HM", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myHMP1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 4, Common::Base::F_16_1);
|
||||
|
@ -320,7 +320,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// NUSIZ1 (player portion)
|
||||
xpos += myDelP1->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
|
||||
"NuSiz", kTextAlignLeft);
|
||||
"NuSiz", TextAlign::Left);
|
||||
xpos += 5*fontWidth + 5;
|
||||
myNusizP1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 3, Common::Base::F_16_1);
|
||||
|
@ -339,7 +339,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// enaM0
|
||||
xpos = 10; ypos += lineHeight + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"M0", kTextAlignLeft);
|
||||
"M0", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myEnaM0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
|
||||
myEnaM0->setTarget(this);
|
||||
|
@ -350,7 +350,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// posM0
|
||||
xpos += myEnaM0->getWidth() + 12;
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Pos#", kTextAlignLeft);
|
||||
"Pos#", TextAlign::Left);
|
||||
xpos += t->getWidth() + 2;
|
||||
myPosM0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 3, 8, Common::Base::F_10);
|
||||
|
@ -362,7 +362,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// hmM0
|
||||
xpos += myPosM0->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"HM", kTextAlignLeft);
|
||||
"HM", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myHMM0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 4, Common::Base::F_16_1);
|
||||
|
@ -373,7 +373,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// NUSIZ0 (missile portion)
|
||||
xpos += myHMM0->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Size", kTextAlignLeft);
|
||||
"Size", TextAlign::Left);
|
||||
xpos += 4*fontWidth + 5;
|
||||
myNusizM0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 2, Common::Base::F_16_1);
|
||||
|
@ -402,7 +402,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// enaM1
|
||||
xpos = 10; ypos += lineHeight + 4;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"M1", kTextAlignLeft);
|
||||
"M1", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myEnaM1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
|
||||
myEnaM1->setTarget(this);
|
||||
|
@ -413,7 +413,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// posM0
|
||||
xpos += myEnaM1->getWidth() + 12;
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Pos#", kTextAlignLeft);
|
||||
"Pos#", TextAlign::Left);
|
||||
xpos += t->getWidth() + 2;
|
||||
myPosM1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 3, 8, Common::Base::F_10);
|
||||
|
@ -425,7 +425,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// hmM0
|
||||
xpos += myPosM1->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"HM", kTextAlignLeft);
|
||||
"HM", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myHMM1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 4, Common::Base::F_16_1);
|
||||
|
@ -436,7 +436,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// NUSIZ1 (missile portion)
|
||||
xpos += myHMM1->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Size", kTextAlignLeft);
|
||||
"Size", TextAlign::Left);
|
||||
xpos += 4*fontWidth + 5;
|
||||
myNusizM1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 2, Common::Base::F_16_1);
|
||||
|
@ -465,7 +465,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// enaBL
|
||||
xpos = 10; ypos += lineHeight + 4;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"BL", kTextAlignLeft);
|
||||
"BL", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myEnaBL = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
|
||||
myEnaBL->setTarget(this);
|
||||
|
@ -476,7 +476,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// posBL
|
||||
xpos += myEnaBL->getWidth() + 12;
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Pos#", kTextAlignLeft);
|
||||
"Pos#", TextAlign::Left);
|
||||
xpos += t->getWidth() + 2;
|
||||
myPosBL = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 3, 8, Common::Base::F_10);
|
||||
|
@ -488,7 +488,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// hmBL
|
||||
xpos += myPosBL->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"HM", kTextAlignLeft);
|
||||
"HM", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myHMBL = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 4, Common::Base::F_16_1);
|
||||
|
@ -499,7 +499,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// CTRLPF (size portion)
|
||||
xpos += myHMBL->getWidth() + 12;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
||||
"Size", kTextAlignLeft);
|
||||
"Size", TextAlign::Left);
|
||||
xpos += 4*fontWidth + 5;
|
||||
mySizeBL = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||
1, 1, 1, 2, Common::Base::F_16_1);
|
||||
|
@ -541,7 +541,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
// PF0
|
||||
xpos = 10; ypos += lineHeight + sfHeight + 6;
|
||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||
"PF", kTextAlignLeft);
|
||||
"PF", TextAlign::Left);
|
||||
xpos += 2*fontWidth + 5;
|
||||
myPF[0] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 4, 1);
|
||||
myPF[0]->setTarget(this);
|
||||
|
@ -570,14 +570,14 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
for(int i = 4; i <= 7; ++i)
|
||||
{
|
||||
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
|
||||
bitNames[i], kTextAlignLeft);
|
||||
bitNames[i], TextAlign::Left);
|
||||
xpos += colw;
|
||||
}
|
||||
xpos = 10 + 2*fontWidth + 5 + myPF[0]->getWidth() + 2 + start(colw);
|
||||
for(int i = 7; i >= 0; --i)
|
||||
{
|
||||
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
|
||||
bitNames[i], kTextAlignLeft);
|
||||
bitNames[i], TextAlign::Left);
|
||||
xpos += colw;
|
||||
}
|
||||
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)
|
||||
{
|
||||
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
|
||||
bitNames[i], kTextAlignLeft);
|
||||
bitNames[i], TextAlign::Left);
|
||||
xpos += colw;
|
||||
}
|
||||
|
||||
|
@ -614,7 +614,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
|||
xpos = 10;
|
||||
ypos += 2 * lineHeight;
|
||||
t = new StaticTextWidget(boss, lfont, xpos, ypos, 13*fontWidth, fontHeight,
|
||||
"Queued Writes", kTextAlignLeft);
|
||||
"Queued Writes", TextAlign::Left);
|
||||
|
||||
xpos += t->getWidth() + 10;
|
||||
myDelayQueueWidget = new DelayQueueWidget(boss, lfont, xpos, ypos);
|
||||
|
|
|
@ -527,7 +527,7 @@ void Console::setProperties(const Properties& props)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FBInitStatus Console::initializeVideo(bool full)
|
||||
{
|
||||
FBInitStatus fbstatus = kSuccess;
|
||||
FBInitStatus fbstatus = FBInitStatus::Success;
|
||||
|
||||
if(full)
|
||||
{
|
||||
|
@ -535,7 +535,7 @@ FBInitStatus Console::initializeVideo(bool full)
|
|||
": \"" + myProperties.get(Cartridge_Name) + "\"";
|
||||
fbstatus = myOSystem.frameBuffer().createDisplay(title,
|
||||
myTIA->width() << 1, myTIA->height());
|
||||
if(fbstatus != kSuccess)
|
||||
if(fbstatus != FBInitStatus::Success)
|
||||
return fbstatus;
|
||||
|
||||
myOSystem.frameBuffer().showFrameStats(
|
||||
|
|
|
@ -2097,20 +2097,20 @@ bool EventHandler::enterDebugMode()
|
|||
setEventState(S_DEBUGGER);
|
||||
|
||||
FBInitStatus fbstatus = myOSystem.createFrameBuffer();
|
||||
if(fbstatus != kSuccess)
|
||||
if(fbstatus != FBInitStatus::Success)
|
||||
{
|
||||
myOSystem.debugger().setQuitState();
|
||||
setEventState(S_EMULATE);
|
||||
if(fbstatus == kFailTooLarge)
|
||||
if(fbstatus == FBInitStatus::FailTooLarge)
|
||||
myOSystem.frameBuffer().showMessage("Debugger window too large for screen",
|
||||
kBottomCenter, true);
|
||||
MessagePosition::BottomCenter, true);
|
||||
return false;
|
||||
}
|
||||
myOverlay->reStack();
|
||||
myOSystem.sound().mute(true);
|
||||
#else
|
||||
myOSystem.frameBuffer().showMessage("Debugger support not included",
|
||||
kBottomCenter, true);
|
||||
MessagePosition::BottomCenter, true);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
|
|
@ -184,14 +184,14 @@ void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h,
|
|||
{
|
||||
switch(style)
|
||||
{
|
||||
case kSolidLine:
|
||||
case FrameStyle::Solid:
|
||||
hLine(x, y, x + w - 1, color);
|
||||
hLine(x, y + h - 1, x + w - 1, color);
|
||||
vLine(x, y, y + h - 1, color);
|
||||
vLine(x + w - 1, y, y + h - 1, color);
|
||||
break;
|
||||
|
||||
case kDashLine:
|
||||
case FrameStyle::Dashed:
|
||||
uInt32 i, skip, lwidth = 1;
|
||||
|
||||
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,
|
||||
int x, int y, int w,
|
||||
uInt32 color, TextAlignment align,
|
||||
uInt32 color, TextAlign align,
|
||||
int deltax, bool useEllipsis)
|
||||
{
|
||||
const string ELLIPSIS = "\x1d"; // "..."
|
||||
|
@ -273,9 +273,9 @@ void FBSurface::drawString(const GUI::Font& font, const string& s,
|
|||
else
|
||||
str = s;
|
||||
|
||||
if(align == kTextAlignCenter)
|
||||
if(align == TextAlign::Center)
|
||||
x = x + (w - width - 1)/2;
|
||||
else if(align == kTextAlignRight)
|
||||
else if(align == TextAlign::Right)
|
||||
x = x + w - width;
|
||||
|
||||
x += deltax;
|
||||
|
|
|
@ -179,7 +179,7 @@ class FBSurface
|
|||
@param style The 'FrameStyle' to use for the surrounding frame
|
||||
*/
|
||||
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.
|
||||
|
@ -196,7 +196,7 @@ class FBSurface
|
|||
*/
|
||||
virtual void drawString(
|
||||
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);
|
||||
|
||||
/**
|
||||
|
|
|
@ -176,7 +176,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
|
|||
// Otherwise, we treat the system as if WINDOWED_SUPPORT is not defined
|
||||
if(myDesktopSize.w < kFBMinW && myDesktopSize.h < kFBMinH &&
|
||||
(myDesktopSize.w < width || myDesktopSize.h < height))
|
||||
return kFailTooLarge;
|
||||
return FBInitStatus::FailTooLarge;
|
||||
|
||||
useFullscreen = myOSystem.settings().getBool("fullscreen");
|
||||
#else
|
||||
|
@ -184,7 +184,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
|
|||
// 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
|
||||
if(myDesktopSize.w < width || myDesktopSize.h < height)
|
||||
return kFailTooLarge;
|
||||
return FBInitStatus::FailTooLarge;
|
||||
#endif
|
||||
|
||||
// Set the available video modes for this framebuffer
|
||||
|
@ -213,11 +213,11 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
|
|||
else
|
||||
{
|
||||
myOSystem.logMessage("ERROR: Couldn't initialize video subsystem", 0);
|
||||
return kFailNotSupported;
|
||||
return FBInitStatus::FailNotSupported;
|
||||
}
|
||||
}
|
||||
else
|
||||
return kFailTooLarge;
|
||||
return FBInitStatus::FailTooLarge;
|
||||
|
||||
// Erase any messages from a previous run
|
||||
myMsg.counter = 0;
|
||||
|
@ -245,7 +245,7 @@ FBInitStatus FrameBuffer::createDisplay(const string& title,
|
|||
myOSystem.logMessage(post_about, 1);
|
||||
}
|
||||
|
||||
return kSuccess;
|
||||
return FBInitStatus::Success;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -283,9 +283,9 @@ void FrameBuffer::update()
|
|||
myOSystem.console().getFramerate(), info.DisplayFormat.c_str());
|
||||
myStatsMsg.surface->fillRect(0, 0, myStatsMsg.w, myStatsMsg.h, kBGColor);
|
||||
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(),
|
||||
info.BankSwitch, 1, 15, myStatsMsg.w, myStatsMsg.color, kTextAlignLeft);
|
||||
info.BankSwitch, 1, 15, myStatsMsg.w, myStatsMsg.color, TextAlign::Left);
|
||||
myStatsMsg.surface->setDirty();
|
||||
myStatsMsg.surface->setDstPos(myImageRect.x() + 1, myImageRect.y() + 1);
|
||||
myStatsMsg.surface->render();
|
||||
|
@ -302,7 +302,7 @@ void FrameBuffer::update()
|
|||
if (myPausedCount-- <= 0)
|
||||
{
|
||||
resetPauseDelay();
|
||||
showMessage("Paused", kMiddleCenter);
|
||||
showMessage("Paused", MessagePosition::MiddleCenter);
|
||||
}
|
||||
break; // S_PAUSE
|
||||
}
|
||||
|
@ -408,47 +408,47 @@ inline void FrameBuffer::drawMessage()
|
|||
// Draw the bounded box and text
|
||||
switch(myMsg.position)
|
||||
{
|
||||
case kTopLeft:
|
||||
case MessagePosition::TopLeft:
|
||||
myMsg.x = 5;
|
||||
myMsg.y = 5;
|
||||
break;
|
||||
|
||||
case kTopCenter:
|
||||
case MessagePosition::TopCenter:
|
||||
myMsg.x = (myImageRect.width() - myMsg.w) >> 1;
|
||||
myMsg.y = 5;
|
||||
break;
|
||||
|
||||
case kTopRight:
|
||||
case MessagePosition::TopRight:
|
||||
myMsg.x = myImageRect.width() - myMsg.w - 5;
|
||||
myMsg.y = 5;
|
||||
break;
|
||||
|
||||
case kMiddleLeft:
|
||||
case MessagePosition::MiddleLeft:
|
||||
myMsg.x = 5;
|
||||
myMsg.y = (myImageRect.height() - myMsg.h) >> 1;
|
||||
break;
|
||||
|
||||
case kMiddleCenter:
|
||||
case MessagePosition::MiddleCenter:
|
||||
myMsg.x = (myImageRect.width() - myMsg.w) >> 1;
|
||||
myMsg.y = (myImageRect.height() - myMsg.h) >> 1;
|
||||
break;
|
||||
|
||||
case kMiddleRight:
|
||||
case MessagePosition::MiddleRight:
|
||||
myMsg.x = myImageRect.width() - myMsg.w - 5;
|
||||
myMsg.y = (myImageRect.height() - myMsg.h) >> 1;
|
||||
break;
|
||||
|
||||
case kBottomLeft:
|
||||
case MessagePosition::BottomLeft:
|
||||
myMsg.x = 5;
|
||||
myMsg.y = myImageRect.height() - myMsg.h - 5;
|
||||
break;
|
||||
|
||||
case kBottomCenter:
|
||||
case MessagePosition::BottomCenter:
|
||||
myMsg.x = (myImageRect.width() - myMsg.w) >> 1;
|
||||
myMsg.y = myImageRect.height() - myMsg.h - 5;
|
||||
break;
|
||||
|
||||
case kBottomRight:
|
||||
case MessagePosition::BottomRight:
|
||||
myMsg.x = myImageRect.width() - myMsg.w - 5;
|
||||
myMsg.y = myImageRect.height() - myMsg.h - 5;
|
||||
break;
|
||||
|
@ -458,7 +458,7 @@ inline void FrameBuffer::drawMessage()
|
|||
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->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),
|
||||
// or show again this frame
|
||||
|
|
|
@ -125,7 +125,7 @@ class FrameBuffer
|
|||
@param force Force showing this message, even if messages are disabled
|
||||
*/
|
||||
void showMessage(const string& message,
|
||||
MessagePosition position = kBottomCenter,
|
||||
MessagePosition position = MessagePosition::BottomCenter,
|
||||
bool force = false);
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,32 +15,31 @@
|
|||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//============================================================================
|
||||
|
||||
// FIXME - perhaps add to namespace or something
|
||||
|
||||
#ifndef FRAMEBUFFER_CONSTANTS_HXX
|
||||
#define FRAMEBUFFER_CONSTANTS_HXX
|
||||
|
||||
// Return values for initialization of framebuffer window
|
||||
enum FBInitStatus {
|
||||
kSuccess,
|
||||
kFailComplete,
|
||||
kFailTooLarge,
|
||||
kFailNotSupported
|
||||
enum class FBInitStatus {
|
||||
Success,
|
||||
FailComplete,
|
||||
FailTooLarge,
|
||||
FailNotSupported
|
||||
};
|
||||
|
||||
// Positions for onscreen/overlaid messages
|
||||
enum MessagePosition {
|
||||
kTopLeft,
|
||||
kTopCenter,
|
||||
kTopRight,
|
||||
kMiddleLeft,
|
||||
kMiddleCenter,
|
||||
kMiddleRight,
|
||||
kBottomLeft,
|
||||
kBottomCenter,
|
||||
kBottomRight
|
||||
enum class MessagePosition {
|
||||
TopLeft,
|
||||
TopCenter,
|
||||
TopRight,
|
||||
MiddleLeft,
|
||||
MiddleCenter,
|
||||
MiddleRight,
|
||||
BottomLeft,
|
||||
BottomCenter,
|
||||
BottomRight
|
||||
};
|
||||
|
||||
// TODO - make this 'enum class'
|
||||
// Colors indices to use for the various GUI elements
|
||||
enum {
|
||||
kColor = 256,
|
||||
|
@ -70,16 +69,16 @@ enum {
|
|||
};
|
||||
|
||||
// Text alignment modes for drawString()
|
||||
enum TextAlignment {
|
||||
kTextAlignLeft,
|
||||
kTextAlignCenter,
|
||||
kTextAlignRight
|
||||
enum class TextAlign {
|
||||
Left,
|
||||
Center,
|
||||
Right
|
||||
};
|
||||
|
||||
// Line types for drawing rectangular frames
|
||||
enum FrameStyle {
|
||||
kSolidLine,
|
||||
kDashLine
|
||||
enum class FrameStyle {
|
||||
Solid,
|
||||
Dashed
|
||||
};
|
||||
|
||||
#endif // FRAMEBUFFER_CONSTANTS_HXX
|
||||
|
|
|
@ -245,25 +245,25 @@ void OSystem::setFramerate(float framerate)
|
|||
FBInitStatus OSystem::createFrameBuffer()
|
||||
{
|
||||
// Re-initialize the framebuffer to current settings
|
||||
FBInitStatus fbstatus = kFailComplete;
|
||||
FBInitStatus fbstatus = FBInitStatus::FailComplete;
|
||||
switch(myEventHandler->state())
|
||||
{
|
||||
case EventHandler::S_EMULATE:
|
||||
case EventHandler::S_PAUSE:
|
||||
case EventHandler::S_MENU:
|
||||
case EventHandler::S_CMDMENU:
|
||||
if((fbstatus = myConsole->initializeVideo()) != kSuccess)
|
||||
if((fbstatus = myConsole->initializeVideo()) != FBInitStatus::Success)
|
||||
return fbstatus;
|
||||
break; // S_EMULATE, S_PAUSE, S_MENU, S_CMDMENU
|
||||
|
||||
case EventHandler::S_LAUNCHER:
|
||||
if((fbstatus = myLauncher->initializeVideo()) != kSuccess)
|
||||
if((fbstatus = myLauncher->initializeVideo()) != FBInitStatus::Success)
|
||||
return fbstatus;
|
||||
break; // S_LAUNCHER
|
||||
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
case EventHandler::S_DEBUGGER:
|
||||
if((fbstatus = myDebugger->initializeVideo()) != kSuccess)
|
||||
if((fbstatus = myDebugger->initializeVideo()) != FBInitStatus::Success)
|
||||
return fbstatus;
|
||||
break; // S_DEBUGGER
|
||||
#endif
|
||||
|
@ -333,7 +333,7 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum,
|
|||
#endif
|
||||
myEventHandler->reset(EventHandler::S_EMULATE);
|
||||
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);
|
||||
myEventHandler->reset(EventHandler::S_LAUNCHER);
|
||||
|
@ -392,7 +392,7 @@ bool OSystem::createLauncher(const string& startdir)
|
|||
bool status = false;
|
||||
|
||||
myEventHandler->reset(EventHandler::S_LAUNCHER);
|
||||
if(createFrameBuffer() == kSuccess)
|
||||
if(createFrameBuffer() == FBInitStatus::Success)
|
||||
{
|
||||
myLauncher->reStack();
|
||||
myFrameBuffer->setCursorState();
|
||||
|
|
|
@ -65,14 +65,14 @@ AboutDialog::AboutDialog(OSystem& osystem, DialogContainer& parent,
|
|||
|
||||
xpos = 5; ypos = 5;
|
||||
myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight,
|
||||
"", kTextAlignCenter);
|
||||
"", TextAlign::Center);
|
||||
myTitle->setTextColor(kTextColorEm);
|
||||
|
||||
xpos = 10; ypos += lineHeight + 4;
|
||||
for(int i = 0; i < myLinesPerPage; i++)
|
||||
{
|
||||
myDesc.push_back(new StaticTextWidget(this, font, xpos, ypos, _w - 20,
|
||||
fontHeight, "", kTextAlignLeft));
|
||||
fontHeight, "", TextAlign::Left));
|
||||
myDescStr.push_back("");
|
||||
ypos += fontHeight;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ void AboutDialog::displayInfo()
|
|||
for(int i = 0; i < myLinesPerPage; i++)
|
||||
{
|
||||
const char* str = myDescStr[i].c_str();
|
||||
TextAlignment align = kTextAlignCenter;
|
||||
TextAlign align = TextAlign::Center;
|
||||
uInt32 color = kTextColor;
|
||||
|
||||
while (str[0] == '\\')
|
||||
|
@ -176,15 +176,15 @@ void AboutDialog::displayInfo()
|
|||
switch (str[1])
|
||||
{
|
||||
case 'C':
|
||||
align = kTextAlignCenter;
|
||||
align = TextAlign::Center;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
align = kTextAlignLeft;
|
||||
align = TextAlign::Left;
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
align = kTextAlignRight;
|
||||
align = TextAlign::Right;
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
|
|
|
@ -62,7 +62,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myVolumeLabel = new StaticTextWidget(this, font,
|
||||
xpos + myVolumeSlider->getWidth() + 4,
|
||||
ypos + 1,
|
||||
3*fontWidth, fontHeight, "", kTextAlignLeft);
|
||||
3*fontWidth, fontHeight, "", TextAlign::Left);
|
||||
|
||||
myVolumeLabel->setFlags(WIDGET_CLEARBG);
|
||||
ypos += lineHeight + 4;
|
||||
|
@ -105,7 +105,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent,
|
|||
const GUI::Font& infofont = instance().frameBuffer().infoFont();
|
||||
new StaticTextWidget(this, infofont, 10, ypos,
|
||||
font.getStringWidth("(*) Requires application restart"), fontHeight,
|
||||
"(*) Requires application restart", kTextAlignLeft);
|
||||
"(*) Requires application restart", TextAlign::Left);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
ButtonWidget* b;
|
||||
|
|
|
@ -53,13 +53,13 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font,
|
|||
xpos = 10; ypos = 4;
|
||||
_title = new StaticTextWidget(this, font, xpos, ypos,
|
||||
_w - 2 * xpos, lineHeight,
|
||||
"", kTextAlignCenter);
|
||||
"", TextAlign::Center);
|
||||
|
||||
// Current path - TODO: handle long paths ?
|
||||
ypos += lineHeight + 4;
|
||||
_currentPath = new StaticTextWidget(this, font, xpos, ypos,
|
||||
_w - 2 * xpos, lineHeight,
|
||||
"", kTextAlignLeft);
|
||||
"", TextAlign::Left);
|
||||
|
||||
// Add file list
|
||||
ypos += lineHeight + 4;
|
||||
|
@ -73,7 +73,7 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
_type = new StaticTextWidget(this, font, xpos, ypos+2,
|
||||
font.getStringWidth("Name "), lineHeight,
|
||||
"Name", kTextAlignCenter);
|
||||
"Name", TextAlign::Center);
|
||||
_selected = new EditTextWidget(this, font, xpos + _type->getWidth(), ypos,
|
||||
_w - _type->getWidth() - 2 * xpos, lineHeight, "");
|
||||
_selected->setEditable(false);
|
||||
|
|
|
@ -118,7 +118,7 @@ void CheckListWidget::drawWidget(bool hilite)
|
|||
{
|
||||
adjustOffset();
|
||||
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
|
||||
kTextAlignLeft, -_editScrollOffset, false);
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor);
|
||||
|
|
|
@ -52,7 +52,7 @@ ComboDialog::ComboDialog(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
// Label for dialog, indicating which combo is being changed
|
||||
myComboName = new StaticTextWidget(this, font, xpos, ypos, _w - xpos - 10,
|
||||
fontHeight, "", kTextAlignCenter);
|
||||
fontHeight, "", TextAlign::Center);
|
||||
ypos += (lineHeight + 4) + 5;
|
||||
|
||||
// Add event popup for 8 events
|
||||
|
|
|
@ -201,7 +201,7 @@ void DeveloperDialog::addVideoTab(const GUI::Font& font)
|
|||
myTVJitterRecLabelWidget = new StaticTextWidget(myTab, font,
|
||||
myTVJitterRecWidget->getRight() + 4,
|
||||
myTVJitterRecWidget->getTop() + 2,
|
||||
5 * fontWidth, fontHeight, "", kTextAlignLeft);
|
||||
5 * fontWidth, fontHeight, "", TextAlign::Left);
|
||||
myTVJitterRecLabelWidget->setFlags(WIDGET_CLEARBG);
|
||||
wid.push_back(myTVJitterRecLabelWidget);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
@ -430,7 +430,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
|||
myDebuggerWidthLabel =
|
||||
new StaticTextWidget(myTab, font,
|
||||
xpos + myDebuggerWidthSlider->getWidth() + 4,
|
||||
ypos + 1, 4 * fontWidth, fontHeight, "", kTextAlignLeft);
|
||||
ypos + 1, 4 * fontWidth, fontHeight, "", TextAlign::Left);
|
||||
myDebuggerWidthLabel->setFlags(WIDGET_CLEARBG);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
|
@ -444,7 +444,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
|||
myDebuggerHeightLabel =
|
||||
new StaticTextWidget(myTab, font,
|
||||
xpos + myDebuggerHeightSlider->getWidth() + 4,
|
||||
ypos + 1, 4 * fontWidth, fontHeight, "", kTextAlignLeft);
|
||||
ypos + 1, 4 * fontWidth, fontHeight, "", TextAlign::Left);
|
||||
myDebuggerHeightLabel->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
// Add message concerning usage
|
||||
|
@ -472,7 +472,7 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
|||
addToFocusList(wid, myTab, tabID);
|
||||
#else
|
||||
new StaticTextWidget(myTab, font, 0, 20, _w - 20, fontHeight,
|
||||
"Debugger support not included", kTextAlignCenter);
|
||||
"Debugger support not included", TextAlign::Center);
|
||||
#endif
|
||||
|
||||
addToFocusList(wid, myTab, tabID);
|
||||
|
|
|
@ -83,7 +83,7 @@ void EditTextWidget::drawWidget(bool hilite)
|
|||
adjustOffset();
|
||||
s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(),
|
||||
!_changed ? _textcolor : uInt32(kDbgChangedTextColor),
|
||||
kTextAlignLeft, -_editScrollOffset, false);
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
|
||||
// Draw the caret
|
||||
drawCaret();
|
||||
|
|
|
@ -108,7 +108,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
|
|||
xpos = 10; ypos = 5 + myActionsList->getHeight() + 5;
|
||||
StaticTextWidget* t;
|
||||
t = new StaticTextWidget(boss, font, xpos, ypos+2, font.getStringWidth("Action"),
|
||||
fontHeight, "Action", kTextAlignLeft);
|
||||
fontHeight, "Action", TextAlign::Left);
|
||||
t->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
myKeyMapping = new EditTextWidget(boss, font, xpos + t->getWidth() + 8, ypos,
|
||||
|
|
|
@ -76,49 +76,49 @@ GameInfoDialog::GameInfoDialog(
|
|||
lwidth = font.getStringWidth("Manufacturer ");
|
||||
fwidth = _w - xpos - lwidth - hSpace - hBorder * 2;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Name", kTextAlignLeft);
|
||||
"Name", TextAlign::Left);
|
||||
myName = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
|
||||
fwidth, lineHeight, "");
|
||||
wid.push_back(myName);
|
||||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"MD5", kTextAlignLeft);
|
||||
"MD5", TextAlign::Left);
|
||||
myMD5 = new EditTextWidget(myTab, font, xpos + lwidth, ypos-1,
|
||||
fwidth, lineHeight, "");
|
||||
myMD5->setEditable(false);
|
||||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Manufacturer", kTextAlignLeft);
|
||||
"Manufacturer", TextAlign::Left);
|
||||
myManufacturer = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
|
||||
fwidth, lineHeight, "");
|
||||
wid.push_back(myManufacturer);
|
||||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Model", kTextAlignLeft);
|
||||
"Model", TextAlign::Left);
|
||||
myModelNo = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
|
||||
fwidth, lineHeight, "");
|
||||
wid.push_back(myModelNo);
|
||||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Rarity", kTextAlignLeft);
|
||||
"Rarity", TextAlign::Left);
|
||||
myRarity = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
|
||||
fwidth, lineHeight, "");
|
||||
wid.push_back(myRarity);
|
||||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Note", kTextAlignLeft);
|
||||
"Note", TextAlign::Left);
|
||||
myNote = new EditTextWidget(myTab, font, xpos+lwidth, ypos-1,
|
||||
fwidth, lineHeight, "");
|
||||
wid.push_back(myNote);
|
||||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Sound", kTextAlignLeft);
|
||||
"Sound", TextAlign::Left);
|
||||
pwidth = font.getStringWidth("Stereo");
|
||||
items.clear();
|
||||
VarList::push_back(items, "Mono", "MONO");
|
||||
|
@ -129,7 +129,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Type", kTextAlignLeft);
|
||||
"Type", TextAlign::Left);
|
||||
pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)");
|
||||
items.clear();
|
||||
for(int i = 0; i < int(BSType::NumSchemes); ++i)
|
||||
|
@ -150,7 +150,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
lwidth = font.getStringWidth("Right Difficulty ");
|
||||
pwidth = font.getStringWidth("B & W");
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Left Difficulty", kTextAlignLeft);
|
||||
"Left Difficulty", TextAlign::Left);
|
||||
items.clear();
|
||||
VarList::push_back(items, "B", "B");
|
||||
VarList::push_back(items, "A", "A");
|
||||
|
@ -160,7 +160,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Right Difficulty", kTextAlignLeft);
|
||||
"Right Difficulty", TextAlign::Left);
|
||||
// ... use same items as above
|
||||
myRightDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos,
|
||||
pwidth, lineHeight, items, "", 0, 0);
|
||||
|
@ -168,7 +168,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
|
||||
ypos += lineHeight + vGap;
|
||||
new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"TV Type", kTextAlignLeft);
|
||||
"TV Type", TextAlign::Left);
|
||||
items.clear();
|
||||
VarList::push_back(items, "Color", "COLOR");
|
||||
VarList::push_back(items, "B & W", "BW");
|
||||
|
@ -187,7 +187,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
ypos = vBorder;
|
||||
pwidth = font.getStringWidth("Paddles_IAxis");
|
||||
myP0Label = new StaticTextWidget(myTab, font, hSpace, ypos+1,
|
||||
"P0 Controller ", kTextAlignLeft);
|
||||
"P0 Controller ", TextAlign::Left);
|
||||
ctrls.clear();
|
||||
VarList::push_back(ctrls, "Joystick", "JOYSTICK" );
|
||||
VarList::push_back(ctrls, "Paddles", "PADDLES" );
|
||||
|
@ -213,7 +213,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
ypos += lineHeight + vGap;
|
||||
pwidth = font.getStringWidth("Paddles_IAxis");
|
||||
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,
|
||||
pwidth, lineHeight, ctrls, "", 0, kRightCChanged);
|
||||
wid.push_back(myP1Controller);
|
||||
|
@ -281,7 +281,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
|
||||
myMouseRangeLabel = new StaticTextWidget(myTab, font,
|
||||
myMouseRange->getRight() + 4, myMouseRange->getTop()+1,
|
||||
" ", kTextAlignLeft);
|
||||
" ", TextAlign::Left);
|
||||
myMouseRangeLabel->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
// Add items for tab 2
|
||||
|
@ -294,7 +294,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
|
||||
ypos = vBorder;
|
||||
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();
|
||||
VarList::push_back(items, "Auto-detect", "AUTO");
|
||||
VarList::push_back(items, "NTSC", "NTSC");
|
||||
|
@ -308,25 +308,25 @@ GameInfoDialog::GameInfoDialog(
|
|||
wid.push_back(myFormat);
|
||||
|
||||
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,
|
||||
"", 0, kYStartChanged);
|
||||
myYStart->setMinValue(TIAConstants::minYStart-1);
|
||||
myYStart->setMaxValue(TIAConstants::maxYStart);
|
||||
wid.push_back(myYStart);
|
||||
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);
|
||||
|
||||
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,
|
||||
"", 0, kHeightChanged);
|
||||
myHeight->setMinValue(TIAConstants::minViewableHeight-1);
|
||||
myHeight->setMaxValue(TIAConstants::maxViewableHeight);
|
||||
wid.push_back(myHeight);
|
||||
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);
|
||||
|
||||
// Phosphor
|
||||
|
@ -344,7 +344,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
|
||||
myPPBlendLabel = new StaticTextWidget(myTab, font,
|
||||
myPPBlend->getRight() + 4, myPhosphor->getTop(),
|
||||
5*fontWidth, fontHeight, "", kTextAlignLeft);
|
||||
5*fontWidth, fontHeight, "", TextAlign::Left);
|
||||
myPPBlendLabel->setFlags(WIDGET_CLEARBG);
|
||||
|
||||
// Add items for tab 3
|
||||
|
@ -359,7 +359,7 @@ GameInfoDialog::GameInfoDialog(
|
|||
new StaticTextWidget(this, ifont, hSpace, _h - (buttonHeight + fontHeight + 20),
|
||||
lwidth, fontHeight,
|
||||
"(*) Changes to properties require a ROM reload",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
|
||||
// Add Defaults, OK and Cancel buttons
|
||||
wid.clear();
|
||||
|
|
|
@ -53,7 +53,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
|||
|
||||
// Bankswitch type
|
||||
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)
|
||||
VarList::push_back(items, BSList[i].desc, BSList[i].name);
|
||||
myBSType = new PopUpWidget(this, font, xpos+lwidth, ypos,
|
||||
|
@ -64,7 +64,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
|||
// Left difficulty
|
||||
pwidth = font.getStringWidth("Debugger");
|
||||
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Left Difficulty", kTextAlignLeft);
|
||||
"Left Difficulty", TextAlign::Left);
|
||||
items.clear();
|
||||
VarList::push_back(items, "Default", "DEFAULT");
|
||||
VarList::push_back(items, "B", "B");
|
||||
|
@ -76,7 +76,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
|||
|
||||
// Right difficulty
|
||||
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Right Difficulty", kTextAlignLeft);
|
||||
"Right Difficulty", TextAlign::Left);
|
||||
// ... use same items as above
|
||||
myRightDiff = new PopUpWidget(this, font, xpos+lwidth, ypos,
|
||||
pwidth, lineHeight, items, "", 0, 0);
|
||||
|
@ -85,7 +85,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
|||
|
||||
// TV type
|
||||
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"TV Type", kTextAlignLeft);
|
||||
"TV Type", TextAlign::Left);
|
||||
items.clear();
|
||||
VarList::push_back(items, "Default", "DEFAULT");
|
||||
VarList::push_back(items, "Color", "COLOR");
|
||||
|
@ -97,7 +97,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
|||
|
||||
// Start in debugger mode
|
||||
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
|
||||
"Startup Mode", kTextAlignLeft);
|
||||
"Startup Mode", TextAlign::Left);
|
||||
items.clear();
|
||||
VarList::push_back(items, "Console", "false");
|
||||
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,
|
||||
font.getStringWidth("Start console with the following held down:"),
|
||||
fontHeight, "Start console with the following held down:",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
xpos += 10; ypos += lineHeight;
|
||||
new StaticTextWidget(this, infofont, xpos, ypos+1, _w - 40, infofont.getFontHeight(),
|
||||
"(*) Buttons are automatically released shortly",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
ypos += infofont.getLineHeight();
|
||||
new StaticTextWidget(this, infofont, xpos, ypos+1, _w - 40, infofont.getFontHeight(),
|
||||
" after emulation has started",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
|
||||
// Start with console joystick direction/buttons held down
|
||||
xpos = 30; ypos += lineHeight + 10;
|
||||
|
@ -127,10 +127,10 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
|||
// Add message concerning usage
|
||||
xpos = 10; ypos += 2 * fontHeight;
|
||||
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();
|
||||
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
|
||||
ButtonWidget* b;
|
||||
|
@ -152,7 +152,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y,
|
|||
// Left joystick
|
||||
StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos+2,
|
||||
font.getStringWidth("Left Joy"), fontHeight, "Left Joy",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10;
|
||||
myJoy[kJ0Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ0Up);
|
||||
ypos += myJoy[kJ0Up]->getHeight() * 2 + 10;
|
||||
|
@ -172,7 +172,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y,
|
|||
// Right joystick
|
||||
t = new StaticTextWidget(this, font, xpos, ypos+2,
|
||||
font.getStringWidth("Right Joy"), fontHeight, "Right Joy",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10;
|
||||
myJoy[kJ1Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ1Up);
|
||||
ypos += myJoy[kJ1Up]->getHeight() * 2 + 10;
|
||||
|
@ -191,7 +191,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y,
|
|||
// Console Select/Reset
|
||||
t = new StaticTextWidget(this, font, xpos, ypos+2,
|
||||
font.getStringWidth("Console"), fontHeight, "Console",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
xpos -= 10; ypos += t->getHeight() + 10;
|
||||
myHoldSelect = new CheckboxWidget(this, font, xpos, ypos, "Select");
|
||||
ypos += myHoldSelect->getHeight() + 5;
|
||||
|
|
|
@ -64,7 +64,7 @@ HelpDialog::HelpDialog(OSystem& osystem, DialogContainer& parent,
|
|||
|
||||
xpos = 5; ypos = 5;
|
||||
myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight,
|
||||
"", kTextAlignCenter);
|
||||
"", TextAlign::Center);
|
||||
|
||||
int lwidth = 12 * fontWidth;
|
||||
xpos += 5; ypos += lineHeight + 4;
|
||||
|
@ -72,10 +72,10 @@ HelpDialog::HelpDialog(OSystem& osystem, DialogContainer& parent,
|
|||
{
|
||||
myKey[i] =
|
||||
new StaticTextWidget(this, font, xpos, ypos, lwidth,
|
||||
fontHeight, "", kTextAlignLeft);
|
||||
fontHeight, "", TextAlign::Left);
|
||||
myDesc[i] =
|
||||
new StaticTextWidget(this, font, xpos+lwidth, ypos, _w - xpos - lwidth - 5,
|
||||
fontHeight, "", kTextAlignLeft);
|
||||
fontHeight, "", TextAlign::Left);
|
||||
ypos += fontHeight;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
|
|||
myDeadzone->setMinValue(0); myDeadzone->setMaxValue(29);
|
||||
xpos = hSpace + myDeadzone->getWidth() + 5;
|
||||
myDeadzoneLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 5*fontWidth,
|
||||
lineHeight, "", kTextAlignLeft);
|
||||
lineHeight, "", TextAlign::Left);
|
||||
myDeadzoneLabel->setFlags(WIDGET_CLEARBG);
|
||||
wid.push_back(myDeadzone);
|
||||
|
||||
|
@ -174,7 +174,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
|
|||
myDPaddleSpeed->setMinValue(1); myDPaddleSpeed->setMaxValue(20);
|
||||
xpos = hSpace + myDPaddleSpeed->getWidth() + 5;
|
||||
myDPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
|
||||
"", kTextAlignLeft);
|
||||
"", TextAlign::Left);
|
||||
myDPaddleLabel->setFlags(WIDGET_CLEARBG);
|
||||
wid.push_back(myDPaddleSpeed);
|
||||
|
||||
|
@ -186,7 +186,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
|
|||
myMPaddleSpeed->setMinValue(1); myMPaddleSpeed->setMaxValue(20);
|
||||
xpos = hSpace + myMPaddleSpeed->getWidth() + 5;
|
||||
myMPaddleLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
|
||||
"", kTextAlignLeft);
|
||||
"", TextAlign::Left);
|
||||
myMPaddleSpeed->setFlags(WIDGET_CLEARBG);
|
||||
wid.push_back(myMPaddleSpeed);
|
||||
|
||||
|
@ -198,7 +198,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
|
|||
myTrackBallSpeed->setMinValue(1); myTrackBallSpeed->setMaxValue(20);
|
||||
xpos = hSpace + myTrackBallSpeed->getWidth() + 5;
|
||||
myTrackBallLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 24, lineHeight,
|
||||
"", kTextAlignLeft);
|
||||
"", TextAlign::Left);
|
||||
myTrackBallSpeed->setFlags(WIDGET_CLEARBG);
|
||||
wid.push_back(myTrackBallSpeed);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ void InputTextDialog::initialize(const GUI::Font& lfont, const GUI::Font& nfont,
|
|||
xpos = 10;
|
||||
new StaticTextWidget(this, lfont, xpos, ypos + 2,
|
||||
lwidth, fontHeight,
|
||||
labels[i], kTextAlignLeft);
|
||||
labels[i], TextAlign::Left);
|
||||
|
||||
xpos += lwidth + fontWidth;
|
||||
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;
|
||||
myTitle = new StaticTextWidget(this, lfont, xpos, ypos, _w - 2*xpos, fontHeight,
|
||||
"", kTextAlignLeft);
|
||||
"", TextAlign::Left);
|
||||
myTitle->setTextColor(kTextColorEm);
|
||||
|
||||
addToFocusList(wid);
|
||||
|
|
|
@ -46,7 +46,7 @@ JoystickDialog::JoystickDialog(GuiObject* boss, const GUI::Font& font,
|
|||
ypos = _h - buttonHeight - 10;
|
||||
StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos,
|
||||
font.getStringWidth("Joystick ID "), font.getFontHeight(),
|
||||
"Joystick ID ", kTextAlignLeft);
|
||||
"Joystick ID ", TextAlign::Left);
|
||||
xpos += t->getWidth() + 4;
|
||||
myJoyText = new EditTextWidget(this, font, xpos, ypos-2,
|
||||
font.getStringWidth("Unplugged")+8, font.getLineHeight(), "");
|
||||
|
|
|
@ -66,13 +66,13 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
|
|||
lwidth = font.getStringWidth("Select an item from the list ...");
|
||||
xpos += 10; ypos += 8;
|
||||
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");
|
||||
xpos = _w - lwidth2 - 10;
|
||||
myRomCount = new StaticTextWidget(this, font, xpos, ypos,
|
||||
lwidth2, fontHeight,
|
||||
"", kTextAlignRight);
|
||||
"", TextAlign::Right);
|
||||
|
||||
// Add filter that can narrow the results shown in the listing
|
||||
// It has to fit between both labels
|
||||
|
@ -116,7 +116,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
|
|||
xpos += 5; ypos += myList->getHeight() + 4;
|
||||
lwidth = font.getStringWidth("Dir ");
|
||||
myDirLabel = new StaticTextWidget(this, font, xpos, ypos+2, lwidth, fontHeight,
|
||||
"Dir", kTextAlignLeft);
|
||||
"Dir", TextAlign::Left);
|
||||
xpos += lwidth + 5;
|
||||
myDir = new EditTextWidget(this, font, xpos, ypos, _w - xpos - 10, lineHeight, "");
|
||||
myDir->setEditable(false, true);
|
||||
|
@ -481,7 +481,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
|||
if(result == EmptyString)
|
||||
instance().settings().setValue("lastrom", myList->getSelectedString());
|
||||
else
|
||||
instance().frameBuffer().showMessage(result, kMiddleCenter, true);
|
||||
instance().frameBuffer().showMessage(result, MessagePosition::MiddleCenter, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -70,7 +70,7 @@ void MessageBox::addText(const GUI::Font& font, const StringList& text)
|
|||
for(const auto& s: text)
|
||||
{
|
||||
new StaticTextWidget(this, font, xpos, ypos, _w - 20,
|
||||
fontHeight, s, kTextAlignLeft);
|
||||
fontHeight, s, TextAlign::Left);
|
||||
ypos += fontHeight;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ void PopUpWidget::drawWidget(bool hilite)
|
|||
// Draw the label, if any
|
||||
if (_labelWidth > 0)
|
||||
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.
|
||||
s.hLine(x, _y, x + w - 1, kColor);
|
||||
|
@ -205,8 +205,8 @@ void PopUpWidget::drawWidget(bool hilite)
|
|||
|
||||
// Draw the selected entry, if any
|
||||
const string& name = myMenu->getSelectedName();
|
||||
TextAlignment align = (_font.getStringWidth(name) > w-6) ?
|
||||
kTextAlignRight : kTextAlignLeft;
|
||||
TextAlign align = (_font.getStringWidth(name) > w-6) ?
|
||||
TextAlign::Right : TextAlign::Left;
|
||||
s.drawString(_font, name, x+2, _y+myTextY, w-6,
|
||||
!isEnabled() ? kColor : kTextColor, align);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font,
|
|||
|
||||
xpos = fontWidth; ypos = lineHeight;
|
||||
myMessage = new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight,
|
||||
message, kTextAlignCenter);
|
||||
message, TextAlign::Center);
|
||||
myMessage->setTextColor(kTextColorEm);
|
||||
|
||||
xpos = fontWidth; ypos += 2 * lineHeight;
|
||||
|
|
|
@ -69,13 +69,13 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent,
|
|||
// Show results of ROM audit
|
||||
ypos += buttonHeight + 16;
|
||||
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,
|
||||
_w - hBorder*2 - lwidth, lineHeight, "");
|
||||
myResults1->setEditable(false, true);
|
||||
ypos += buttonHeight;
|
||||
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,
|
||||
_w - hBorder*2 - lwidth, lineHeight, "");
|
||||
myResults2->setEditable(false, true);
|
||||
|
@ -83,7 +83,7 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent,
|
|||
ypos += buttonHeight + 8;
|
||||
new StaticTextWidget(this, font, hBorder, ypos, _w - 20, fontHeight,
|
||||
"(*) WARNING: operation cannot be undone!",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
|
||||
// Add OK and Cancel buttons
|
||||
addOKCancelBGroup(wid, font, "Audit", "Done");
|
||||
|
|
|
@ -99,7 +99,7 @@ SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
|
|||
fwidth = font.getStringWidth("When saving snapshots:");
|
||||
xpos = vBorder; ypos += buttonHeight + 5;
|
||||
new StaticTextWidget(this, font, xpos, ypos, fwidth, lineHeight,
|
||||
"When saving snapshots:", kTextAlignLeft);
|
||||
"When saving snapshots:", TextAlign::Left);
|
||||
|
||||
// Snapshot single or multiple saves
|
||||
xpos += 30; ypos += lineHeight + 3;
|
||||
|
|
|
@ -69,7 +69,7 @@ void StringListWidget::drawWidget(bool hilite)
|
|||
{
|
||||
adjustOffset();
|
||||
s.drawString(_font, editString(), _x + r.left, y, r.width(), kTextColor,
|
||||
kTextAlignLeft, -_editScrollOffset, false);
|
||||
TextAlign::Left, -_editScrollOffset, false);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, _list[pos], _x + r.left, y, r.width(), kTextColor);
|
||||
|
|
|
@ -289,7 +289,7 @@ void TabWidget::drawWidget(bool hilite)
|
|||
box(x, _y + yOffset, _tabWidth, _tabHeight - yOffset, boxcolor, boxcolor, (i == _activeTab));
|
||||
s.drawString(_font, _tabs[i].title, x + kTabPadding,
|
||||
_y + yOffset / 2 + (_tabHeight - _fontHeight - 1),
|
||||
_tabWidth - 2 * kTabPadding, fontcolor, kTextAlignCenter);
|
||||
_tabWidth - 2 * kTabPadding, fontcolor, TextAlign::Center);
|
||||
x += _tabWidth + kTabSpacing;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myLauncherWidthLabel =
|
||||
new StaticTextWidget(myTab, font,
|
||||
xpos + myLauncherWidthSlider->getWidth() + 4,
|
||||
ypos + 1, 4*fontWidth, fontHeight, "", kTextAlignLeft);
|
||||
ypos + 1, 4*fontWidth, fontHeight, "", TextAlign::Left);
|
||||
myLauncherWidthLabel->setFlags(WIDGET_CLEARBG);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
|
@ -90,7 +90,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
|||
myLauncherHeightLabel =
|
||||
new StaticTextWidget(myTab, font,
|
||||
xpos + myLauncherHeightSlider->getWidth() + 4,
|
||||
ypos + 1, 4*fontWidth, fontHeight, "", kTextAlignLeft);
|
||||
ypos + 1, 4*fontWidth, fontHeight, "", TextAlign::Left);
|
||||
myLauncherHeightLabel->setFlags(WIDGET_CLEARBG);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
|
@ -133,7 +133,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
|||
lwidth = ifont.getStringWidth("(*) Changes require application restart");
|
||||
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
|
||||
"(*) Changes require application restart",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
|
||||
// Add items for tab 0
|
||||
addToFocusList(wid, myTab, tabID);
|
||||
|
@ -194,7 +194,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
|
|||
lwidth = ifont.getStringWidth("(*) Requires application restart");
|
||||
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
|
||||
"(*) Requires application restart",
|
||||
kTextAlignLeft);
|
||||
TextAlign::Left);
|
||||
|
||||
// Add items for tab 2
|
||||
addToFocusList(wid, myTab, tabID);
|
||||
|
|
|
@ -115,7 +115,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
wid.push_back(myNAspectRatio);
|
||||
myNAspectRatioLabel =
|
||||
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);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
|
@ -127,7 +127,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
wid.push_back(myPAspectRatio);
|
||||
myPAspectRatioLabel =
|
||||
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);
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
|
@ -140,7 +140,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
wid.push_back(myFrameRate);
|
||||
myFrameRateLabel =
|
||||
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);
|
||||
|
||||
// Add message concerning usage
|
||||
|
@ -148,7 +148,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
ypos = myTab->getHeight() - 5 - fontHeight - infofont.getFontHeight() - 10;
|
||||
new StaticTextWidget(myTab, infofont, 10, ypos,
|
||||
font.getStringWidth("(*) Requires application restart"), fontHeight,
|
||||
"(*) Requires application restart", kTextAlignLeft);
|
||||
"(*) Requires application restart", TextAlign::Left);
|
||||
|
||||
// Move over to the next column
|
||||
xpos += myNAspectRatio->getWidth() + myNAspectRatioLabel->getWidth() + 30;
|
||||
|
@ -228,7 +228,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
wid.push_back(myTV ## obj); \
|
||||
myTV ## obj ## Label = \
|
||||
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); \
|
||||
ypos += lineHeight + VGAP;
|
||||
|
||||
|
@ -269,7 +269,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent,
|
|||
xpos -= 8+8;
|
||||
myTVScanLabel =
|
||||
new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings"),
|
||||
fontHeight, "Scanline settings", kTextAlignLeft);
|
||||
fontHeight, "Scanline settings", TextAlign::Left);
|
||||
ypos += lineHeight;
|
||||
|
||||
xpos += 8+8;
|
||||
|
|
|
@ -268,7 +268,7 @@ Widget* Widget::setFocusForChain(GuiObject* boss, WidgetArray& arr,
|
|||
else
|
||||
tmp->_hasFocus = true;
|
||||
|
||||
s.frameRect(x, y, w, h, kWidFrameColor, kDashLine);
|
||||
s.frameRect(x, y, w, h, kWidFrameColor, FrameStyle::Dashed);
|
||||
|
||||
tmp->setDirty();
|
||||
s.setDirty();
|
||||
|
@ -289,7 +289,7 @@ void Widget::setDirtyInChain(Widget* start)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
|
||||
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),
|
||||
_align(align)
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ void StaticTextWidget::drawWidget(bool hilite)
|
|||
ButtonWidget::ButtonWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, int w, int h,
|
||||
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),
|
||||
_cmd(cmd)
|
||||
{
|
||||
|
@ -704,7 +704,7 @@ void SliderWidget::drawWidget(bool hilite)
|
|||
// Draw the label, if any
|
||||
if(_labelWidth > 0)
|
||||
s.drawString(_font, _label, _x, _y + 2, _labelWidth,
|
||||
isEnabled() ? kTextColor : kColor, kTextAlignRight);
|
||||
isEnabled() ? kTextColor : kColor, TextAlign::Right);
|
||||
|
||||
// Draw the box
|
||||
s.box(_x + _labelWidth, _y, _w - _labelWidth, _h, kColor, kShadowColor);
|
||||
|
|
|
@ -176,23 +176,23 @@ class StaticTextWidget : public Widget
|
|||
public:
|
||||
StaticTextWidget(GuiObject* boss, const GUI::Font& font,
|
||||
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,
|
||||
int x, int y,
|
||||
const string& text, TextAlignment align = kTextAlignLeft);
|
||||
const string& text, TextAlign align = TextAlign::Left);
|
||||
void setValue(int value);
|
||||
void setLabel(const string& label);
|
||||
void setAlign(TextAlignment align) { _align = align; }
|
||||
const string& getLabel() const { return _label; }
|
||||
bool isEditable() const { return _editable; }
|
||||
void setAlign(TextAlign align) { _align = align; }
|
||||
const string& getLabel() const { return _label; }
|
||||
bool isEditable() const { return _editable; }
|
||||
|
||||
protected:
|
||||
void drawWidget(bool hilite) override;
|
||||
|
||||
protected:
|
||||
string _label;
|
||||
bool _editable;
|
||||
TextAlignment _align;
|
||||
string _label;
|
||||
bool _editable;
|
||||
TextAlign _align;
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
Loading…
Reference in New Issue