UI: Add controller binding tooltips for additional controls

This commit is contained in:
refractionpcsx2 2023-07-13 18:53:00 +01:00
parent 4f4b9956b3
commit 76f4a5b2fe
1 changed files with 7 additions and 2 deletions

View File

@ -74,9 +74,14 @@ void InputBindingWidget::initialize(
void InputBindingWidget::updateText()
{
const QString binding_tip(tr("\n\nLeft click to assign a new button\nShift + left click for additional bindings"));
const QString binding_clear_tip(tr("\nRight click to clear binding"));
if (m_bindings.empty())
{
setText(QString());
setToolTip(tr("No bindings registered") + binding_tip);
}
else if (m_bindings.size() > 1)
{
@ -93,12 +98,12 @@ void InputBindingWidget::updateText()
ss << "\n";
ss << binding;
}
setToolTip(QString::fromStdString(ss.str()));
setToolTip(QString::fromStdString(ss.str()) + binding_tip + binding_clear_tip);
}
else
{
QString binding_text(QString::fromStdString(m_bindings[0]));
setToolTip(binding_text);
setToolTip(binding_text + binding_tip + binding_clear_tip);
// fix up accelerators, and if it's too long, ellipsise it
if (binding_text.contains('&'))