some random ROM polishing

This commit is contained in:
thrust26 2024-01-13 11:16:47 +01:00
parent 6d2c97a667
commit a11618e80b
4 changed files with 112 additions and 83 deletions

View File

@ -2085,25 +2085,25 @@
<tr>
<td>Go to initial directory (also in other file dialogs)</td>
<td>Alt + Home</td>
<td>Alt + Home</td>
<td>Cmd + Home</td>
<td>-</td>
</tr>
<tr>
<td>Go to previous directory in history (also in other file dialogs)</td>
<td>Alt + Left arrow</td>
<td>Alt + Left arrow</td>
<td>Cmd + Left arrow</td>
<td>-</td>
</tr>
<tr>
<td>Go to next directory in history (also in other file dialogs)</td>
<td>Alt + Right arrow</td>
<td>Alt + Right arrow</td>
<td>Cmd + Right arrow</td>
<td>-</td>
</tr>
<tr>
<td>Go to parent directory (also in other file dialogs)</td>
<td>Backspace, Alt + Up arrow</td>
<td>Backspace, Alt + Up arrow</td>
<td>Backspace, Cmd + Up arrow</td>
<td>-</td>
</tr>
<tr>
@ -2174,8 +2174,8 @@
</tr>
<tr>
<td>Load random ROM</td>
<td>Control-Alt + R</td>
<td>Control-Alt + R</td>
<td>Alt + R</td>
<td>Cmd + R</td>
<td>-</td>
</tr>
<tr>

View File

