mirror of https://github.com/stella-emu/stella.git
added tooltips to TiaInfoWidget and CpuWidget
This commit is contained in:
parent
b81706b215
commit
bd52de99b0
|
@ -85,18 +85,19 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
|
||||||
_w = lwidth + myPCGrid->getWidth() + myPCLabel->getWidth() + 20;
|
_w = lwidth + myPCGrid->getWidth() + myPCLabel->getWidth() + 20;
|
||||||
|
|
||||||
// Create labels showing the source of data for SP/A/X/Y registers
|
// Create labels showing the source of data for SP/A/X/Y registers
|
||||||
|
const std::array<string, 4> labels = { "SP", "A", "X", "Y" };
|
||||||
xpos += myCpuGridBinValue->getWidth() + 20;
|
xpos += myCpuGridBinValue->getWidth() + 20;
|
||||||
int src_y = ypos, src_w = (max_w - xpos + x) - 10;
|
int src_y = ypos, src_w = (max_w - xpos + x) - 10;
|
||||||
for(int i = 0; i < 4; ++i)
|
for(int i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
myCpuDataSrc[i] = new EditTextWidget(boss, nfont, xpos, src_y, src_w, fontHeight + 1);
|
myCpuDataSrc[i] = new EditTextWidget(boss, nfont, xpos, src_y, src_w, fontHeight + 1);
|
||||||
|
myCpuDataSrc[i]->setToolTip("Source label of last load into " + labels[i] + ".");
|
||||||
myCpuDataSrc[i]->setEditable(false, true);
|
myCpuDataSrc[i]->setEditable(false, true);
|
||||||
src_y += fontHeight + 2;
|
src_y += fontHeight + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add labels for other CPU registers
|
// Add labels for other CPU registers
|
||||||
xpos = x;
|
xpos = x;
|
||||||
const std::array<string, 4> labels = { "SP ", "A ", "X ", "Y " };
|
|
||||||
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,
|
||||||
|
@ -139,10 +140,9 @@ CpuWidget::CpuWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
|
||||||
xpos = myCpuDataSrc[0]->getLeft();
|
xpos = myCpuDataSrc[0]->getLeft();
|
||||||
new StaticTextWidget(boss, lfont, xpos - fontWidth * 4.5, ypos + 2, "Dest");
|
new StaticTextWidget(boss, lfont, xpos - fontWidth * 4.5, ypos + 2, "Dest");
|
||||||
myCpuDataDest = new EditTextWidget(boss, nfont, xpos, ypos, src_w, fontHeight + 1);
|
myCpuDataDest = new EditTextWidget(boss, nfont, xpos, ypos, src_w, fontHeight + 1);
|
||||||
|
myCpuDataDest->setToolTip("Destination label of last store.");
|
||||||
myCpuDataDest->setEditable(false, true);
|
myCpuDataDest->setEditable(false, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_h = ypos + myPSRegister->getHeight() - y;
|
_h = ypos + myPSRegister->getHeight() - y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -476,7 +476,7 @@ string RomListWidget::getToolTip(Common::Point pos) const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// hex 1..3 values
|
// 1..3 hex values
|
||||||
if(idx.x % 3 == 2)
|
if(idx.x % 3 == 2)
|
||||||
// Skip gaps between hex values
|
// Skip gaps between hex values
|
||||||
return EmptyString;
|
return EmptyString;
|
||||||
|
|
|
@ -60,30 +60,35 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
xpos = x;
|
xpos = x;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Frame Cycls" : "F. Cycls");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Frame Cycls" : "F. Cycls");
|
||||||
myFrameCycles = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
myFrameCycles = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
||||||
|
myFrameCycles->setToolTip("CPU cycles executed this frame.");
|
||||||
myFrameCycles->setEditable(false, true);
|
myFrameCycles->setEditable(false, true);
|
||||||
|
|
||||||
// Left: WSync Cycles
|
// Left: WSync Cycles
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "WSync Cycls" : "WSync C.");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "WSync Cycls" : "WSync C.");
|
||||||
myWSyncCylces = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
myWSyncCylces = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
||||||
|
myWSyncCylces->setToolTip("CPU cycles used for WSYNC this frame.");
|
||||||
myWSyncCylces->setEditable(false, true);
|
myWSyncCylces->setEditable(false, true);
|
||||||
|
|
||||||
// Left: Timer Cycles
|
// Left: Timer Cycles
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Timer Cycls" : "Timer C.");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Timer Cycls" : "Timer C.");
|
||||||
myTimerCylces = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
myTimerCylces = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
||||||
|
myTimerCylces->setToolTip("CPU cycles roughly used for INTIM reads this frame.");
|
||||||
myTimerCylces->setEditable(false, true);
|
myTimerCylces->setEditable(false, true);
|
||||||
|
|
||||||
// Left: Total Cycles
|
// Left: Total Cycles
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, "Total");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, "Total");
|
||||||
myTotalCycles = new EditTextWidget(boss, nfont, xpos + lwidth8, ypos - 1, twidth, lineHeight);
|
myTotalCycles = new EditTextWidget(boss, nfont, xpos + lwidth8, ypos - 1, twidth, lineHeight);
|
||||||
|
myTotalCycles->setToolTip("Total CPU cycles executed for this session (E notation).");
|
||||||
myTotalCycles->setEditable(false, true);
|
myTotalCycles->setEditable(false, true);
|
||||||
|
|
||||||
// Left: Delta Cycles
|
// Left: Delta Cycles
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, "Delta");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, "Delta");
|
||||||
myDeltaCycles = new EditTextWidget(boss, nfont, xpos + lwidth8, ypos - 1, twidth, lineHeight);
|
myDeltaCycles = new EditTextWidget(boss, nfont, xpos + lwidth8, ypos - 1, twidth, lineHeight);
|
||||||
|
myDeltaCycles->setToolTip("CPU cycles executed since last debug break.");
|
||||||
myDeltaCycles->setEditable(false, true);
|
myDeltaCycles->setEditable(false, true);
|
||||||
|
|
||||||
// Right column
|
// Right column
|
||||||
|
@ -93,6 +98,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
// Right: Frame Count
|
// Right: Frame Count
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Frame Cnt." : "Frame");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Frame Cnt." : "Frame");
|
||||||
myFrameCount = new EditTextWidget(boss, nfont, xpos + lwidthR, ypos - 1, fwidth, lineHeight);
|
myFrameCount = new EditTextWidget(boss, nfont, xpos + lwidthR, ypos - 1, fwidth, lineHeight);
|
||||||
|
myFrameCount->setToolTip("Total number of frames executed this session.");
|
||||||
myFrameCount->setEditable(false, true);
|
myFrameCount->setEditable(false, true);
|
||||||
|
|
||||||
lwidth = lfont.getStringWidth(longstr ? "Color Clock " : "Pixel Pos ") + LGAP;
|
lwidth = lfont.getStringWidth(longstr ? "Color Clock " : "Pixel Pos ") + LGAP;
|
||||||
|
@ -102,28 +108,33 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Scanline" : "Scn Ln");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Scanline" : "Scn Ln");
|
||||||
myScanlineCountLast = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
myScanlineCountLast = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
||||||
|
myScanlineCountLast->setToolTip("Number of scanlines of last frame.");
|
||||||
myScanlineCountLast->setEditable(false, true);
|
myScanlineCountLast->setEditable(false, true);
|
||||||
myScanlineCount = new EditTextWidget(boss, nfont,
|
myScanlineCount = new EditTextWidget(boss, nfont,
|
||||||
xpos + lwidth - myScanlineCountLast->getWidth() - 2, ypos - 1,
|
xpos + lwidth - myScanlineCountLast->getWidth() - 2, ypos - 1,
|
||||||
fwidth, lineHeight);
|
fwidth, lineHeight);
|
||||||
|
myScanlineCount->setToolTip("Current scanline of this frame.");
|
||||||
myScanlineCount->setEditable(false, true);
|
myScanlineCount->setEditable(false, true);
|
||||||
|
|
||||||
// Right: Scan Cycle
|
// Right: Scan Cycle
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Scan Cycle" : "Scn Cycle");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Scan Cycle" : "Scn Cycle");
|
||||||
myScanlineCycles = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
myScanlineCycles = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
||||||
|
myScanlineCycles->setToolTip("CPU cycles in current scanline.");
|
||||||
myScanlineCycles->setEditable(false, true);
|
myScanlineCycles->setEditable(false, true);
|
||||||
|
|
||||||
// Right: Pixel Pos
|
// Right: Pixel Pos
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, "Pixel Pos");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, "Pixel Pos");
|
||||||
myPixelPosition = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
myPixelPosition = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
||||||
|
myPixelPosition->setToolTip("Pixel position in current scanline.");
|
||||||
myPixelPosition->setEditable(false, true);
|
myPixelPosition->setEditable(false, true);
|
||||||
|
|
||||||
// Right: Color Clock
|
// Right: Color Clock
|
||||||
ypos += lineHeight + VGAP;
|
ypos += lineHeight + VGAP;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Color Clock" : "Color Clk");
|
new StaticTextWidget(boss, lfont, xpos, ypos + 1, longstr ? "Color Clock" : "Color Clk");
|
||||||
myColorClocks = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
myColorClocks = new EditTextWidget(boss, nfont, xpos + lwidth, ypos - 1, fwidth, lineHeight);
|
||||||
|
myColorClocks->setToolTip("Color clocks in current scanline.");
|
||||||
myColorClocks->setEditable(false, true);
|
myColorClocks->setEditable(false, true);
|
||||||
|
|
||||||
// Calculate actual dimensions
|
// Calculate actual dimensions
|
||||||
|
|
Loading…
Reference in New Issue