/* * * Copyright (c) Souldbminer, Lightos_ and Horizon OC Contributors * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #pragma once #include #include #include #include "../../ipc.h" #include "base_menu_gui.h" #include "freq_choice_gui.h" #include "info_gui.h" #include "value_choice_gui.h" #include #include class MiscGui : public BaseMenuGui { public: MiscGui(); ~MiscGui(); void listUI() override; void refresh() override; protected: HocClkConfigValueList *configList; std::map configButtons; std::map configRanges; std::map> configNamedValues; std::map configToggles; std::map>> configTrackbars; std::set configButtonSKeys; std::map configButtonSSubtext; std::set emcClockConfigs; void addConfigToggle(HocClkConfigValue configVal, const char *altName, bool kip = false); void addConfigTrackbar(HocClkConfigValue configVal, const char *altName, const ValueRange &range, bool kip = true); void addMappedConfigTrackbar(HocClkConfigValue configVal, const char *altName, std::vector vals, std::initializer_list names, bool kip = true); void addConfigButton(HocClkConfigValue configVal, const char *altName, const ValueRange &range, const std::string &categoryName, const ValueThresholds *thresholds, const std::map &labels = {}, const std::vector &namedValues = {}, bool showDefaultValue = true, bool kip = false); void addConfigButtonS(HocClkConfigValue configVal, const char *altName, const ValueRange &range, const std::string &categoryName, const ValueThresholds *thresholds, const std::map &labels = {}, const std::vector &namedValues = {}, bool showDefaultValue = true, const char *subText = nullptr, bool kip = false); void addFreqButton(HocClkConfigValue configVal, const char *altName, HocClkModule module, const std::map &labels = {}); void updateConfigToggles(); tsl::elm::ToggleListItem *enabledToggle; u8 frameCounter = 60; bool shouldSaveKip = false; };