@ -193,20 +193,35 @@ static const Icon icon_subdirs_small_on(
static const Icon icon_random_small(
iconSmallWDesc,
{
0b100000000000000000000100,
0b100000000000000000001100,
0b110000000000000000000110,
0b111000000011100000011111,
0b111100000011110000111111,
0b111110000000011001100110,
0b111111000000001100000100,
0b111111100000000110000000,
0b111111100000000110000000,
0b111111000000000011000100,
0b111110000000011001100110,
0b111100000011110000111111,
0b111000000011100000011111,
0b111000000011100000111111,
0b111100000011110001111111,
0b111110000000111011100110,
0b111111000000011101001100,
0b111111100000001100000000,
0b111111100000001110000000,
0b111111000000010111001100,
0b111110000000111011100110,
0b111100000011110001111111,
0b111000000011100000111111,
0b110000000000000000000110,
0b100000000000000000000100
0b100000000000000000001100
//0b100000000000000000111111, // corner arrows
//0b110000000000100000011111,
//0b111000000001110000001111,
//0b111100000000111000011111,
//0b111110000000011100111011,
//0b111111000000001110010001,
//0b111111100000000111000000,
//0b111111100000000011100000,
//0b111111000000001001110001,
//0b111110000000011100111011,
//0b111100000000111000011111,
//0b111000000001110000001111,
//0b110000000000100000011111,
//0b100000000000000000111111
});
// Help icon
@ -440,26 +455,26 @@ static const Icon icon_subdirs_large_on(
static const Icon icon_random_large(
iconLargeWDesc,
{
0b00000000000000000000000000001100,
0b10000000000000000000000000001110,
0b11000000000001111000000001111111,
0b11100000000001111100000011111111,
0b11110000000001111110000111001110,
0b11111000000000000111000110001100,
0b11111100000000000011100000001000,
0b11111110000000000001110000000000,
0b11111111000000000001110000000000,
0b11111111100000000000111000000000,
0b11111111100000000000011100000000,
0b11111111000000000000011100001000,
0b11111110000000000110001110001100,
0b11111100000001111110000111001110,
0b11111000000001111100000011111111,
0b11110000000001111000000001111111,
0b11100000000000000000000000001110,
0b11000000000000000000000000001100,
0b10000000000000000000000000001000,
0b00000000000000000000000000001000,
0b00000000000000000000000000011000,
0b10000000000000000000000000001100,
0b11000000000000000000000000001110,
0b11100000000001110000000011111111,
0b11110000000001111000000111111111,
0b11111000000001111100001110001110,
0b11111100000000001110011100001100,
0b11111110000000000111001000011000,
0b11111111000000000011100000000000,
0b11111111100000000011100000000000,
0b11111111100000000001110000000000,
0b11111111000000000000111000000000,
0b11111110000000000100111000011000,
0b11111100000000001110011100001100,
0b11111000000001111100001110001110,
0b11110000000001111000000111111111,
0b11100000000001110000000011111111,
0b11000000000000000000000000001110,
0b10000000000000000000000000001100,
0b00000000000000000000000000011000,
});
static const Icon icon_help_large(

View File

@ -211,7 +211,11 @@ void LauncherDialog::addFilteringWidgets(int& ypos)
// Show the random ROM button
myRandomRomButton = new ButtonWidget(this, _font, xpos, ypos - btnYOfs,
randomButtonWidth, buttonHeight, randomIcon, kLoadRndRomCmd);
myRandomRomButton->setToolTip("Load random ROM (Ctrl-Alt+R)");
#ifndef BSPF_MACOS
myRandomRomButton->setToolTip("Load random ROM (Alt+R)");
#else
myRandomRomButton->setToolTip("Load random ROM (Cmd+R)");
#endif
wid.push_back(myRandomRomButton);
// Show the Settings / Options button (positioned from the right)
@ -794,9 +798,10 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
// context menu keys
bool handled = false;
if(StellaModTest::isControl(mod) &&
!(myPattern && myPattern->isHighlighted()
if(!(myPattern && myPattern->isHighlighted()
&& instance().eventHandler().checkEventForKey(EventMode::kEditMode, key, mod)))
{
if(StellaModTest::isControl(mod))
{
handled = true;
switch(key)
@ -831,9 +836,6 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
break;
case KBDK_R:
if(StellaModTest::isAlt(mod))
loadRandomRom();
else
reload();
break;
@ -851,6 +853,12 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
break;
}
}
else if(StellaModTest::isAlt(mod) && key == KBDK_R)
{
loadRandomRom();
handled = true;
}
}
if(!handled)
#if defined(RETRON77)
// handle keys used by R77

View File

@ -47,22 +47,28 @@ NavigationWidget::NavigationWidget(GuiObject* boss, const GUI::Font& font,
const int iconWidth = homeIcon.width();
const int buttonWidth = iconWidth + ((fontWidth + 1) & ~0b1) + 1; // round up to next odd
const int buttonHeight = h;
#ifndef BSPF_MACOS
const string altKey = "Alt";
#else
const string altKey = "Cmd";
#endif
myHomeButton = new ButtonWidget(boss, _font, xpos, ypos,
buttonWidth, buttonHeight, homeIcon, FileListWidget::kHomeDirCmd);
myHomeButton->setToolTip("Go back to initial directory. (Alt+Pos1)");
myHomeButton->setToolTip("Go back to initial directory. (" + altKey + "+Pos1)");
boss->addFocusWidget(myHomeButton);
xpos = myHomeButton->getRight() + BTN_GAP;
myPrevButton = new ButtonWidget(boss, _font, xpos, ypos,
buttonWidth, buttonHeight, prevIcon, FileListWidget::kPrevDirCmd);
myPrevButton->setToolTip("Go back in directory history. (Alt+Left)");
myPrevButton->setToolTip("Go back in directory history. (" + altKey + "+Left)");
boss->addFocusWidget(myPrevButton);
xpos = myPrevButton->getRight() + BTN_GAP;
myNextButton = new ButtonWidget(boss, _font, xpos, ypos,
buttonWidth, buttonHeight, nextIcon, FileListWidget::kNextDirCmd);
myNextButton->setToolTip("Go forward in directory history. (Alt+Right)");
myNextButton->setToolTip("Go forward in directory history. (" + altKey + "+Right)");
boss->addFocusWidget(myNextButton);
xpos = myNextButton->getRight() + BTN_GAP;