mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
Added sound settings page
+ added sound setting page + added sound setting icon + moved sound settings from interface settings Added master volume + added master volume slider. + volume can be changed by sliding bar or by using the spin box + Preview of volume will be played when dragging and releasing bar. Added checks for qt4 Qt4 does not have support for setting the volume without some lengthy work around, I have disabled volume control for qt4 users and have mentioned that "Master volume requires qt5". Updated sfx + removed all old sfx + added new end step and tap sound + tap/endstep sound has a timer on it to prevent spamming + test sound engine will now use endstep sound Made end step sfx softer end step felt too harsh Added player joined sound + added a sound for when a new player joins a room Updated Was missing a sound when a player joins Made end step softer Made end step even softer updated sound again
This commit is contained in:
parent
cf24f4aa04
commit
c64eeb4ebe
19 changed files with 454 additions and 96 deletions
|
|
@ -23,6 +23,8 @@ class QCloseEvent;
|
|||
class QSpinBox;
|
||||
class QRadioButton;
|
||||
class QSpinBox;
|
||||
class QSlider;
|
||||
class QSpinBox;
|
||||
|
||||
class AbstractSettingsPage : public QWidget {
|
||||
public:
|
||||
|
|
@ -115,24 +117,16 @@ public:
|
|||
class UserInterfaceSettingsPage : public AbstractSettingsPage {
|
||||
Q_OBJECT
|
||||
private slots:
|
||||
void soundPathClearButtonClicked();
|
||||
void soundPathButtonClicked();
|
||||
void setSpecNotificationEnabled(int);
|
||||
signals:
|
||||
void soundPathChanged();
|
||||
private:
|
||||
QCheckBox notificationsEnabledCheckBox;
|
||||
QCheckBox specNotificationsEnabledCheckBox;
|
||||
QCheckBox doubleClickToPlayCheckBox;
|
||||
QCheckBox playToStackCheckBox;
|
||||
QCheckBox tapAnimationCheckBox;
|
||||
QCheckBox soundEnabledCheckBox;
|
||||
QLabel soundPathLabel;
|
||||
QLineEdit *soundPathEdit;
|
||||
QGroupBox *generalGroupBox;
|
||||
QGroupBox *animationGroupBox;
|
||||
QGroupBox *soundGroupBox;
|
||||
QPushButton soundTestButton;
|
||||
|
||||
public:
|
||||
UserInterfaceSettingsPage();
|
||||
void retranslateUi();
|
||||
|
|
@ -181,6 +175,28 @@ private:
|
|||
void updateMentionPreview();
|
||||
};
|
||||
|
||||
class SoundSettingsPage : public AbstractSettingsPage {
|
||||
Q_OBJECT
|
||||
public:
|
||||
SoundSettingsPage();
|
||||
void retranslateUi();
|
||||
private:
|
||||
QGroupBox *soundGroupBox;
|
||||
QPushButton soundTestButton;
|
||||
QCheckBox soundEnabledCheckBox;
|
||||
QLabel soundPathLabel;
|
||||
QLineEdit *soundPathEdit;
|
||||
QLabel masterVolumeLabel;
|
||||
QSlider *masterVolumeSlider;
|
||||
QSpinBox *masterVolumeSpinBox;
|
||||
signals:
|
||||
void soundPathChanged();
|
||||
private slots:
|
||||
void masterVolumeChanged(int value);
|
||||
void soundPathClearButtonClicked();
|
||||
void soundPathButtonClicked();
|
||||
};
|
||||
|
||||
class DlgSettings : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
@ -192,7 +208,7 @@ private slots:
|
|||
private:
|
||||
QListWidget *contentsWidget;
|
||||
QStackedWidget *pagesWidget;
|
||||
QListWidgetItem *generalButton, *appearanceButton, *userInterfaceButton, *deckEditorButton, *messagesButton;
|
||||
QListWidgetItem *generalButton, *appearanceButton, *userInterfaceButton, *deckEditorButton, *messagesButton, *soundButton;
|
||||
void createIcons();
|
||||
void retranslateUi();
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue