mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-10 02:55:22 +02:00
Added FFT hold feature
This commit is contained in:
@ -84,7 +84,7 @@ bool ThemeManager::loadTheme(std::string path) {
|
||||
if (param == "name" || param == "author") { continue; }
|
||||
|
||||
// Exception for non-imgu colors
|
||||
if (param == "WaterfallBackground" || param == "ClearColor") {
|
||||
if (param == "WaterfallBackground" || param == "ClearColor" || param == "FFTHoldColor") {
|
||||
if (val[0] != '#' || !std::all_of(val.begin() + 1, val.end(), ::isxdigit) || val.length() != 9) {
|
||||
spdlog::error("Theme {0} contains invalid {1} field. Expected hex RGBA color", path, param);
|
||||
return false;
|
||||
@ -152,6 +152,12 @@ bool ThemeManager::applyTheme(std::string name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (param == "FFTHoldColor") {
|
||||
decodeRGBA(val, ret);
|
||||
fftHoldColor = ImVec4((float)ret[0] / 255.0f, (float)ret[1] / 255.0f, (float)ret[2] / 255.0f, (float)ret[3] / 255.0f);
|
||||
continue;
|
||||
}
|
||||
|
||||
// If param is a color, check that it's a valid RGBA hex value
|
||||
if (IMGUI_COL_IDS.find(param) != IMGUI_COL_IDS.end()) {
|
||||
decodeRGBA(val, ret);
|
||||
|
Reference in New Issue
Block a user