WiiUPluginLoaderBackend/source/utils/config/ConfigDisplayItem.cpp

31 lines
1.1 KiB
C++
Raw Normal View History

2024-11-27 20:44:36 +01:00
#include "ConfigDisplayItem.h"
#include "config/WUPSConfig.h"
ConfigDisplayItem::ConfigDisplayItem(GeneralConfigInformation &info,
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config,
const bool isActive) : mConfig(std::move(config)),
mInfo(std::move(info)),
mIsActivePlugin(isActive),
mInitialIsActivePlugin(isActive) {
2024-11-27 20:44:36 +01:00
assert(mConfig);
}
2024-11-27 20:44:36 +01:00
const GeneralConfigInformation &ConfigDisplayItem::getConfigInformation() const {
return mInfo;
}
2024-11-27 20:44:36 +01:00
const WUPSConfigAPIBackend::WUPSConfig &ConfigDisplayItem::getConfig() const {
return *mConfig;
}
bool ConfigDisplayItem::isActivePlugin() const {
return mIsActivePlugin;
}
void ConfigDisplayItem::toggleIsActivePlugin() {
mIsActivePlugin = !mIsActivePlugin;
}
void ConfigDisplayItem::resetIsActivePlugin() {
mIsActivePlugin = mInitialIsActivePlugin;
2024-11-27 20:44:36 +01:00
}