mirror of
https://github.com/libretro/stella2023.git
synced 2024-11-27 02:40:37 +00:00
enhanced launcher context menu with direct Game properties dialog link
This commit is contained in:
parent
5b5eccf28f
commit
e537eaffd5
@ -2290,6 +2290,11 @@
|
||||
<td>Control + F</td>
|
||||
<td>Control + F</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Open Game properties dialog</td>
|
||||
<td>Control + G</td>
|
||||
<td>Control + G</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Open Power-On options dialog</td>
|
||||
<td>Control + P</td>
|
||||
@ -4317,46 +4322,50 @@
|
||||
<p><ul>
|
||||
<li>
|
||||
<p><b>Remove from recently played/most popular</b> (or 'Control + X'):
|
||||
This option removes the selected ROM from the current folder.</p>
|
||||
Removes the selected ROM from the current virtual folder.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Add to/remove from favorites</b> (or 'Control + F'): This option
|
||||
toggles the favorite state of the selected ROM or directory.</p>
|
||||
<p><b>Add to/remove from favorites</b> (or 'Control + F'): Toggles the
|
||||
favorite state of the selected ROM or directory.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Game properties</b> (or 'Control + G'): Opens the
|
||||
<b><a href="#Properties">Game properties</a></b> dialog.</p>
|
||||
</li>
|
||||
<li><p><b><a name="PowerOn">Power-on options</a></b> (or 'Control + P'):
|
||||
Selecting this option shows a dialog whereby
|
||||
ROM properties can be temporarily overridden, and joystick/console buttons can be
|
||||
temporarily held down. Selecting options from this dialog will cause all ROMs launched
|
||||
after that to use those properties you specify. Clicking <b>Defaults</b> will disable
|
||||
its functionality, and use ROM properties as defined by the ROM itself. The dialog is as
|
||||
follows (see <b>Advanced Configuration - <a href="#Properties">Game Properties</a></b>
|
||||
for more information concerning ROM properties):</p>
|
||||
<table border="5" cellpadding="2" frame="box" rules="none">
|
||||
<tr>
|
||||
<td><img src="graphics/launcher_override.png"></td>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table border="1" cellpadding="4">
|
||||
<tr><th>Item</th><th>For more information,<br>see <a href="#CommandLine">Commandline</a></th></tr>
|
||||
<tr><td>Bankswitch type</td><td>-bs</td></tr>
|
||||
<tr><td>TV type</td><td>-tv</td></tr>
|
||||
<tr><td>Left difficulty</td><td>-ld</td></tr>
|
||||
<tr><td>Right difficulty</td><td>-rd</td></tr>
|
||||
<tr><td>Startup mode</td><td>-debug</td></tr>
|
||||
<tr><td>Left joy items</td><td>-holdjoy0</td></tr>
|
||||
<tr><td>Right joy items</td><td>-holdjoy1</td></tr>
|
||||
<tr><td>Console: Select</td><td>-holdselect</td></tr>
|
||||
<tr><td>Console: Reset</td><td>-holdreset</td></tr>
|
||||
</table>
|
||||
<p></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
Opens a dialog whereby ROM properties can be temporarily overridden, and
|
||||
joystick/console buttons can be temporarily held down. Selecting options
|
||||
from this dialog will cause all ROMs launched after that to use those
|
||||
properties you specify. Clicking <b>Defaults</b> will disable its
|
||||
functionality, and use ROM properties as defined by the ROM itself. The dialog is as
|
||||
follows (see <b>Advanced Configuration - <a href="#Properties">Game Properties</a></b>
|
||||
for more information concerning ROM properties):</p>
|
||||
<table border="5" cellpadding="2" frame="box" rules="none">
|
||||
<tr>
|
||||
<td><img src="graphics/launcher_override.png"></td>
|
||||
<td> </td>
|
||||
<td valign="top">
|
||||
<table border="1" cellpadding="4">
|
||||
<tr><th>Item</th><th>For more information,<br>see <a href="#CommandLine">Commandline</a></th></tr>
|
||||
<tr><td>Bankswitch type</td><td>-bs</td></tr>
|
||||
<tr><td>TV type</td><td>-tv</td></tr>
|
||||
<tr><td>Left difficulty</td><td>-ld</td></tr>
|
||||
<tr><td>Right difficulty</td><td>-rd</td></tr>
|
||||
<tr><td>Startup mode</td><td>-debug</td></tr>
|
||||
<tr><td>Left joy items</td><td>-holdjoy0</td></tr>
|
||||
<tr><td>Right joy items</td><td>-holdjoy1</td></tr>
|
||||
<tr><td>Console: Select</td><td>-holdselect</td></tr>
|
||||
<tr><td>Console: Reset</td><td>-holdreset</td></tr>
|
||||
</table>
|
||||
<p></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>High scores</b> (or 'Control + H'): This option displays the <a href="#HighScores">
|
||||
High Scores</a> dialog for the selected ROM. Only available if high score
|
||||
properties have been setup for the ROM.</p>
|
||||
<p><b>High scores</b> (or 'Control + H'): Opens the
|
||||
<b><a href="#HighScores"></b>High Scores</a> dialog for the selected ROM.
|
||||
Only available if high score properties have been setup for the ROM.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Enable/disable file extensions</b> (or 'Control + E'): Toggles the
|
||||
@ -4375,8 +4384,8 @@
|
||||
of ROMs in current directory only or all subdirectories too.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><b>Reload listing</b> (or 'Control + R'): Selecting this performs a
|
||||
reload of the current listing. </p>
|
||||
<p><b>Reload listing</b> (or 'Control + R'): Performs a reload of the
|
||||
current file listing. </p>
|
||||
</li>
|
||||
</ul></p>
|
||||
</blockquote></br>
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "FSNode.hxx"
|
||||
#include "MD5.hxx"
|
||||
#include "OptionsDialog.hxx"
|
||||
#include "GameInfoDialog.hxx"
|
||||
#include "HighScoresDialog.hxx"
|
||||
#include "HighScoresManager.hxx"
|
||||
#include "GlobalPropsDialog.hxx"
|
||||
@ -245,7 +246,6 @@ void LauncherDialog::addPathWidgets(int& ypos)
|
||||
buttonWidth, buttonHeight, reloadIcon, kReloadCmd);
|
||||
myReloadButton->setToolTip("Reload listing");
|
||||
wid.push_back(myReloadButton);
|
||||
ypos = myNavigationBar->getBottom() + Dialog::vGap();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -256,10 +256,10 @@ void LauncherDialog::addPathWidgets(int& ypos)
|
||||
lwFound, fontHeight, "", TextAlign::Right);
|
||||
|
||||
EditTextWidget* e = new EditTextWidget(this, _font, myNavigationBar->getRight() - 1, ypos,
|
||||
lwFound + LBL_GAP + 1, lineHeight, "");
|
||||
lwFound + LBL_GAP + 1, buttonHeight - 2, "");
|
||||
e->setEditable(false, true);
|
||||
ypos = myNavigationBar->getBottom();
|
||||
}
|
||||
ypos = myNavigationBar->getBottom() + Dialog::vGap();
|
||||
addToFocusList(wid);
|
||||
}
|
||||
|
||||
@ -739,6 +739,8 @@ void LauncherDialog::handleContextMenu()
|
||||
removeAllPopular();
|
||||
else if(cmd == "removerecent")
|
||||
removeAllRecent();
|
||||
else if(cmd == "properties")
|
||||
openGameProperties();
|
||||
else if(cmd == "override")
|
||||
openGlobalProps();
|
||||
else if(cmd == "extensions")
|
||||
@ -807,6 +809,10 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||
myList->toggleUserFavorite();
|
||||
break;
|
||||
|
||||
case KBDK_G:
|
||||
openGameProperties();
|
||||
break;
|
||||
|
||||
case KBDK_H:
|
||||
if(instance().highScores().enabled())
|
||||
openHighScores();
|
||||
@ -1137,6 +1143,7 @@ void LauncherDialog::openContextMenu(int x, int y)
|
||||
}
|
||||
if(!currentNode().isDirectory() && Bankswitch::isValidRomName(currentNode()))
|
||||
{
|
||||
items.push_back(ContextItem("Game properties" + ELLIPSIS, "Ctrl+G", "properties"));
|
||||
items.push_back(ContextItem("Power-on options" + ELLIPSIS, "Ctrl+P", "override"));
|
||||
if(instance().highScores().enabled())
|
||||
items.push_back(ContextItem("High scores" + ELLIPSIS, "Ctrl+H", "highscores"));
|
||||
@ -1212,6 +1219,18 @@ void LauncherDialog::openSettings()
|
||||
myDialog->open();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void LauncherDialog::openGameProperties()
|
||||
{
|
||||
if(!currentNode().isDirectory() && Bankswitch::isValidRomName(currentNode()))
|
||||
{
|
||||
// Create game properties dialog
|
||||
myDialog = make_unique<GameInfoDialog>(instance(), parent(),
|
||||
myUseMinimalUI ? _font : instance().frameBuffer().font(), this, _w, _h);
|
||||
myDialog->open();
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void LauncherDialog::openGlobalProps()
|
||||
{
|
||||
|
@ -168,6 +168,7 @@ class LauncherDialog : public Dialog, CommandSender
|
||||
void loadRom();
|
||||
void loadRomInfo();
|
||||
void openSettings();
|
||||
void openGameProperties();
|
||||
void openContextMenu(int x = -1, int y = -1);
|
||||
void openGlobalProps();
|
||||
void openHighScores();
|
||||
|
Loading…
Reference in New Issue
Block a user