mirror of https://github.com/stella-emu/stella.git
some random ROM polishing
This commit is contained in:
parent
6d2c97a667
commit
a11618e80b
|
@ -2085,25 +2085,25 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>Go to initial directory (also in other file dialogs)</td>
|
<td>Go to initial directory (also in other file dialogs)</td>
|
||||||
<td>Alt + Home</td>
|
<td>Alt + Home</td>
|
||||||
<td>Alt + Home</td>
|
<td>Cmd + Home</td>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Go to previous directory in history (also in other file dialogs)</td>
|
<td>Go to previous directory in history (also in other file dialogs)</td>
|
||||||
<td>Alt + Left arrow</td>
|
<td>Alt + Left arrow</td>
|
||||||
<td>Alt + Left arrow</td>
|
<td>Cmd + Left arrow</td>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Go to next directory in history (also in other file dialogs)</td>
|
<td>Go to next directory in history (also in other file dialogs)</td>
|
||||||
<td>Alt + Right arrow</td>
|
<td>Alt + Right arrow</td>
|
||||||
<td>Alt + Right arrow</td>
|
<td>Cmd + Right arrow</td>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Go to parent directory (also in other file dialogs)</td>
|
<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, Alt + Up arrow</td>
|
<td>Backspace, Cmd + Up arrow</td>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -2174,8 +2174,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Load random ROM</td>
|
<td>Load random ROM</td>
|
||||||
<td>Control-Alt + R</td>
|
<td>Alt + R</td>
|
||||||
<td>Control-Alt + R</td>
|
<td>Cmd + R</td>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -193,20 +193,35 @@ static const Icon icon_subdirs_small_on(
|
||||||
static const Icon icon_random_small(
|
static const Icon icon_random_small(
|
||||||
iconSmallWDesc,
|
iconSmallWDesc,
|
||||||
{
|
{
|
||||||
0b100000000000000000000100,
|
0b100000000000000000001100,
|
||||||
0b110000000000000000000110,
|
0b110000000000000000000110,
|
||||||
0b111000000011100000011111,
|
0b111000000011100000111111,
|
||||||
0b111100000011110000111111,
|
0b111100000011110001111111,
|
||||||
0b111110000000011001100110,
|
0b111110000000111011100110,
|
||||||
0b111111000000001100000100,
|
0b111111000000011101001100,
|
||||||
0b111111100000000110000000,
|
0b111111100000001100000000,
|
||||||
0b111111100000000110000000,
|
0b111111100000001110000000,
|
||||||
0b111111000000000011000100,
|
0b111111000000010111001100,
|
||||||
0b111110000000011001100110,
|
0b111110000000111011100110,
|
||||||
0b111100000011110000111111,
|
0b111100000011110001111111,
|
||||||
0b111000000011100000011111,
|
0b111000000011100000111111,
|
||||||
0b110000000000000000000110,
|
0b110000000000000000000110,
|
||||||
0b100000000000000000000100
|
0b100000000000000000001100
|
||||||
|
|
||||||
|
//0b100000000000000000111111, // corner arrows
|
||||||
|
//0b110000000000100000011111,
|
||||||
|
//0b111000000001110000001111,
|
||||||
|
//0b111100000000111000011111,
|
||||||
|
//0b111110000000011100111011,
|
||||||
|
//0b111111000000001110010001,
|
||||||
|
//0b111111100000000111000000,
|
||||||
|
//0b111111100000000011100000,
|
||||||
|
//0b111111000000001001110001,
|
||||||
|
//0b111110000000011100111011,
|
||||||
|
//0b111100000000111000011111,
|
||||||
|
//0b111000000001110000001111,
|
||||||
|
//0b110000000000100000011111,
|
||||||
|
//0b100000000000000000111111
|
||||||
});
|
});
|
||||||
|
|
||||||
// Help icon
|
// Help icon
|
||||||
|
@ -440,26 +455,26 @@ static const Icon icon_subdirs_large_on(
|
||||||
static const Icon icon_random_large(
|
static const Icon icon_random_large(
|
||||||
iconLargeWDesc,
|
iconLargeWDesc,
|
||||||
{
|
{
|
||||||
0b00000000000000000000000000001100,
|
0b00000000000000000000000000011000,
|
||||||
0b10000000000000000000000000001110,
|
0b10000000000000000000000000001100,
|
||||||
0b11000000000001111000000001111111,
|
0b11000000000000000000000000001110,
|
||||||
0b11100000000001111100000011111111,
|
0b11100000000001110000000011111111,
|
||||||
0b11110000000001111110000111001110,
|
0b11110000000001111000000111111111,
|
||||||
0b11111000000000000111000110001100,
|
0b11111000000001111100001110001110,
|
||||||
0b11111100000000000011100000001000,
|
0b11111100000000001110011100001100,
|
||||||
0b11111110000000000001110000000000,
|
0b11111110000000000111001000011000,
|
||||||
0b11111111000000000001110000000000,
|
0b11111111000000000011100000000000,
|
||||||
0b11111111100000000000111000000000,
|
0b11111111100000000011100000000000,
|
||||||
0b11111111100000000000011100000000,
|
0b11111111100000000001110000000000,
|
||||||
0b11111111000000000000011100001000,
|
0b11111111000000000000111000000000,
|
||||||
0b11111110000000000110001110001100,
|
0b11111110000000000100111000011000,
|
||||||
0b11111100000001111110000111001110,
|
0b11111100000000001110011100001100,
|
||||||
0b11111000000001111100000011111111,
|
0b11111000000001111100001110001110,
|
||||||
0b11110000000001111000000001111111,
|
0b11110000000001111000000111111111,
|
||||||
0b11100000000000000000000000001110,
|
0b11100000000001110000000011111111,
|
||||||
0b11000000000000000000000000001100,
|
0b11000000000000000000000000001110,
|
||||||
0b10000000000000000000000000001000,
|
0b10000000000000000000000000001100,
|
||||||
0b00000000000000000000000000001000,
|
0b00000000000000000000000000011000,
|
||||||
});
|
});
|
||||||
|
|
||||||
static const Icon icon_help_large(
|
static const Icon icon_help_large(
|
||||||
|
|
|
@ -211,7 +211,11 @@ void LauncherDialog::addFilteringWidgets(int& ypos)
|
||||||
// Show the random ROM button
|
// Show the random ROM button
|
||||||
myRandomRomButton = new ButtonWidget(this, _font, xpos, ypos - btnYOfs,
|
myRandomRomButton = new ButtonWidget(this, _font, xpos, ypos - btnYOfs,
|
||||||
randomButtonWidth, buttonHeight, randomIcon, kLoadRndRomCmd);
|
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);
|
wid.push_back(myRandomRomButton);
|
||||||
|
|
||||||
// Show the Settings / Options button (positioned from the right)
|
// Show the Settings / Options button (positioned from the right)
|
||||||
|
@ -794,61 +798,65 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||||
// context menu keys
|
// context menu keys
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
if(StellaModTest::isControl(mod) &&
|
if(!(myPattern && myPattern->isHighlighted()
|
||||||
!(myPattern && myPattern->isHighlighted()
|
|
||||||
&& instance().eventHandler().checkEventForKey(EventMode::kEditMode, key, mod)))
|
&& instance().eventHandler().checkEventForKey(EventMode::kEditMode, key, mod)))
|
||||||
{
|
{
|
||||||
handled = true;
|
if(StellaModTest::isControl(mod))
|
||||||
switch(key)
|
|
||||||
{
|
{
|
||||||
case KBDK_D:
|
handled = true;
|
||||||
sendCommand(kSubDirsCmd, 0, 0);
|
switch(key)
|
||||||
break;
|
{
|
||||||
|
case KBDK_D:
|
||||||
|
sendCommand(kSubDirsCmd, 0, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
case KBDK_E:
|
case KBDK_E:
|
||||||
toggleExtensions();
|
toggleExtensions();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_F:
|
case KBDK_F:
|
||||||
myList->toggleUserFavorite();
|
myList->toggleUserFavorite();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_G:
|
case KBDK_G:
|
||||||
openGameProperties();
|
openGameProperties();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_H:
|
case KBDK_H:
|
||||||
if(instance().highScores().enabled())
|
if(instance().highScores().enabled())
|
||||||
openHighScores();
|
openHighScores();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_O:
|
case KBDK_O:
|
||||||
openSettings();
|
openSettings();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_P:
|
case KBDK_P:
|
||||||
openGlobalProps();
|
openGlobalProps();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_R:
|
case KBDK_R:
|
||||||
if(StellaModTest::isAlt(mod))
|
|
||||||
loadRandomRom();
|
|
||||||
else
|
|
||||||
reload();
|
reload();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_S:
|
case KBDK_S:
|
||||||
toggleSorting();
|
toggleSorting();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KBDK_X:
|
case KBDK_X:
|
||||||
myList->removeFavorite();
|
myList->removeFavorite();
|
||||||
reload();
|
reload();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
handled = false;
|
handled = false;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(StellaModTest::isAlt(mod) && key == KBDK_R)
|
||||||
|
{
|
||||||
|
loadRandomRom();
|
||||||
|
handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!handled)
|
if(!handled)
|
||||||
|
|
|
@ -47,22 +47,28 @@ NavigationWidget::NavigationWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
const int iconWidth = homeIcon.width();
|
const int iconWidth = homeIcon.width();
|
||||||
const int buttonWidth = iconWidth + ((fontWidth + 1) & ~0b1) + 1; // round up to next odd
|
const int buttonWidth = iconWidth + ((fontWidth + 1) & ~0b1) + 1; // round up to next odd
|
||||||
const int buttonHeight = h;
|
const int buttonHeight = h;
|
||||||
|
#ifndef BSPF_MACOS
|
||||||
|
const string altKey = "Alt";
|
||||||
|
#else
|
||||||
|
const string altKey = "Cmd";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
myHomeButton = new ButtonWidget(boss, _font, xpos, ypos,
|
myHomeButton = new ButtonWidget(boss, _font, xpos, ypos,
|
||||||
buttonWidth, buttonHeight, homeIcon, FileListWidget::kHomeDirCmd);
|
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);
|
boss->addFocusWidget(myHomeButton);
|
||||||
xpos = myHomeButton->getRight() + BTN_GAP;
|
xpos = myHomeButton->getRight() + BTN_GAP;
|
||||||
|
|
||||||
myPrevButton = new ButtonWidget(boss, _font, xpos, ypos,
|
myPrevButton = new ButtonWidget(boss, _font, xpos, ypos,
|
||||||
buttonWidth, buttonHeight, prevIcon, FileListWidget::kPrevDirCmd);
|
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);
|
boss->addFocusWidget(myPrevButton);
|
||||||
xpos = myPrevButton->getRight() + BTN_GAP;
|
xpos = myPrevButton->getRight() + BTN_GAP;
|
||||||
|
|
||||||
myNextButton = new ButtonWidget(boss, _font, xpos, ypos,
|
myNextButton = new ButtonWidget(boss, _font, xpos, ypos,
|
||||||
buttonWidth, buttonHeight, nextIcon, FileListWidget::kNextDirCmd);
|
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);
|
boss->addFocusWidget(myNextButton);
|
||||||
xpos = myNextButton->getRight() + BTN_GAP;
|
xpos = myNextButton->getRight() + BTN_GAP;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue