mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Qt/MappingButton: light up when mapped key is pressed
This commit is contained in:
@ -47,9 +47,13 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
|
||||
|
||||
group_box->setLayout(form_layout);
|
||||
|
||||
bool need_indicator = group->type == ControllerEmu::GroupType::Cursor ||
|
||||
group->type == ControllerEmu::GroupType::Stick ||
|
||||
group->type == ControllerEmu::GroupType::Tilt;
|
||||
|
||||
for (auto& control : group->controls)
|
||||
{
|
||||
auto* button = new MappingButton(this, control->control_ref.get());
|
||||
auto* button = new MappingButton(this, control->control_ref.get(), !need_indicator);
|
||||
|
||||
button->setMinimumWidth(100);
|
||||
button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
@ -87,6 +91,9 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
|
||||
m_bools.push_back(checkbox);
|
||||
}
|
||||
|
||||
if (need_indicator)
|
||||
form_layout->addRow(new MappingIndicator(group));
|
||||
|
||||
return group_box;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user