mirror of https://github.com/stella-emu/stella.git
better debugger disassembly space utilization
changed developer dialog/debugger UI label
This commit is contained in:
parent
2efeb6cdb7
commit
8379b0af1a
|
@ -66,7 +66,7 @@ RomListWidget::RomListWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
const int fontWidth = lfont.getMaxCharWidth(),
|
const int fontWidth = lfont.getMaxCharWidth(),
|
||||||
numchars = w / fontWidth;
|
numchars = w / fontWidth;
|
||||||
|
|
||||||
_labelWidth = std::max(16, int(0.20 * (numchars - 12))) * fontWidth - 1;
|
_labelWidth = std::max(14, int(0.35 * (numchars - 18))) * fontWidth - 1;
|
||||||
_bytesWidth = 12 * fontWidth;
|
_bytesWidth = 12 * fontWidth;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
|
@ -463,13 +463,13 @@ void RomListWidget::drawWidget(bool hilite)
|
||||||
s.vLine(_x + CheckboxWidget::boxSize() + 5, _y, _y + _h - 1, kColor);
|
s.vLine(_x + CheckboxWidget::boxSize() + 5, _y, _y + _h - 1, kColor);
|
||||||
|
|
||||||
// Draw the list items
|
// Draw the list items
|
||||||
int ccountw = _fontWidth << 3,
|
int cycleCountW = _fontWidth * 8,
|
||||||
large_disasmw = _w - l.x() - _labelWidth,
|
noTypeDisasmW = _w - l.x() - _labelWidth,
|
||||||
medium_disasmw = large_disasmw - r.width(),
|
noCodeDisasmW = noTypeDisasmW - r.width(),
|
||||||
small_disasmw = medium_disasmw - (ccountw << 1),
|
codeDisasmW = noCodeDisasmW - cycleCountW,
|
||||||
actualwidth = myDisasm->fieldwidth * _fontWidth;
|
actualWidth = myDisasm->fieldwidth * _fontWidth;
|
||||||
if(actualwidth < small_disasmw)
|
if(actualWidth < codeDisasmW)
|
||||||
small_disasmw = actualwidth;
|
codeDisasmW = actualWidth;
|
||||||
|
|
||||||
xpos = _x + CheckboxWidget::boxSize() + 10; ypos = _y + 2;
|
xpos = _x + CheckboxWidget::boxSize() + 10; ypos = _y + 2;
|
||||||
for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++, ypos += _fontHeight)
|
for (i = 0, pos = _currentPos; i < _rows && pos < len; i++, pos++, ypos += _fontHeight)
|
||||||
|
@ -504,15 +504,15 @@ void RomListWidget::drawWidget(bool hilite)
|
||||||
{
|
{
|
||||||
// Draw disassembly and cycle count
|
// Draw disassembly and cycle count
|
||||||
s.drawString(_font, dlist[pos].disasm, xpos + _labelWidth, ypos,
|
s.drawString(_font, dlist[pos].disasm, xpos + _labelWidth, ypos,
|
||||||
small_disasmw, kTextColor);
|
codeDisasmW, kTextColor);
|
||||||
s.drawString(_font, dlist[pos].ccount, xpos + _labelWidth + small_disasmw, ypos,
|
s.drawString(_font, dlist[pos].ccount, xpos + _labelWidth + codeDisasmW, ypos,
|
||||||
ccountw, kTextColor);
|
cycleCountW, kTextColor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Draw disassembly only
|
// Draw disassembly only
|
||||||
s.drawString(_font, dlist[pos].disasm, xpos + _labelWidth, ypos,
|
s.drawString(_font, dlist[pos].disasm, xpos + _labelWidth, ypos,
|
||||||
medium_disasmw, kTextColor);
|
noCodeDisasmW, kTextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw separator
|
// Draw separator
|
||||||
|
@ -538,7 +538,7 @@ void RomListWidget::drawWidget(bool hilite)
|
||||||
{
|
{
|
||||||
// Draw disassembly, giving it all remaining horizontal space
|
// Draw disassembly, giving it all remaining horizontal space
|
||||||
s.drawString(_font, dlist[pos].disasm, xpos + _labelWidth, ypos,
|
s.drawString(_font, dlist[pos].disasm, xpos + _labelWidth, ypos,
|
||||||
large_disasmw, kTextColor);
|
noTypeDisasmW, kTextColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,13 +279,17 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
||||||
|
|
||||||
// Add minimum window size buttons for different fonts
|
// Add minimum window size buttons for different fonts
|
||||||
ypos += lineHeight + VGAP * 2;
|
ypos += lineHeight + VGAP * 2;
|
||||||
StaticTextWidget* t = new StaticTextWidget(myTab, font, HBORDER, ypos + 3, "Reset debugger size for");
|
StaticTextWidget* t = new StaticTextWidget(myTab, font, HBORDER, ypos + 3, "Select");
|
||||||
|
|
||||||
int fbwidth = font.getStringWidth("Medium font") + 20;
|
int fbwidth = font.getStringWidth("Medium font") + 20;
|
||||||
//xpos = (_w - fbwidth - 2 * VBORDER) / 2; ypos += 2 * lineHeight + 4;
|
//xpos = (_w - fbwidth - 2 * VBORDER) / 2; ypos += 2 * lineHeight + 4;
|
||||||
xpos = t->getRight() + 8;
|
xpos = t->getRight() + 8;
|
||||||
b = new ButtonWidget(myTab, font, xpos, ypos, fbwidth, buttonHeight,
|
b = new ButtonWidget(myTab, font, xpos, ypos, fbwidth, buttonHeight,
|
||||||
"Small font", kDSmallSize);
|
"Small font", kDSmallSize);
|
||||||
|
|
||||||
|
StaticTextWidget* t1 = new StaticTextWidget(myTab, font, b->getRight()+8, ypos + 3, "and reset debugger size");
|
||||||
|
wid.push_back(t1);
|
||||||
|
|
||||||
wid.push_back(b);
|
wid.push_back(b);
|
||||||
ypos += b->getHeight() + VGAP;
|
ypos += b->getHeight() + VGAP;
|
||||||
b = new ButtonWidget(myTab, font, xpos, ypos, fbwidth, buttonHeight,
|
b = new ButtonWidget(myTab, font, xpos, ypos, fbwidth, buttonHeight,
|
||||||
|
@ -311,6 +315,10 @@ void DeveloperDialog::addDebuggerTab(const GUI::Font& font)
|
||||||
"Font Style ", lwidth);
|
"Font Style ", lwidth);
|
||||||
wid.push_back(myDebuggerFontStyle);
|
wid.push_back(myDebuggerFontStyle);
|
||||||
|
|
||||||
|
ypos += b->getHeight() + VGAP * 4;
|
||||||
|
t = new StaticTextWidget(myTab, font, HBORDER, _h - lineHeight*5, "(*) Changes require application restart");
|
||||||
|
wid.push_back(t);
|
||||||
|
|
||||||
// Debugger is only realistically available in windowed modes 800x600 or greater
|
// Debugger is only realistically available in windowed modes 800x600 or greater
|
||||||
// (and when it's actually been compiled into the app)
|
// (and when it's actually been compiled into the app)
|
||||||
bool debuggerAvailable =
|
bool debuggerAvailable =
|
||||||
|
|
Loading…
Reference in New Issue