mirror of https://github.com/stella-emu/stella.git
reworked TIAWidget
This commit is contained in:
parent
0b812334f3
commit
60346c78cf
|
@ -42,8 +42,13 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
const int fontWidth = lfont.getMaxCharWidth(),
|
const int fontWidth = lfont.getMaxCharWidth(),
|
||||||
fontHeight = lfont.getFontHeight(),
|
fontHeight = lfont.getFontHeight(),
|
||||||
lineHeight = lfont.getLineHeight(),
|
lineHeight = lfont.getLineHeight(),
|
||||||
buttonW = 7 * fontWidth;
|
buttonW = 7 * fontWidth,
|
||||||
int xpos = 10, ypos = 10, buttonX = 0, buttonY = 0;
|
buttonH = lineHeight,
|
||||||
|
hGap = fontWidth,
|
||||||
|
vGap = fontHeight / 2,
|
||||||
|
hBorder = 10,
|
||||||
|
vBorder = 10;
|
||||||
|
int xpos = hBorder, ypos = vBorder, buttonX, buttonY;
|
||||||
StaticTextWidget* t = nullptr;
|
StaticTextWidget* t = nullptr;
|
||||||
ButtonWidget* b = nullptr;
|
ButtonWidget* b = nullptr;
|
||||||
|
|
||||||
|
@ -56,51 +61,48 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
myVSync->setTarget(this);
|
myVSync->setTarget(this);
|
||||||
addFocusWidget(myVSync);
|
addFocusWidget(myVSync);
|
||||||
|
|
||||||
buttonX += myVSync->getRight() + 15;
|
buttonX += myVSync->getRight() + hGap * 2;
|
||||||
myVBlank = new CheckboxWidget(boss, lfont, buttonX, buttonY, "VBlank", kVBlankCmd);
|
myVBlank = new CheckboxWidget(boss, lfont, buttonX, buttonY, "VBlank", kVBlankCmd);
|
||||||
myVBlank->setTarget(this);
|
myVBlank->setTarget(this);
|
||||||
addFocusWidget(myVBlank);
|
addFocusWidget(myVBlank);
|
||||||
|
|
||||||
ypos += lineHeight * 2 + 6;
|
|
||||||
|
|
||||||
// Color registers
|
// Color registers
|
||||||
|
ypos = vBorder + lineHeight * 2 + vGap / 2;
|
||||||
static constexpr std::array<const char*, 4> regNames = {
|
static constexpr std::array<const char*, 4> regNames = {
|
||||||
"COLUP0", "COLUP1", "COLUPF", "COLUBK"
|
"COLUP0", "COLUP1", "COLUPF", "COLUBK"
|
||||||
};
|
};
|
||||||
for(int row = 0; row < 4; ++row)
|
for(int row = 0; row < 4; ++row)
|
||||||
{
|
new StaticTextWidget(boss, lfont, xpos, ypos + row * lineHeight + 2,
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2,
|
regNames[row]);
|
||||||
6*fontWidth, fontHeight, regNames[row], TextAlign::Left);
|
xpos += 6 * fontWidth + hGap;
|
||||||
}
|
|
||||||
xpos += 6*fontWidth + 8;
|
|
||||||
myColorRegs = new DataGridWidget(boss, nfont, xpos, ypos,
|
myColorRegs = new DataGridWidget(boss, nfont, xpos, ypos,
|
||||||
1, 4, 2, 8, Common::Base::Fmt::_16);
|
1, 4, 2, 8, Common::Base::Fmt::_16);
|
||||||
myColorRegs->setTarget(this);
|
myColorRegs->setTarget(this);
|
||||||
myColorRegs->setID(kColorRegsID);
|
myColorRegs->setID(kColorRegsID);
|
||||||
addFocusWidget(myColorRegs);
|
addFocusWidget(myColorRegs);
|
||||||
|
|
||||||
xpos += myColorRegs->colWidth() + 5;
|
xpos += myColorRegs->colWidth() + hGap / 2;
|
||||||
myCOLUP0Color = new ColorWidget(boss, nfont, xpos, ypos+2,
|
myCOLUP0Color = new ColorWidget(boss, nfont, xpos, ypos + 2,
|
||||||
static_cast<uInt32>(1.5*lineHeight), lineHeight - 4);
|
static_cast<uInt32>(1.5 * lineHeight), lineHeight - 4);
|
||||||
myCOLUP0Color->setTarget(this);
|
myCOLUP0Color->setTarget(this);
|
||||||
|
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
myCOLUP1Color = new ColorWidget(boss, nfont, xpos, ypos+2,
|
myCOLUP1Color = new ColorWidget(boss, nfont, xpos, ypos + 2,
|
||||||
static_cast<uInt32>(1.5*lineHeight), lineHeight - 4);
|
static_cast<uInt32>(1.5 * lineHeight), lineHeight - 4);
|
||||||
myCOLUP1Color->setTarget(this);
|
myCOLUP1Color->setTarget(this);
|
||||||
|
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
myCOLUPFColor = new ColorWidget(boss, nfont, xpos, ypos+2,
|
myCOLUPFColor = new ColorWidget(boss, nfont, xpos, ypos + 2,
|
||||||
static_cast<uInt32>(1.5*lineHeight), lineHeight - 4);
|
static_cast<uInt32>(1.5 * lineHeight), lineHeight - 4);
|
||||||
myCOLUPFColor->setTarget(this);
|
myCOLUPFColor->setTarget(this);
|
||||||
|
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
myCOLUBKColor = new ColorWidget(boss, nfont, xpos, ypos+2,
|
myCOLUBKColor = new ColorWidget(boss, nfont, xpos, ypos + 2,
|
||||||
static_cast<uInt32>(1.5*lineHeight), lineHeight - 4);
|
static_cast<uInt32>(1.5 * lineHeight), lineHeight - 4);
|
||||||
myCOLUBKColor->setTarget(this);
|
myCOLUBKColor->setTarget(this);
|
||||||
|
|
||||||
// Fixed debug colors
|
// Fixed debug colors
|
||||||
xpos += myCOLUP0Color->getWidth() + 30; ypos = 10 + lineHeight + 6;
|
xpos = myCOLUP0Color->getRight() + hGap * 4; ypos = vBorder + lineHeight + vGap / 2;
|
||||||
myFixedEnabled = new CheckboxWidget(boss, lfont, xpos, ypos, "Debug Colors", kDbgClCmd);
|
myFixedEnabled = new CheckboxWidget(boss, lfont, xpos, ypos, "Debug Colors", kDbgClCmd);
|
||||||
myFixedEnabled->setToolTip("Enable fixed debug colors", Event::ToggleFixedColors);
|
myFixedEnabled->setToolTip("Enable fixed debug colors", Event::ToggleFixedColors);
|
||||||
myFixedEnabled->setTarget(this);
|
myFixedEnabled->setTarget(this);
|
||||||
|
@ -112,74 +114,58 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
for(uInt32 row = 0; row <= 3; ++row)
|
for(uInt32 row = 0; row <= 3; ++row)
|
||||||
{
|
{
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, dbgLabels[row]);
|
||||||
dbgLabels[row], TextAlign::Left);
|
myFixedColors[row] = new ColorWidget(boss, nfont, t->getRight() + hGap,
|
||||||
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4,
|
ypos + 2, static_cast<uInt32>(1.5 * lineHeight), lineHeight - 4);
|
||||||
ypos + 2, static_cast<uInt32>(1.5*lineHeight), lineHeight - 4);
|
|
||||||
myFixedColors[row]->setTarget(this);
|
myFixedColors[row]->setTarget(this);
|
||||||
}
|
}
|
||||||
xpos += t->getWidth() + myFixedColors[0]->getWidth() + 24;
|
xpos = myFixedColors[0]->getRight() + hGap * 2;
|
||||||
ypos = 10 + lineHeight + 6;
|
ypos = vBorder + lineHeight + vGap / 2;
|
||||||
for(uInt32 row = 4; row <= 7; ++row)
|
for(uInt32 row = 4; row <= 7; ++row)
|
||||||
{
|
{
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, dbgLabels[row]);
|
||||||
dbgLabels[row], TextAlign::Left);
|
myFixedColors[row] = new ColorWidget(boss, nfont, t->getRight() + hGap,
|
||||||
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4,
|
ypos + 2, static_cast<uInt32>(1.5 * lineHeight), lineHeight - 4);
|
||||||
ypos + 2, static_cast<uInt32>(1.5*lineHeight), lineHeight - 4);
|
|
||||||
myFixedColors[row]->setTarget(this);
|
myFixedColors[row]->setTarget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// Collision register bits
|
// Collision register bits
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
xpos += myFixedColors[0]->getWidth() + 2*fontWidth + 60; ypos = 10;
|
xpos = myFixedColors[4]->getRight() + 6 * hGap; ypos = vBorder + lineHeight;
|
||||||
|
|
||||||
// Add all 15 collision bits (with labels)
|
// Add all 15 collision bits (with labels)
|
||||||
uInt32 cxclrY = 0;
|
|
||||||
xpos -= 2*fontWidth + 5; ypos += lineHeight;
|
|
||||||
static constexpr std::array<const char*, 5> rowLabel = { "P0", "P1", "M0", "M1", "BL" };
|
static constexpr std::array<const char*, 5> rowLabel = { "P0", "P1", "M0", "M1", "BL" };
|
||||||
static constexpr std::array<const char*, 5> colLabel = { "PF", "BL", "M1", "M0", "P1" };
|
static constexpr std::array<const char*, 5> colLabel = { "PF", "BL", "M1", "M0", "P1" };
|
||||||
const uInt32 lwidth = 2 * fontWidth;
|
int idx = 0;
|
||||||
int collX = xpos + lwidth + 5, collY = ypos, idx = 0;
|
|
||||||
for(uInt32 row = 0; row < 5; ++row)
|
for(uInt32 row = 0; row < 5; ++row)
|
||||||
{
|
{
|
||||||
// Add vertical label
|
// Add vertical label
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + row*(lineHeight+3),
|
t = new StaticTextWidget(boss, lfont, xpos, ypos, rowLabel[row]);
|
||||||
2*fontWidth, fontHeight,
|
int collX = t->getRight() + hGap;
|
||||||
rowLabel[row], TextAlign::Left);
|
|
||||||
|
|
||||||
for(uInt32 col = 0; col < 5 - row; ++col, ++idx)
|
for(uInt32 col = 0; col < 5 - row; ++col, ++idx)
|
||||||
{
|
{
|
||||||
myCollision[idx] = new CheckboxWidget(boss, lfont, collX, collY, "", CheckboxWidget::kCheckActionCmd);
|
myCollision[idx] = new CheckboxWidget(boss, lfont, collX, ypos, "", CheckboxWidget::kCheckActionCmd);
|
||||||
myCollision[idx]->setTarget(this);
|
myCollision[idx]->setTarget(this);
|
||||||
myCollision[idx]->setID(idx);
|
myCollision[idx]->setID(idx);
|
||||||
|
|
||||||
// We need to know where the PF_BL register is, to properly position
|
if(row == 0)
|
||||||
// the CXCLR button
|
{
|
||||||
if(idx == kBL_PFID)
|
// Add centered horizontal label
|
||||||
cxclrY = collY;
|
int labelx = collX - (2 * fontWidth - myCollision[idx]->getWidth()) / 2;
|
||||||
|
new StaticTextWidget(boss, lfont, labelx, ypos - lineHeight, colLabel[col]);
|
||||||
// Add horizontal label
|
|
||||||
uInt32 labelx = collX;
|
|
||||||
if(lwidth > static_cast<uInt32>(myCollision[idx]->getWidth()))
|
|
||||||
labelx -= (lwidth - myCollision[idx]->getWidth()) / 2;
|
|
||||||
else
|
|
||||||
labelx += (myCollision[idx]->getWidth() - lwidth) / 2;
|
|
||||||
|
|
||||||
new StaticTextWidget(boss, lfont, labelx, ypos-lineHeight, lwidth, fontHeight,
|
|
||||||
colLabel[col], TextAlign::Left);
|
|
||||||
|
|
||||||
collX += myCollision[idx]->getWidth() + 10;
|
|
||||||
}
|
}
|
||||||
collX = xpos + lwidth + 5;
|
collX += fontWidth * 2 + hGap;
|
||||||
collY += lineHeight+3;
|
}
|
||||||
|
ypos += lineHeight + 3; // constant gap for all font sizes because checkboxes have the same size too
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear all collision bits
|
// Clear all collision bits
|
||||||
buttonX = collX + 5*(myCollision[0]->getWidth() + 10) - buttonW - 10;
|
buttonX = myCollision[kP0_P1ID]->getRight() - buttonW;
|
||||||
buttonY = lineHeight == 15 ? cxclrY : cxclrY - 4;
|
buttonY = myCollision[kBL_PFID]->getBottom() - buttonH;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, buttonH,
|
||||||
"CXCLR", kCxclrCmd);
|
"CXCLR", kCxclrCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
@ -188,22 +174,17 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
// P0 register info
|
// P0 register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// grP0 (new)
|
// grP0 (new)
|
||||||
xpos = 10; ypos = collY + 4;
|
ypos = std::max(myFixedColors[3]->getBottom(), b->getBottom()) + vGap * 1.5;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, hBorder, ypos + 2, "P0");
|
||||||
"P0", TextAlign::Left);
|
myGRP0 = new TogglePixelWidget(boss, nfont, t->getRight() + hGap, ypos + 1, 8, 1);
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myGRP0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
|
||||||
myGRP0->setTarget(this);
|
myGRP0->setTarget(this);
|
||||||
myGRP0->setID(kGRP0ID);
|
myGRP0->setID(kGRP0ID);
|
||||||
myGRP0->clearBackgroundColor();
|
myGRP0->clearBackgroundColor();
|
||||||
addFocusWidget(myGRP0);
|
addFocusWidget(myGRP0);
|
||||||
|
|
||||||
// posP0
|
// posP0
|
||||||
xpos += myGRP0->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myGRP0->getRight() + hGap * 1.5, ypos + 2, "Pos#");
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
myPosP0 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Pos#", TextAlign::Left);
|
|
||||||
xpos += t->getWidth() + 2;
|
|
||||||
myPosP0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 3, 8, Common::Base::Fmt::_10);
|
1, 1, 3, 8, Common::Base::Fmt::_10);
|
||||||
myPosP0->setTarget(this);
|
myPosP0->setTarget(this);
|
||||||
myPosP0->setID(kPosP0ID);
|
myPosP0->setID(kPosP0ID);
|
||||||
|
@ -211,84 +192,69 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
addFocusWidget(myPosP0);
|
addFocusWidget(myPosP0);
|
||||||
|
|
||||||
// hmP0
|
// hmP0
|
||||||
xpos += myPosP0->getWidth() + fontWidth + 12;
|
t = new StaticTextWidget(boss, lfont, myPosP0->getRight() + hGap * 3, ypos + 2, "HM");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
myHMP0 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"HM", TextAlign::Left);
|
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myHMP0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
||||||
myHMP0->setTarget(this);
|
myHMP0->setTarget(this);
|
||||||
myHMP0->setID(kHMP0ID);
|
myHMP0->setID(kHMP0ID);
|
||||||
addFocusWidget(myHMP0);
|
addFocusWidget(myHMP0);
|
||||||
|
|
||||||
// P0 reflect
|
// P0 reflect
|
||||||
xpos += myHMP0->getWidth() + 15;
|
myRefP0 = new CheckboxWidget(boss, lfont, myHMP0->getRight() + hGap * 2, ypos + 1,
|
||||||
myRefP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"Reflect", CheckboxWidget::kCheckActionCmd);
|
"Reflect", CheckboxWidget::kCheckActionCmd);
|
||||||
myRefP0->setTarget(this);
|
myRefP0->setTarget(this);
|
||||||
myRefP0->setID(kRefP0ID);
|
myRefP0->setID(kRefP0ID);
|
||||||
addFocusWidget(myRefP0);
|
addFocusWidget(myRefP0);
|
||||||
|
|
||||||
// P0 reset
|
// P0 reset
|
||||||
xpos += myRefP0->getWidth() + 12;
|
buttonX = myRefP0->getRight() + hGap * 2;
|
||||||
buttonX = xpos;
|
b = new ButtonWidget(boss, lfont, buttonX, ypos, buttonW, buttonH,
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
|
||||||
"RESP0", kResP0Cmd);
|
"RESP0", kResP0Cmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
// grP0 (old)
|
// grP0 (old)
|
||||||
xpos = 10 + 2*fontWidth + 5; ypos += myGRP0->getHeight() + 5;
|
ypos += myGRP0->getHeight() + vGap / 2;
|
||||||
myGRP0Old = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
myGRP0Old = new TogglePixelWidget(boss, nfont, myGRP0->getLeft(), ypos + 1, 8, 1);
|
||||||
myGRP0Old->setTarget(this);
|
myGRP0Old->setTarget(this);
|
||||||
myGRP0Old->setID(kGRP0OldID);
|
myGRP0Old->setID(kGRP0OldID);
|
||||||
myGRP0Old->clearBackgroundColor();
|
myGRP0Old->clearBackgroundColor();
|
||||||
addFocusWidget(myGRP0Old);
|
addFocusWidget(myGRP0Old);
|
||||||
|
|
||||||
// P0 delay
|
// P0 delay
|
||||||
xpos += myGRP0Old->getWidth() + 12;
|
myDelP0 = new CheckboxWidget(boss, lfont, myGRP0Old->getRight() + hGap * 1.5, ypos + 2,
|
||||||
myDelP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"VDel", CheckboxWidget::kCheckActionCmd);
|
"VDel", CheckboxWidget::kCheckActionCmd);
|
||||||
myDelP0->setTarget(this);
|
myDelP0->setTarget(this);
|
||||||
myDelP0->setID(kDelP0ID);
|
myDelP0->setID(kDelP0ID);
|
||||||
addFocusWidget(myDelP0);
|
addFocusWidget(myDelP0);
|
||||||
|
|
||||||
// NUSIZ0 (player portion)
|
// NUSIZ0 (player portion)
|
||||||
xpos += myDelP0->getWidth() + 12;
|
new StaticTextWidget(boss, lfont, myHMP0->getLeft() - fontWidth * 5 - hGap / 2, ypos + 2, "NuSiz");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
|
myNusizP0 = new DataGridWidget(boss, nfont, myHMP0->getLeft(), ypos,
|
||||||
"NuSiz", TextAlign::Left);
|
|
||||||
xpos += 5*fontWidth + 5;
|
|
||||||
myNusizP0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 3, Common::Base::Fmt::_16_1);
|
1, 1, 1, 3, Common::Base::Fmt::_16_1);
|
||||||
myNusizP0->setTarget(this);
|
myNusizP0->setTarget(this);
|
||||||
myNusizP0->setID(kNusizP0ID);
|
myNusizP0->setID(kNusizP0ID);
|
||||||
addFocusWidget(myNusizP0);
|
addFocusWidget(myNusizP0);
|
||||||
|
|
||||||
xpos += myNusizP0->getWidth() + 5;
|
myNusizP0Text = new EditTextWidget(boss, nfont, myNusizP0->getRight() + hGap / 2, ypos,
|
||||||
myNusizP0Text = new EditTextWidget(boss, nfont, xpos, ypos, 21*fontWidth,
|
21 * fontWidth, lineHeight);
|
||||||
lineHeight, "");
|
|
||||||
myNusizP0Text->setEditable(false, true);
|
myNusizP0Text->setEditable(false, true);
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// P1 register info
|
// P1 register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// grP1 (new)
|
// grP1 (new)
|
||||||
xpos = 10; ypos += lineHeight + 12;
|
ypos += lineHeight + vGap * 1.5;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, hBorder, ypos + 2, "P1");
|
||||||
"P1", TextAlign::Left);
|
myGRP1 = new TogglePixelWidget(boss, nfont, t->getRight() + hGap, ypos + 1, 8, 1);
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myGRP1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
|
||||||
myGRP1->setTarget(this);
|
myGRP1->setTarget(this);
|
||||||
myGRP1->setID(kGRP1ID);
|
myGRP1->setID(kGRP1ID);
|
||||||
myGRP1->clearBackgroundColor();
|
myGRP1->clearBackgroundColor();
|
||||||
addFocusWidget(myGRP1);
|
addFocusWidget(myGRP1);
|
||||||
|
|
||||||
// posP1
|
// posP1
|
||||||
xpos += myGRP1->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myGRP1->getRight() + hGap * 1.5, ypos + 2, "Pos#");
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
myPosP1 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Pos#", TextAlign::Left);
|
|
||||||
xpos += t->getWidth() + 2;
|
|
||||||
myPosP1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 3, 8, Common::Base::Fmt::_10);
|
1, 1, 3, 8, Common::Base::Fmt::_10);
|
||||||
myPosP1->setTarget(this);
|
myPosP1->setTarget(this);
|
||||||
myPosP1->setID(kPosP1ID);
|
myPosP1->setID(kPosP1ID);
|
||||||
|
@ -296,83 +262,68 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
addFocusWidget(myPosP1);
|
addFocusWidget(myPosP1);
|
||||||
|
|
||||||
// hmP1
|
// hmP1
|
||||||
xpos += myPosP1->getWidth() + fontWidth + 12;
|
t = new StaticTextWidget(boss, lfont, myPosP1->getRight() + hGap * 3, ypos + 2, "HM");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
myHMP1 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"HM", TextAlign::Left);
|
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myHMP1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
||||||
myHMP1->setTarget(this);
|
myHMP1->setTarget(this);
|
||||||
myHMP1->setID(kHMP1ID);
|
myHMP1->setID(kHMP1ID);
|
||||||
addFocusWidget(myHMP1);
|
addFocusWidget(myHMP1);
|
||||||
|
|
||||||
// P1 reflect
|
// P1 reflect
|
||||||
xpos += myHMP1->getWidth() + 15;
|
myRefP1 = new CheckboxWidget(boss, lfont, myHMP1->getRight() + hGap * 2, ypos + 1,
|
||||||
myRefP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"Reflect", CheckboxWidget::kCheckActionCmd);
|
"Reflect", CheckboxWidget::kCheckActionCmd);
|
||||||
myRefP1->setTarget(this);
|
myRefP1->setTarget(this);
|
||||||
myRefP1->setID(kRefP1ID);
|
myRefP1->setID(kRefP1ID);
|
||||||
addFocusWidget(myRefP1);
|
addFocusWidget(myRefP1);
|
||||||
|
|
||||||
// P1 reset
|
// P1 reset
|
||||||
xpos += myRefP1->getWidth() + 12;
|
b = new ButtonWidget(boss, lfont, myRefP1->getRight() + hGap * 2, ypos,
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
buttonW, buttonH, "RESP1", kResP1Cmd);
|
||||||
"RESP1", kResP1Cmd);
|
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
// grP1 (old)
|
// grP1 (old)
|
||||||
xpos = 10 + 2*fontWidth + 5; ypos += myGRP1->getHeight() + 5;
|
ypos += myGRP1->getHeight() + vGap / 2;
|
||||||
myGRP1Old = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
myGRP1Old = new TogglePixelWidget(boss, nfont, myGRP1->getLeft(), ypos + 1, 8, 1);
|
||||||
myGRP1Old->setTarget(this);
|
myGRP1Old->setTarget(this);
|
||||||
myGRP1Old->setID(kGRP1OldID);
|
myGRP1Old->setID(kGRP1OldID);
|
||||||
myGRP1Old->clearBackgroundColor();
|
myGRP1Old->clearBackgroundColor();
|
||||||
addFocusWidget(myGRP1Old);
|
addFocusWidget(myGRP1Old);
|
||||||
|
|
||||||
// P1 delay
|
// P1 delay
|
||||||
xpos += myGRP1Old->getWidth() + 12;
|
myDelP1 = new CheckboxWidget(boss, lfont, myGRP1Old->getRight() + hGap * 1.5, ypos + 2,
|
||||||
myDelP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"VDel", CheckboxWidget::kCheckActionCmd);
|
"VDel", CheckboxWidget::kCheckActionCmd);
|
||||||
myDelP1->setTarget(this);
|
myDelP1->setTarget(this);
|
||||||
myDelP1->setID(kDelP1ID);
|
myDelP1->setID(kDelP1ID);
|
||||||
addFocusWidget(myDelP1);
|
addFocusWidget(myDelP1);
|
||||||
|
|
||||||
// NUSIZ1 (player portion)
|
// NUSIZ1 (player portion)
|
||||||
xpos += myDelP1->getWidth() + 12;
|
new StaticTextWidget(boss, lfont, myHMP1->getLeft() - fontWidth * 5 - hGap / 2, ypos + 2, "NuSiz");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 5*fontWidth, fontHeight,
|
myNusizP1 = new DataGridWidget(boss, nfont, myHMP1->getLeft(), ypos,
|
||||||
"NuSiz", TextAlign::Left);
|
|
||||||
xpos += 5*fontWidth + 5;
|
|
||||||
myNusizP1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 3, Common::Base::Fmt::_16_1);
|
1, 1, 1, 3, Common::Base::Fmt::_16_1);
|
||||||
myNusizP1->setTarget(this);
|
myNusizP1->setTarget(this);
|
||||||
myNusizP1->setID(kNusizP1ID);
|
myNusizP1->setID(kNusizP1ID);
|
||||||
addFocusWidget(myNusizP1);
|
addFocusWidget(myNusizP1);
|
||||||
|
|
||||||
xpos += myNusizP1->getWidth() + 5;
|
myNusizP1Text = new EditTextWidget(boss, nfont, myNusizP1->getRight() + hGap / 2, ypos,
|
||||||
myNusizP1Text = new EditTextWidget(boss, nfont, xpos, ypos, 21*fontWidth,
|
21 * fontWidth, lineHeight);
|
||||||
lineHeight, "");
|
|
||||||
myNusizP1Text->setEditable(false, true);
|
myNusizP1Text->setEditable(false, true);
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// M0 register info
|
// M0 register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// enaM0
|
// enaM0
|
||||||
xpos = 10; ypos += lineHeight + 12;
|
ypos += lineHeight + vGap * 1.5;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, hBorder, ypos + 2, "M0");
|
||||||
"M0", TextAlign::Left);
|
myEnaM0 = new TogglePixelWidget(boss, nfont, t->getRight() + hGap, ypos + 1, 1, 1);
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myEnaM0 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
|
|
||||||
myEnaM0->setTarget(this);
|
myEnaM0->setTarget(this);
|
||||||
myEnaM0->setID(kEnaM0ID);
|
myEnaM0->setID(kEnaM0ID);
|
||||||
myEnaM0->clearBackgroundColor();
|
myEnaM0->clearBackgroundColor();
|
||||||
addFocusWidget(myEnaM0);
|
addFocusWidget(myEnaM0);
|
||||||
|
|
||||||
// posM0
|
// posM0
|
||||||
xpos += myEnaM0->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myEnaM0->getRight() + hGap * 1.5, ypos + 2, "Pos#");
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
myPosM0 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Pos#", TextAlign::Left);
|
|
||||||
xpos += t->getWidth() + 2;
|
|
||||||
myPosM0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 3, 8, Common::Base::Fmt::_10);
|
1, 1, 3, 8, Common::Base::Fmt::_10);
|
||||||
myPosM0->setTarget(this);
|
myPosM0->setTarget(this);
|
||||||
myPosM0->setID(kPosM0ID);
|
myPosM0->setID(kPosM0ID);
|
||||||
|
@ -380,38 +331,30 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
addFocusWidget(myPosM0);
|
addFocusWidget(myPosM0);
|
||||||
|
|
||||||
// hmM0
|
// hmM0
|
||||||
xpos += myPosM0->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myPosM0->getRight() + hGap * 1.5, ypos + 2, "HM");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
myHMM0 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"HM", TextAlign::Left);
|
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myHMM0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
||||||
myHMM0->setTarget(this);
|
myHMM0->setTarget(this);
|
||||||
myHMM0->setID(kHMM0ID);
|
myHMM0->setID(kHMM0ID);
|
||||||
addFocusWidget(myHMM0);
|
addFocusWidget(myHMM0);
|
||||||
|
|
||||||
// NUSIZ0 (missile portion)
|
// NUSIZ0 (missile portion)
|
||||||
xpos += myHMM0->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myHMM0->getRight() + hGap * 1.5, ypos + 2, "Size");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
myNusizM0 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Size", TextAlign::Left);
|
|
||||||
xpos += 4*fontWidth + 5;
|
|
||||||
myNusizM0 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 2, Common::Base::Fmt::_16_1);
|
1, 1, 1, 2, Common::Base::Fmt::_16_1);
|
||||||
myNusizM0->setTarget(this);
|
myNusizM0->setTarget(this);
|
||||||
myNusizM0->setID(kNusizM0ID);
|
myNusizM0->setID(kNusizM0ID);
|
||||||
addFocusWidget(myNusizM0);
|
addFocusWidget(myNusizM0);
|
||||||
|
|
||||||
// M0 reset to player 0
|
// M0 reset to player 0
|
||||||
xpos += myNusizM0->getWidth() + 15;
|
myResMP0 = new CheckboxWidget(boss, lfont, myNusizM0->getRight() + hGap * 2, ypos + 1,
|
||||||
myResMP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"Reset to P0", CheckboxWidget::kCheckActionCmd);
|
"Reset to P0", CheckboxWidget::kCheckActionCmd);
|
||||||
myResMP0->setTarget(this);
|
myResMP0->setTarget(this);
|
||||||
myResMP0->setID(kResMP0ID);
|
myResMP0->setID(kResMP0ID);
|
||||||
addFocusWidget(myResMP0);
|
addFocusWidget(myResMP0);
|
||||||
|
|
||||||
// M0 reset
|
// M0 reset
|
||||||
xpos = buttonX;
|
b = new ButtonWidget(boss, lfont, buttonX, ypos, buttonW, buttonH,
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
|
||||||
"RESM0", kResM0Cmd);
|
"RESM0", kResM0Cmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
@ -420,22 +363,17 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
// M1 register info
|
// M1 register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// enaM1
|
// enaM1
|
||||||
xpos = 10; ypos += lineHeight + 4;
|
ypos += lineHeight + vGap / 2;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, hBorder, ypos + 2, "M1");
|
||||||
"M1", TextAlign::Left);
|
myEnaM1 = new TogglePixelWidget(boss, nfont, t->getRight() + hGap, ypos + 1, 1, 1);
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myEnaM1 = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
|
|
||||||
myEnaM1->setTarget(this);
|
myEnaM1->setTarget(this);
|
||||||
myEnaM1->setID(kEnaM1ID);
|
myEnaM1->setID(kEnaM1ID);
|
||||||
myEnaM1->clearBackgroundColor();
|
myEnaM1->clearBackgroundColor();
|
||||||
addFocusWidget(myEnaM1);
|
addFocusWidget(myEnaM1);
|
||||||
|
|
||||||
// posM0
|
// posM0
|
||||||
xpos += myEnaM1->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myEnaM1->getRight() + hGap * 1.5, ypos + 2, "Pos#");
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
myPosM1 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Pos#", TextAlign::Left);
|
|
||||||
xpos += t->getWidth() + 2;
|
|
||||||
myPosM1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 3, 8, Common::Base::Fmt::_10);
|
1, 1, 3, 8, Common::Base::Fmt::_10);
|
||||||
myPosM1->setTarget(this);
|
myPosM1->setTarget(this);
|
||||||
myPosM1->setID(kPosM1ID);
|
myPosM1->setID(kPosM1ID);
|
||||||
|
@ -443,38 +381,30 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
addFocusWidget(myPosM1);
|
addFocusWidget(myPosM1);
|
||||||
|
|
||||||
// hmM0
|
// hmM0
|
||||||
xpos += myPosM1->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myPosM1->getRight() + hGap * 1.5, ypos + 2, "HM");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
myHMM1 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"HM", TextAlign::Left);
|
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myHMM1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
||||||
myHMM1->setTarget(this);
|
myHMM1->setTarget(this);
|
||||||
myHMM1->setID(kHMM1ID);
|
myHMM1->setID(kHMM1ID);
|
||||||
addFocusWidget(myHMM1);
|
addFocusWidget(myHMM1);
|
||||||
|
|
||||||
// NUSIZ1 (missile portion)
|
// NUSIZ1 (missile portion)
|
||||||
xpos += myHMM1->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myHMM1->getRight() + hGap * 1.5, ypos + 2, "Size");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
myNusizM1 = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Size", TextAlign::Left);
|
|
||||||
xpos += 4*fontWidth + 5;
|
|
||||||
myNusizM1 = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 2, Common::Base::Fmt::_16_1);
|
1, 1, 1, 2, Common::Base::Fmt::_16_1);
|
||||||
myNusizM1->setTarget(this);
|
myNusizM1->setTarget(this);
|
||||||
myNusizM1->setID(kNusizM1ID);
|
myNusizM1->setID(kNusizM1ID);
|
||||||
addFocusWidget(myNusizM1);
|
addFocusWidget(myNusizM1);
|
||||||
|
|
||||||
// M1 reset to player 0
|
// M1 reset to player 0
|
||||||
xpos += myNusizM1->getWidth() + 15;
|
myResMP1 = new CheckboxWidget(boss, lfont, myNusizM1->getRight() + hGap * 2, ypos + 1,
|
||||||
myResMP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"Reset to P1", CheckboxWidget::kCheckActionCmd);
|
"Reset to P1", CheckboxWidget::kCheckActionCmd);
|
||||||
myResMP1->setTarget(this);
|
myResMP1->setTarget(this);
|
||||||
myResMP1->setID(kResMP1ID);
|
myResMP1->setID(kResMP1ID);
|
||||||
addFocusWidget(myResMP1);
|
addFocusWidget(myResMP1);
|
||||||
|
|
||||||
// M1 reset
|
// M1 reset
|
||||||
xpos = buttonX;
|
b = new ButtonWidget(boss, lfont, buttonX, ypos, buttonW, buttonH,
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
|
||||||
"RESM1", kResM1Cmd);
|
"RESM1", kResM1Cmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
@ -483,22 +413,17 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
// BL register info
|
// BL register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// enaBL
|
// enaBL
|
||||||
xpos = 10; ypos += lineHeight + 4;
|
ypos += lineHeight + vGap / 2;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, hBorder, ypos + 2, "BL");
|
||||||
"BL", TextAlign::Left);
|
myEnaBL = new TogglePixelWidget(boss, nfont, t->getRight() + hGap, ypos + 1, 1, 1);
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myEnaBL = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
|
|
||||||
myEnaBL->setTarget(this);
|
myEnaBL->setTarget(this);
|
||||||
myEnaBL->setID(kEnaBLID);
|
myEnaBL->setID(kEnaBLID);
|
||||||
myEnaBL->clearBackgroundColor();
|
myEnaBL->clearBackgroundColor();
|
||||||
addFocusWidget(myEnaBL);
|
addFocusWidget(myEnaBL);
|
||||||
|
|
||||||
// posBL
|
// posBL
|
||||||
xpos += myEnaBL->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myEnaBL->getRight() + hGap * 1.5, ypos + 2, "Pos#");
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
myPosBL = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Pos#", TextAlign::Left);
|
|
||||||
xpos += t->getWidth() + 2;
|
|
||||||
myPosBL = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 3, 8, Common::Base::Fmt::_10);
|
1, 1, 3, 8, Common::Base::Fmt::_10);
|
||||||
myPosBL->setTarget(this);
|
myPosBL->setTarget(this);
|
||||||
myPosBL->setID(kPosBLID);
|
myPosBL->setID(kPosBLID);
|
||||||
|
@ -506,45 +431,37 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
addFocusWidget(myPosBL);
|
addFocusWidget(myPosBL);
|
||||||
|
|
||||||
// hmBL
|
// hmBL
|
||||||
xpos += myPosBL->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myPosBL->getRight() + hGap * 1.5, ypos + 2, "HM");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
myHMBL = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"HM", TextAlign::Left);
|
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myHMBL = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
1, 1, 1, 4, Common::Base::Fmt::_16_1);
|
||||||
myHMBL->setTarget(this);
|
myHMBL->setTarget(this);
|
||||||
myHMBL->setID(kHMBLID);
|
myHMBL->setID(kHMBLID);
|
||||||
addFocusWidget(myHMBL);
|
addFocusWidget(myHMBL);
|
||||||
|
|
||||||
// CTRLPF (size portion)
|
// CTRLPF (size portion)
|
||||||
xpos += myHMBL->getWidth() + 12;
|
t = new StaticTextWidget(boss, lfont, myHMBL->getRight() + hGap * 1.5, ypos + 2, "Size");
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 4*fontWidth, fontHeight,
|
mySizeBL = new DataGridWidget(boss, nfont, t->getRight() + hGap / 2, ypos,
|
||||||
"Size", TextAlign::Left);
|
|
||||||
xpos += 4*fontWidth + 5;
|
|
||||||
mySizeBL = new DataGridWidget(boss, nfont, xpos, ypos,
|
|
||||||
1, 1, 1, 2, Common::Base::Fmt::_16_1);
|
1, 1, 1, 2, Common::Base::Fmt::_16_1);
|
||||||
mySizeBL->setTarget(this);
|
mySizeBL->setTarget(this);
|
||||||
mySizeBL->setID(kSizeBLID);
|
mySizeBL->setID(kSizeBLID);
|
||||||
addFocusWidget(mySizeBL);
|
addFocusWidget(mySizeBL);
|
||||||
|
|
||||||
// Reset ball
|
// Reset ball
|
||||||
xpos = buttonX;
|
b = new ButtonWidget(boss, lfont, buttonX, ypos, buttonW, buttonH,
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
|
||||||
"RESBL", kResBLCmd);
|
"RESBL", kResBLCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
// Ball (old)
|
// Ball (old)
|
||||||
xpos = 10 + 2*fontWidth + 5; ypos += myEnaBL->getHeight() + 5;
|
ypos += lineHeight + hGap / 2;
|
||||||
myEnaBLOld = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 1, 1);
|
myEnaBLOld = new TogglePixelWidget(boss, nfont, myEnaBL->getLeft(), ypos + 1, 1, 1);
|
||||||
myEnaBLOld->setTarget(this);
|
myEnaBLOld->setTarget(this);
|
||||||
myEnaBLOld->setID(kEnaBLOldID);
|
myEnaBLOld->setID(kEnaBLOldID);
|
||||||
myEnaBLOld->clearBackgroundColor();
|
myEnaBLOld->clearBackgroundColor();
|
||||||
addFocusWidget(myEnaBLOld);
|
addFocusWidget(myEnaBLOld);
|
||||||
|
|
||||||
// Ball delay
|
// Ball delay
|
||||||
xpos += myEnaBLOld->getWidth() + 12;
|
myDelBL = new CheckboxWidget(boss, lfont, myEnaBLOld->getRight() + hGap * 1.5, ypos + 2,
|
||||||
myDelBL = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"VDel", CheckboxWidget::kCheckActionCmd);
|
"VDel", CheckboxWidget::kCheckActionCmd);
|
||||||
myDelBL->setTarget(this);
|
myDelBL->setTarget(this);
|
||||||
myDelBL->setID(kDelBLID);
|
myDelBL->setID(kDelBLID);
|
||||||
|
@ -561,111 +478,97 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
};
|
};
|
||||||
|
|
||||||
// PF0
|
// PF0
|
||||||
xpos = 10; ypos += lineHeight + sfHeight + 6;
|
ypos += lineHeight + sfHeight + vGap * 1.5;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
t = new StaticTextWidget(boss, lfont, hBorder, ypos + 2, "PF");
|
||||||
"PF", TextAlign::Left);
|
myPF[0] = new TogglePixelWidget(boss, nfont, t->getRight() + hGap, ypos + 1, 4, 1, 4);
|
||||||
xpos += 2*fontWidth + 5;
|
|
||||||
myPF[0] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 4, 1, 4);
|
|
||||||
myPF[0]->setTarget(this);
|
myPF[0]->setTarget(this);
|
||||||
myPF[0]->setID(kPF0ID);
|
myPF[0]->setID(kPF0ID);
|
||||||
addFocusWidget(myPF[0]);
|
addFocusWidget(myPF[0]);
|
||||||
|
|
||||||
// PF1
|
// PF1
|
||||||
xpos += myPF[0]->getWidth() + 2;
|
myPF[1] = new TogglePixelWidget(boss, nfont, myPF[0]->getRight() + hGap / 2, ypos + 1, 8, 1);
|
||||||
myPF[1] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
|
||||||
myPF[1]->setTarget(this);
|
myPF[1]->setTarget(this);
|
||||||
myPF[1]->setID(kPF1ID);
|
myPF[1]->setID(kPF1ID);
|
||||||
addFocusWidget(myPF[1]);
|
addFocusWidget(myPF[1]);
|
||||||
|
|
||||||
// PF2
|
// PF2
|
||||||
xpos += myPF[1]->getWidth() + 2;
|
myPF[2] = new TogglePixelWidget(boss, nfont, myPF[1]->getRight() + hGap / 2, ypos + 1, 8, 1);
|
||||||
myPF[2] = new TogglePixelWidget(boss, nfont, xpos, ypos+1, 8, 1);
|
|
||||||
myPF[2]->setTarget(this);
|
myPF[2]->setTarget(this);
|
||||||
myPF[2]->setID(kPF2ID);
|
myPF[2]->setID(kPF2ID);
|
||||||
addFocusWidget(myPF[2]);
|
addFocusWidget(myPF[2]);
|
||||||
|
|
||||||
// PFx bit labels
|
// PFx bit labels
|
||||||
const auto start = [&](int sw) { return (sw - sfWidth) / 2; };
|
const auto start = [&](int sw) { return (sw - sfWidth + 2) / 2; };
|
||||||
const int colw = myPF[0]->getWidth() / 4;
|
const int colw = myPF[0]->getWidth() / 4;
|
||||||
xpos = 10 + 2*fontWidth + 5 + start(colw);
|
xpos = myPF[0]->getLeft() + start(colw);
|
||||||
const int _ypos = ypos - sfHeight;
|
const int _ypos = ypos - sfHeight;
|
||||||
for(int i = 4; i <= 7; ++i)
|
for(int i = 4; i <= 7; ++i)
|
||||||
{
|
{
|
||||||
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
|
new StaticTextWidget(boss, sf, xpos, _ypos, bitNames[i]);
|
||||||
bitNames[i], TextAlign::Left);
|
|
||||||
xpos += colw;
|
xpos += colw;
|
||||||
}
|
}
|
||||||
xpos = 10 + 2*fontWidth + 5 + myPF[0]->getWidth() + 2 + start(colw);
|
xpos = myPF[1]->getLeft() + start(colw);
|
||||||
for(int i = 7; i >= 0; --i)
|
for(int i = 7; i >= 0; --i)
|
||||||
{
|
{
|
||||||
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
|
new StaticTextWidget(boss, sf, xpos, _ypos, bitNames[i]);
|
||||||
bitNames[i], TextAlign::Left);
|
|
||||||
xpos += colw;
|
xpos += colw;
|
||||||
}
|
}
|
||||||
xpos = 10 + 2*fontWidth + 5 + myPF[0]->getWidth() + 2 +
|
xpos = myPF[2]->getLeft() + start(colw);
|
||||||
myPF[1]->getWidth() + 2 + start(colw);
|
|
||||||
for(int i = 0; i <= 7; ++i)
|
for(int i = 0; i <= 7; ++i)
|
||||||
{
|
{
|
||||||
new StaticTextWidget(boss, sf, xpos, _ypos, sfWidth, sfHeight,
|
new StaticTextWidget(boss, sf, xpos, _ypos, bitNames[i]);
|
||||||
bitNames[i], TextAlign::Left);
|
|
||||||
xpos += colw;
|
xpos += colw;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PF reflect, score, priority
|
// PF reflect, score, priority
|
||||||
xpos = 10 + 4*fontWidth; ypos += lineHeight + 6;
|
ypos = myPF[0]->getBottom() + vGap / 2;
|
||||||
myRefPF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
myRefPF = new CheckboxWidget(boss, lfont, myPF[0]->getLeft(), ypos + 1,
|
||||||
"Reflect", CheckboxWidget::kCheckActionCmd);
|
"Reflect", CheckboxWidget::kCheckActionCmd);
|
||||||
myRefPF->setTarget(this);
|
myRefPF->setTarget(this);
|
||||||
myRefPF->setID(kRefPFID);
|
myRefPF->setID(kRefPFID);
|
||||||
addFocusWidget(myRefPF);
|
addFocusWidget(myRefPF);
|
||||||
|
|
||||||
xpos += myRefPF->getWidth() + 15;
|
myScorePF = new CheckboxWidget(boss, lfont, myRefPF->getRight() + hGap * 2, ypos + 1,
|
||||||
myScorePF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"Score", CheckboxWidget::kCheckActionCmd);
|
"Score", CheckboxWidget::kCheckActionCmd);
|
||||||
myScorePF->setTarget(this);
|
myScorePF->setTarget(this);
|
||||||
myScorePF->setID(kScorePFID);
|
myScorePF->setID(kScorePFID);
|
||||||
addFocusWidget(myScorePF);
|
addFocusWidget(myScorePF);
|
||||||
|
|
||||||
xpos += myScorePF->getWidth() + 15;
|
myPriorityPF = new CheckboxWidget(boss, lfont, myScorePF->getRight() + hGap * 2, ypos + 1,
|
||||||
myPriorityPF = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
|
||||||
"Priority", CheckboxWidget::kCheckActionCmd);
|
"Priority", CheckboxWidget::kCheckActionCmd);
|
||||||
myPriorityPF->setTarget(this);
|
myPriorityPF->setTarget(this);
|
||||||
myPriorityPF->setID(kPriorityPFID);
|
myPriorityPF->setID(kPriorityPFID);
|
||||||
addFocusWidget(myPriorityPF);
|
addFocusWidget(myPriorityPF);
|
||||||
|
|
||||||
xpos = 10;
|
ypos += lineHeight + vGap * 1.5;
|
||||||
ypos += lineHeight + 10;
|
t = new StaticTextWidget(boss, lfont, hBorder, ypos + 1, "Queued Writes");
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos, 13*fontWidth, fontHeight,
|
myDelayQueueWidget = new DelayQueueWidget(boss, lfont, t->getRight() + hGap, ypos);
|
||||||
"Queued Writes", TextAlign::Left);
|
|
||||||
|
|
||||||
xpos += t->getWidth() + 10;
|
|
||||||
myDelayQueueWidget = new DelayQueueWidget(boss, lfont, xpos, ypos);
|
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// Strobe buttons
|
// Strobe buttons
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
buttonX = xpos + myDelayQueueWidget->getWidth() + 20;
|
buttonX = myDelayQueueWidget->getRight() + hGap * 2;
|
||||||
buttonY = ypos;
|
buttonY = ypos;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, buttonH,
|
||||||
"WSYNC", kWsyncCmd);
|
"WSYNC", kWsyncCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
buttonY += lineHeight + 3;
|
buttonY += lineHeight + vGap;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, buttonH,
|
||||||
"RSYNC", kRsyncCmd);
|
"RSYNC", kRsyncCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
buttonX = b->getRight() + 20;
|
buttonX = b->getRight() + hGap * 2;
|
||||||
buttonY = ypos;
|
buttonY = ypos;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, buttonH,
|
||||||
"HMOVE", kHmoveCmd);
|
"HMOVE", kHmoveCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
buttonY += lineHeight + 3;
|
buttonY += lineHeight + vGap;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, buttonH,
|
||||||
"HMCLR", kHmclrCmd);
|
"HMCLR", kHmclrCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
@ -1046,7 +949,7 @@ void TiaWidget::loadConfig()
|
||||||
myGRP0Old->setCrossed(true);
|
myGRP0Old->setCrossed(true);
|
||||||
}
|
}
|
||||||
myGRP0->setIntState(state.gr[TiaState::P0], state.ref[TiaState::P0]);
|
myGRP0->setIntState(state.gr[TiaState::P0], state.ref[TiaState::P0]);
|
||||||
myGRP0Old->setIntState(state.gr[TiaState::P0+2], state.ref[TiaState::P0]);
|
myGRP0Old->setIntState(state.gr[TiaState::P0 + 2], state.ref[TiaState::P0]);
|
||||||
|
|
||||||
// posP0
|
// posP0
|
||||||
myPosP0->setList(0, state.pos[TiaState::P0],
|
myPosP0->setList(0, state.pos[TiaState::P0],
|
||||||
|
@ -1082,7 +985,7 @@ void TiaWidget::loadConfig()
|
||||||
myGRP1Old->setCrossed(true);
|
myGRP1Old->setCrossed(true);
|
||||||
}
|
}
|
||||||
myGRP1->setIntState(state.gr[TiaState::P1], state.ref[TiaState::P1]);
|
myGRP1->setIntState(state.gr[TiaState::P1], state.ref[TiaState::P1]);
|
||||||
myGRP1Old->setIntState(state.gr[TiaState::P1+2], state.ref[TiaState::P1]);
|
myGRP1Old->setIntState(state.gr[TiaState::P1 + 2], state.ref[TiaState::P1]);
|
||||||
|
|
||||||
// posP1
|
// posP1
|
||||||
myPosP1->setList(0, state.pos[TiaState::P1],
|
myPosP1->setList(0, state.pos[TiaState::P1],
|
||||||
|
|
Loading…
Reference in New Issue