mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-17 07:49:21 +00:00
InterfacePane: Add BalloonTip to cursor visible radio buttons
This commit is contained in:
parent
a581fa2bfa
commit
33b64d6c91
6 changed files with 49 additions and 55 deletions
|
@ -27,8 +27,13 @@ ConfigRadioInt::ConfigRadioInt(const QString& label, const Config::Info<int>& se
|
|||
|
||||
void ConfigRadioInt::Update()
|
||||
{
|
||||
if (!isChecked())
|
||||
return;
|
||||
|
||||
Config::SetBaseOrCurrent(m_setting, m_value);
|
||||
if (isChecked())
|
||||
{
|
||||
Config::SetBaseOrCurrent(m_setting, m_value);
|
||||
emit OnSelected(m_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit OnDeselected(m_value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,12 @@ class ConfigRadioInt : public ToolTipRadioButton
|
|||
public:
|
||||
ConfigRadioInt(const QString& label, const Config::Info<int>& setting, int value);
|
||||
|
||||
signals:
|
||||
// Since selecting a new radio button deselects the old one, ::toggled will generate two signals.
|
||||
// These are convenience functions so you can receive only one signal if desired.
|
||||
void OnSelected(int new_value);
|
||||
void OnDeselected(int old_value);
|
||||
|
||||
private:
|
||||
void Update();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue