Merge pull request #13208 from Dentomologist/wiitasinputwindow_update_on_attachment_change

WiiTASInputWindow: Update controls when attachment changes
This commit is contained in:
Admiral H. Curtiss
2025-02-02 18:02:58 +01:00
committed by GitHub
7 changed files with 192 additions and 39 deletions

View File

@ -35,6 +35,11 @@ NumericSetting<int>& Attachments::GetSelectionSetting()
return m_selection_setting;
}
SubscribableSettingValue<int>& Attachments::GetAttachmentSetting()
{
return m_selection_value;
}
const std::vector<std::unique_ptr<EmulatedController>>& Attachments::GetAttachmentList() const
{
return m_attachments;

View File

@ -29,11 +29,12 @@ public:
void SetSelectedAttachment(u32 val);
NumericSetting<int>& GetSelectionSetting();
SubscribableSettingValue<int>& GetAttachmentSetting();
const std::vector<std::unique_ptr<EmulatedController>>& GetAttachmentList() const;
private:
SettingValue<int> m_selection_value;
SubscribableSettingValue<int> m_selection_value;
// This is here and not added to the list of numeric_settings because it's serialized differently,
// by string (to be independent from the enum), and visualized differently in the UI.
// For the rest, it's treated similarly to other numeric_settings in the group.