diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 2e4e757d9..0d35b5e30 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -35,6 +35,7 @@ #include "PromptWidget.hxx" #include "RomWidget.hxx" #include "ProgressDialog.hxx" +#include "BrowserDialog.hxx" #include "TimerManager.hxx" #include "Vec.hxx" diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index bf648e112..cec05172d 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -17,6 +17,7 @@ #include "bspf.hxx" #include "Bankswitch.hxx" +#include "BrowserDialog.hxx" #include "ContextMenu.hxx" #include "DialogContainer.hxx" #include "Dialog.hxx" diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx index 785394708..cd9d845a8 100644 --- a/src/gui/LauncherDialog.hxx +++ b/src/gui/LauncherDialog.hxx @@ -22,6 +22,7 @@ class ButtonWidget; class CommandSender; class ContextMenu; class DialogContainer; +class BrowserDialog; class OptionsDialog; class HighScoresDialog; class GlobalPropsDialog; @@ -167,6 +168,7 @@ class LauncherDialog : public Dialog unique_ptr myStellaSettingsDialog; unique_ptr myMenu; unique_ptr myGlobalProps; + unique_ptr myRomDir; unique_ptr myWhatsNewDialog; // automatically sized font for ROM info viewer diff --git a/src/gui/RomAuditDialog.cxx b/src/gui/RomAuditDialog.cxx index 121732998..de7f3f5cd 100644 --- a/src/gui/RomAuditDialog.cxx +++ b/src/gui/RomAuditDialog.cxx @@ -37,6 +37,7 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h) : Dialog(osystem, parent, font, "Audit ROMs"), + myFont{font}, myMaxWidth{max_w}, myMaxHeight{max_h} { @@ -185,7 +186,7 @@ void RomAuditDialog::handleCommand(CommandSender* sender, int cmd, msg.push_back("If you're sure you want to proceed with the"); msg.push_back("audit, click 'OK', otherwise click 'Cancel'."); myConfirmMsg = make_unique - (this, _font, msg, myMaxWidth, myMaxHeight, kConfirmAuditCmd, + (this, myFont, msg, myMaxWidth, myMaxHeight, kConfirmAuditCmd, "OK", "Cancel", "ROM Audit", false); } myConfirmMsg->show(); @@ -228,7 +229,7 @@ void RomAuditDialog::createBrowser(const string& title) // Create file browser dialog if(!myBrowser || uInt32(myBrowser->getWidth()) != w || uInt32(myBrowser->getHeight()) != h) - myBrowser = make_unique(this, _font, w, h, title); + myBrowser = make_unique(this, myFont, w, h, title); else myBrowser->setTitle(title); } diff --git a/src/gui/RomAuditDialog.hxx b/src/gui/RomAuditDialog.hxx index c0e27d4bd..3bc2a5969 100644 --- a/src/gui/RomAuditDialog.hxx +++ b/src/gui/RomAuditDialog.hxx @@ -54,6 +54,7 @@ class RomAuditDialog : public Dialog // Select a new ROM audit path unique_ptr myBrowser; + const GUI::Font& myFont; // ROM audit path EditTextWidget* myRomPath{nullptr}; diff --git a/src/gui/SnapshotDialog.cxx b/src/gui/SnapshotDialog.cxx index 6c2de15fa..28067213c 100644 --- a/src/gui/SnapshotDialog.cxx +++ b/src/gui/SnapshotDialog.cxx @@ -28,7 +28,8 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, int max_w, int max_h) - : Dialog(osystem, parent, font, "Snapshot settings") + : Dialog(osystem, parent, font, "Snapshot settings"), + myFont{font} { const int lineHeight = font.getLineHeight(), fontHeight = _font.getFontHeight(), @@ -188,7 +189,7 @@ void SnapshotDialog::createBrowser(const string& title) // Create file browser dialog if(!myBrowser || uInt32(myBrowser->getWidth()) != w || uInt32(myBrowser->getHeight()) != h) - myBrowser = make_unique(this, _font, w, h, title); + myBrowser = make_unique(this, myFont, w, h, title); else myBrowser->setTitle(title); } diff --git a/src/gui/SnapshotDialog.hxx b/src/gui/SnapshotDialog.hxx index 04b8b73a5..6c9a30118 100644 --- a/src/gui/SnapshotDialog.hxx +++ b/src/gui/SnapshotDialog.hxx @@ -52,6 +52,8 @@ class SnapshotDialog : public Dialog kSnapshotInterval = 'SnIn' // snap chosen (load files) }; + const GUI::Font& myFont; + // Config paths EditTextWidget* mySnapSavePath{nullptr}; diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx index 722509899..65c7d927b 100644 --- a/src/gui/UIDialog.cxx +++ b/src/gui/UIDialog.cxx @@ -42,6 +42,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font, GuiObject* boss, int max_w, int max_h) : Dialog(osystem, parent, font, "User interface settings"), CommandSender(boss), + myFont{font}, myIsGlobal{boss != nullptr} { const GUI::Font& ifont = instance().frameBuffer().infoFont(); @@ -711,7 +712,7 @@ void UIDialog::createBrowser(const string& title) // Create file browser dialog if(!myBrowser || uInt32(myBrowser->getWidth()) != w || uInt32(myBrowser->getHeight()) != h) - myBrowser = make_unique(this, _font, w, h, title); + myBrowser = make_unique(this, myFont, w, h, title); else myBrowser->setTitle(title); } diff --git a/src/gui/UIDialog.hxx b/src/gui/UIDialog.hxx index 6c776c9c1..544f6c764 100644 --- a/src/gui/UIDialog.hxx +++ b/src/gui/UIDialog.hxx @@ -50,6 +50,7 @@ class UIDialog : public Dialog, public CommandSender kSnapLoadDirChosenCmd = 'UIsc' // snap chosen (load files) }; + const GUI::Font& myFont; TabWidget* myTab{nullptr}; // Launcher options