From cd9ec795701fda048ab0566e9f895505a6cab2ca Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Fri, 26 Nov 2021 06:53:14 -0500 Subject: [PATCH] Qt TAS editor tool tips in work. --- src/drivers/Qt/TasEditor/TasEditorWindow.cpp | 29 ++++++++++++++++++++ src/drivers/Qt/TasEditor/TasEditorWindow.h | 1 + 2 files changed, 30 insertions(+) diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp index 5964ff17..e050592c 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp @@ -237,6 +237,7 @@ TasEditorWindow::TasEditorWindow(QWidget *parent) initModules(); updateCheckedItems(); + updateToolTips(); // Restore Window Geometry restoreGeometry(settings.value("tasEditor/geometry").toByteArray()); @@ -2372,6 +2373,34 @@ void TasEditorWindow::autoLuaRunChanged(bool val) void TasEditorWindow::showToolTipsActChanged(bool val) { taseditorConfig.tooltipsEnabled = val; + + updateToolTips(); +} +//---------------------------------------------------------------------------- +void TasEditorWindow::updateToolTips(void) +{ + if ( taseditorConfig.tooltipsEnabled ) + { + recRecordingCbox->setToolTip( tr("Switch Input Recording on/off") ); + recSuperImposeCbox->setToolTip( tr("Allows to superimpose old Input with new buttons, instead of overwriting") ); + recUsePatternCbox->setToolTip( tr("Applies current Autofire Pattern to Input recording") ); + recAllBtn->setToolTip( tr("Switch off Multitracking") ); + rec1PBtn->setToolTip( tr("Select Joypad 1 as Current") ); + rec2PBtn->setToolTip( tr("Select Joypad 2 as Current") ); + rec3PBtn->setToolTip( tr("Select Joypad 3 as Current") ); + rec4PBtn->setToolTip( tr("Select Joypad 4 as Current") ); + } + else + { + recRecordingCbox->setToolTip( tr("") ); + recSuperImposeCbox->setToolTip( tr("") ); + recUsePatternCbox->setToolTip( tr("") ); + recAllBtn->setToolTip( tr("") ); + rec1PBtn->setToolTip( tr("") ); + rec2PBtn->setToolTip( tr("") ); + rec3PBtn->setToolTip( tr("") ); + rec4PBtn->setToolTip( tr("") ); + } } //---------------------------------------------------------------------------- void TasEditorWindow::playbackPauseCB(void) diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.h b/src/drivers/Qt/TasEditor/TasEditorWindow.h index 4c1a5bc5..ea0f792f 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.h +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.h @@ -304,6 +304,7 @@ class TasEditorWindow : public QDialog bool saveProject(bool save_compact = false); bool saveProjectAs(bool save_compact = false); bool askToSaveProject(void); + void updateToolTips(void); public slots: void closeWindow(void);