UA added to randomized startup bank types

This commit is contained in:
thrust26 2017-11-18 14:53:27 +01:00
parent a14fa6a3ea
commit cdd4b4bf39
2 changed files with 8 additions and 4 deletions

View File

@ -44,6 +44,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
{
const int bwidth = lfont.getStringWidth("Compare "),
bheight = myLineHeight + 2;
const int VGAP = 4;
int ypos = y + myLineHeight;
@ -63,22 +64,22 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n
"Undo", kUndoCmd);
myUndoButton->setTarget(this);
by += bheight + 4;
by += bheight + VGAP;
myRevertButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Revert", kRevertCmd);
myRevertButton->setTarget(this);
by += bheight + 4 * 3;
by += bheight + VGAP * 6;
mySearchButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Search", kSearchCmd);
mySearchButton->setTarget(this);
by += bheight + 4;
by += bheight + VGAP;
myCompareButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Compare", kCmpCmd);
myCompareButton->setTarget(this);
by += bheight + 4;
by += bheight + VGAP;
myRestartButton = new ButtonWidget(boss, lfont, bx, by, bwidth, bheight,
"Reset", kRestartCmd);
myRestartButton->setTarget(this);

View File

@ -35,6 +35,9 @@ CartridgeUA::CartridgeUA(const BytePtr& image, uInt32 size,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeUA::reset()
{
// define startup bank
randomizeStartBank();
// Upon reset we switch to the startup bank
bank(myStartBank);
}