allow open Power-on options via joystick 2nd button

add initial documentation for R77 (navigation only)
This commit is contained in:
thrust26 2019-05-01 11:28:23 +02:00
parent dcc8d98f7f
commit fc3989fda1
4 changed files with 68 additions and 3 deletions

50
docs/R77_readme.txt Normal file
View File

@ -0,0 +1,50 @@
TODOs:
- convert into HTML
- maybe display inside a R77 specific help dialog (from Command dialog)
- check if Command dialog and Settings shoud use the same button (16:9,4:3)
- explain Command and Settings dialog
- explain Power-on options dialog (or refer to Stella User's Guide)
*** Navigation ***
Stella can be controlled via the console buttons or a joystick in left or
right port.
Inside Launcher:
Joystick Button Action
--------------------------------------------------
Up SAVE previous game
Down RESET next game
Left LOAD page up
Right MODE page down
Button SKILL P1 start selected game
Button #2 SKILL P2 open Power-on options dialog
- COLOR,B/W open Settings dialog
Inside a dialog:
Joystick Button Action
----------------------------------------------------
Up SAVE change/increase current option
Down RESET change/decrease current option
Left LOAD previous dialog element
Right MODE next dialog element
Button SKILL P1 select
Button #2 SKILL P2 cancel
- 4:3,16:9 previous tab
- FRY next tab
During emulation:
The joysticks work normal and all console buttons as labeled except of the
following.
Button Action
----------------------------------
4:3,16:9 open the Command dialog
FRY return to Launcher
Note: If you have a keyboard attached via OTG all keys work as described in
the Stella User's Guide.

View File

@ -307,8 +307,9 @@ void PhysicalJoystickHandler::setStickDefaultMapping(int stick,
setDefaultAxis( stick, 1, 0, Event::UIUp );
setDefaultAxis( stick, 1, 1, Event::UIDown );
// Left joystick (assume joystick zero, button zero)
// joystick (assume buttons zero and one)
setDefaultBtn( stick, 0, Event::UISelect );
setDefaultBtn( stick, 1, Event::UICancel );
setDefaultHat( stick, 0, JoyHat::LEFT, Event::UINavPrev );
setDefaultHat( stick, 0, JoyHat::RIGHT, Event::UINavNext );

View File

@ -464,11 +464,11 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod)
switch(key)
{
case KBDK_F8: // front ("Skill P2")
openSettings();
myGlobalProps->open();
break;
case KBDK_F4: // back ("COLOR", "B/W")
myGlobalProps->open();
openSettings();
break;
case KBDK_F11: // front ("LOAD")
@ -491,6 +491,18 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod)
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void LauncherDialog::handleJoyDown(int stick, int button)
{
// open power-up options for 2nd button if not mapped otherwise
Event::Type e = instance().eventHandler().eventForJoyButton(stick, button, kMenuMode);
if (button == 1 && (e == Event::UICancel || e == Event::NoType))
myGlobalProps->open();
else
Dialog::handleJoyDown(stick, button);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Event::Type LauncherDialog::getJoyAxisEvent(int stick, int axis, int value)
{
@ -541,6 +553,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
showOnlyROMs(myAllFiles ? !myAllFiles->getState() : true);
updateListing();
break;
case kLoadROMCmd:
case ListWidget::kActivatedCmd:
case ListWidget::kDoubleClickedCmd:

View File

@ -88,6 +88,7 @@ class LauncherDialog : public Dialog
void handleKeyDown(StellaKey key, StellaMod mod) override;
void handleMouseDown(int x, int y, MouseButton b, int clickCount) override;
void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
void handleJoyDown(int stick, int button);
Event::Type getJoyAxisEvent(int stick, int axis, int value) override;
void loadConfig() override;