From 68833dc904d97adf3ded5977cb2fe093fe7f4f0e Mon Sep 17 00:00:00 2001 From: thrust26 Date: Thu, 31 Aug 2023 23:11:13 +0200 Subject: [PATCH] some polishing for LauncherDialog (incl. doc) --- docs/index.html | 44 ++++++++++++++++++++++++++++++++++++++ docs/index_r77.html | 5 +++++ src/gui/LauncherDialog.cxx | 15 +++++++++---- src/gui/RomImageWidget.hxx | 1 + 4 files changed, 61 insertions(+), 4 deletions(-) diff --git a/docs/index.html b/docs/index.html index 6dcd3d432..a9e37838e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1955,101 +1955,121 @@ Function Key (Standard) Key (macOS) + Controller Open context-sensitive help F1 Shift-Cmd + ? + - Move Up Up arrow Up arrow + Up Move Down Down arrow Down arrow + Down Move Left Left arrow Left arrow + Down Move Right Right arrow Right arrow + Up Move Home Home Home + - Move End End End + - Move Page Up Page Up Page Up + - Move Page Down Page Down Page Down + - OK - - + Button 1/X + Up, Button 2/A Cancel Escape Escape + - Select item Return/Enter/Space Return/Enter/Space + Button 1/X Move to previous object Shift + Tab Shift + Tab + Left Move to next object Tab Tab + Right Move to previous tab Shift-Control + Tab Shift-Control + Tab + Button 1/X + Left, Button 4/Y Move to next tab Control + Tab Control + Tab + Button 1/X + Right, Button 3/B Toggle windowed/fullscreen mode Alt + Return Cmd + Return + - Toggle UI theme Alt + T Cmd + T + - Exit Stella Control + Q Cmd + Q + - @@ -2060,91 +2080,115 @@ Function Key (Standard) Key (macOS) + Controller Go to initial directory (also in other file dialogs) Alt + Home Alt + Home + - Go to previous directory in history (also in other file dialogs) Alt + Left arrow Alt + Left arrow + - Go to next directory in history (also in other file dialogs) Alt + Right arrow Alt + Right arrow + - Go to parent directory (also in other file dialogs) Backspace, Alt + Up arrow Backspace, Alt + Up arrow + - Select previous image Control + Left arrow Control + Left arrow + Button 1/X + Left Select next image Control + Right arrow Control + Right arrow + Button 1/X + Right Toogle image zoom Control + Return Control + Return + Button 1/X + Up Remove from 'Recently Played' or 'Most Popular' folder Control + X Control + X + - Toggle favorite Control + F Control + F + - Open Game properties dialog Control + G Control + G + - Open Power-On options dialog Control + P Control + P + Button 2/A Open High Scores dialog (if available for selected ROM) Control + H Control + H + - Toggle file extensions display Control + E Control + E + - Toggle search ROMs in subdirectories too Control + D Control + D + - Toggle favorites sorting (normal or alternative) Control + S Control + S + - Reload ROM listing Control + R Control + R + - Open Options dialog Control + O Control + O + Button 4/Y + + + Open context menu + - + - + Hold Button diff --git a/docs/index_r77.html b/docs/index_r77.html index 04a15c119..6843da5a5 100644 --- a/docs/index_r77.html +++ b/docs/index_r77.html @@ -170,6 +170,11 @@ - Display next image + + Button 1 + Up + - + Toggle image zoom + Button 2 SKILL P2 diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index de9356c1d..8abdf321e 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -476,7 +476,7 @@ void LauncherDialog::loadConfig() const string& version = settings.getString("stella.version"); // Show "What's New" message when a new version of Stella is run for the first time - if(version != STELLA_VERSION) + if(version < STELLA_VERSION) { openWhatsNew(); settings.setValue("stella.version", STELLA_VERSION); @@ -918,26 +918,33 @@ Event::Type LauncherDialog::getJoyAxisEvent(int stick, JoyAxis axis, JoyDir adir if(myUseMinimalUI) // convert unused previous item event into page-up event e = Event::UIPgUp; + else + myRomImageWidget->disableImageZoom(); break; case Event::UINavNext: if(myUseMinimalUI) // convert unused next item event into page-down event e = Event::UIPgDown; + else + myRomImageWidget->disableImageZoom(); break; case Event::UITabPrev: - myRomImageWidget->changeImage(-1); + if(myList->isHighlighted()) + myRomImageWidget->changeImage(-1); myEventHandled = true; break; case Event::UITabNext: - myRomImageWidget->changeImage(1); + if(myList->isHighlighted()) + myRomImageWidget->changeImage(1); myEventHandled = true; break; case Event::UIOK: - myRomImageWidget->toggleImageZoom(); + if(myList->isHighlighted()) + myRomImageWidget->toggleImageZoom(); myEventHandled = true; break; diff --git a/src/gui/RomImageWidget.hxx b/src/gui/RomImageWidget.hxx index 3acc8d5a8..c9a82fb24 100644 --- a/src/gui/RomImageWidget.hxx +++ b/src/gui/RomImageWidget.hxx @@ -42,6 +42,7 @@ class RomImageWidget : public Widget bool changeImage(int direction = 1); // Toggle zoom via keyboard void toggleImageZoom(); + void disableImageZoom() { myZoomMode = false; }; uInt64 pendingLoadTime() { return myMaxLoadTime * timeFactor; }