Slight refactor of label array in DeveloperDialog.

- This is a followup to the last commit for this class
- We don't need this to be a static in the header file itself
This commit is contained in:
Stephen Anthony 2020-11-01 09:51:57 -03:30
parent 942aad32b6
commit 838318ea2c
2 changed files with 2 additions and 8 deletions

View File

@ -154,11 +154,12 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font)
myRandomizeCPULabel = new StaticTextWidget(myTab, font, HBORDER + INDENT * 2, ypos + 1, "Randomize CPU ");
wid.push_back(myRandomizeCPULabel);
const std::array<string, 5> cpuregsLabels = {"SP", "A", "X", "Y", "PS"};
int xpos = myRandomizeCPULabel->getRight() + fontWidth * 1.25;
for(int i = 0; i < 5; ++i)
{
myRandomizeCPUWidget[i] = new CheckboxWidget(myTab, font, xpos, ypos + 1,
ourCPUregs[i], kRandCPUID);
cpuregsLabels[i], kRandCPUID);
wid.push_back(myRandomizeCPUWidget[i]);
xpos += CheckboxWidget::boxSize(font) + font.getStringWidth("XX") + fontWidth * 2.5;
}
@ -1535,8 +1536,3 @@ void DeveloperDialog::handleFontSize()
myDebuggerHeightSlider->setValue(minH);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const std::array<string, 5> DeveloperDialog::ourCPUregs = {
"SP", "A", "X", "Y", "PS"
};

View File

@ -184,8 +184,6 @@ class DeveloperDialog : public Dialog
std::array<string, 2> myStateInterval;
std::array<string, 2> myStateHorizon;
static const std::array<string, 5> ourCPUregs;
private:
void addEmulationTab(const GUI::Font& font);
void addTimeMachineTab(const GUI::Font& font);