// Copyright 2017 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #pragma once #include #include #include #include #include "Common/CommonTypes.h" #include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h" #include "InputCommon/ControllerEmu/ControllerEmu.h" #include "InputCommon/ControllerEmu/Setting/NumericSetting.h" namespace ControllerEmu { // A container of the selected and available attachments // for configuration saving/loading purposes class Attachments : public ControlGroup { public: explicit Attachments(const std::string& name); void AddAttachment(std::unique_ptr att); u32 GetSelectedAttachment() const; void SetSelectedAttachment(u32 val); NumericSetting& GetSelectionSetting(); const std::vector>& GetAttachmentList() const; private: SettingValue m_selection_value; NumericSetting m_selection_setting = {&m_selection_value, {""}, 0, 0, 0}; std::vector> m_attachments; }; } // namespace ControllerEmu