More settings implementation
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
/build
|
/build
|
||||||
/.clangd
|
/.clangd
|
||||||
/.lock-waf*
|
/.lock-waf*
|
||||||
|
/package-lock.json
|
||||||
|
|||||||
+2
-1
@@ -32,7 +32,8 @@
|
|||||||
"CLAY_SHOW_TIME_MG",
|
"CLAY_SHOW_TIME_MG",
|
||||||
"CLAY_LED_COLOR",
|
"CLAY_LED_COLOR",
|
||||||
"CLAY_BG_COLOR",
|
"CLAY_BG_COLOR",
|
||||||
"CLAY_MG_COLOR",
|
"CLAY_BAR_MG_COLOR",
|
||||||
|
"CLAY_TIME_MG_COLOR",
|
||||||
"CLAY_FG_COLOR"
|
"CLAY_FG_COLOR"
|
||||||
],
|
],
|
||||||
"resources": {
|
"resources": {
|
||||||
|
|||||||
+67
-53
@@ -1,5 +1,5 @@
|
|||||||
#include "palette_manip.h"
|
#include "palette_manip.h"
|
||||||
#include "src/resource_ids.auto.h"
|
#include "settings.h"
|
||||||
#include <pebble.h>
|
#include <pebble.h>
|
||||||
|
|
||||||
// window statics
|
// window statics
|
||||||
@@ -26,18 +26,12 @@ static const GRect s_time_grects[4] = {GRect(s_x_l, 2, 69, 110), GRect(s_x_r, 2,
|
|||||||
static const uint8_t s_temp_guage_x_pos = 6;
|
static const uint8_t s_temp_guage_x_pos = 6;
|
||||||
static const uint16_t s_fuel_guage_x_pos = PBL_DISPLAY_WIDTH - 23;
|
static const uint16_t s_fuel_guage_x_pos = PBL_DISPLAY_WIDTH - 23;
|
||||||
|
|
||||||
// persist statics&defines
|
// settings statics
|
||||||
static GColor8 s_mg_color;
|
static ClaySettings settings;
|
||||||
static GColor8 s_fg_color;
|
|
||||||
#define storage_key_show_time_mg 0
|
|
||||||
#define storage_key_led_color 1
|
|
||||||
#define storage_key_bg_color 2
|
|
||||||
#define storage_key_mg_color 3
|
|
||||||
#define storage_key_fg_color 4
|
|
||||||
|
|
||||||
// bitmaps
|
// bitmap statics
|
||||||
static GBitmap *s_font_bitmaps[10];
|
static GBitmap *s_font_bitmaps[10];
|
||||||
static GBitmap *s_time_mg_0;
|
static GBitmap *s_time_mg_8;
|
||||||
static GBitmap *s_c_icon;
|
static GBitmap *s_c_icon;
|
||||||
static GBitmap *s_h_icon;
|
static GBitmap *s_h_icon;
|
||||||
static GBitmap *s_e_icon;
|
static GBitmap *s_e_icon;
|
||||||
@@ -82,7 +76,7 @@ static void fuel_update_proc(Layer *layer, GContext *ctx) {
|
|||||||
|
|
||||||
static void temp_fuel_mg_update_proc_helper(Layer *layer, GContext *ctx, bool isFuel) {
|
static void temp_fuel_mg_update_proc_helper(Layer *layer, GContext *ctx, bool isFuel) {
|
||||||
GRect bounds = layer_get_bounds(layer);
|
GRect bounds = layer_get_bounds(layer);
|
||||||
graphics_context_set_fill_color(ctx, s_mg_color);
|
graphics_context_set_fill_color(ctx, settings.ColorMGBars);
|
||||||
graphics_fill_rect(ctx, bounds, 0, GCornerNone);
|
graphics_fill_rect(ctx, bounds, 0, GCornerNone);
|
||||||
if (isFuel) {
|
if (isFuel) {
|
||||||
graphics_context_set_stroke_color(ctx, GColorRed);
|
graphics_context_set_stroke_color(ctx, GColorRed);
|
||||||
@@ -111,29 +105,21 @@ static void fuel_mg_update_proc(Layer *layer, GContext *ctx) {
|
|||||||
static void main_window_load() {
|
static void main_window_load() {
|
||||||
Layer *window_layer = window_get_root_layer(s_main_window);
|
Layer *window_layer = window_get_root_layer(s_main_window);
|
||||||
|
|
||||||
if (persist_exists(storage_key_led_color)) {
|
// background (+led) colors
|
||||||
light_set_color_rgb888(persist_read_int(storage_key_led_color));
|
light_set_color(settings.ColorLED); // no-op on unsupported platforms
|
||||||
} else {
|
window_set_background_color(s_main_window, settings.ColorBG);
|
||||||
light_set_color(GColorWhite);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (persist_exists(storage_key_bg_color)) {
|
|
||||||
window_set_background_color(s_main_window, (GColor8){.argb = persist_read_int(storage_key_bg_color)});
|
|
||||||
} else {
|
|
||||||
window_set_background_color(s_main_window, GColorBlue);
|
|
||||||
}
|
|
||||||
|
|
||||||
s_temp_mg_layer = layer_create(GRect(s_temp_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43));
|
s_temp_mg_layer = layer_create(GRect(s_temp_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43));
|
||||||
layer_set_update_proc(s_temp_mg_layer, temp_mg_update_proc);
|
layer_set_update_proc(s_temp_mg_layer, temp_mg_update_proc);
|
||||||
s_fuel_mg_layer = layer_create(GRect(s_fuel_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43));
|
s_fuel_mg_layer = layer_create(GRect(s_fuel_guage_x_pos - 1, 21, s_bar_width + 2, PBL_DISPLAY_HEIGHT - 43));
|
||||||
layer_set_update_proc(s_fuel_mg_layer, fuel_mg_update_proc);
|
layer_set_update_proc(s_fuel_mg_layer, fuel_mg_update_proc);
|
||||||
|
|
||||||
if (persist_read_bool(storage_key_show_time_mg)) {
|
if (settings.ShowTimeMG) {
|
||||||
s_time_mg_0 = gbitmap_create_with_resource(RESOURCE_ID_0);
|
s_time_mg_8 = gbitmap_create_with_resource(RESOURCE_ID_8);
|
||||||
replace_gbitmap_color(GColorWhite, s_mg_color, s_time_mg_0, NULL);
|
replace_gbitmap_color(GColorWhite, settings.ColorMGTime, s_time_mg_8, NULL);
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
s_time_mg_layers[i] = bitmap_layer_create(s_time_grects[i]);
|
s_time_mg_layers[i] = bitmap_layer_create(s_time_grects[i]);
|
||||||
bitmap_layer_set_bitmap(s_time_mg_layers[i], s_time_mg_0);
|
bitmap_layer_set_bitmap(s_time_mg_layers[i], s_time_mg_8);
|
||||||
bitmap_layer_set_compositing_mode(s_time_mg_layers[i], GCompOpSet);
|
bitmap_layer_set_compositing_mode(s_time_mg_layers[i], GCompOpSet);
|
||||||
layer_add_child(window_layer, bitmap_layer_get_layer(s_time_mg_layers[i]));
|
layer_add_child(window_layer, bitmap_layer_get_layer(s_time_mg_layers[i]));
|
||||||
}
|
}
|
||||||
@@ -152,14 +138,14 @@ static void main_window_load() {
|
|||||||
bitmap_layer_set_compositing_mode(s_e_layer, GCompOpSet);
|
bitmap_layer_set_compositing_mode(s_e_layer, GCompOpSet);
|
||||||
bitmap_layer_set_compositing_mode(s_f_layer, GCompOpSet);
|
bitmap_layer_set_compositing_mode(s_f_layer, GCompOpSet);
|
||||||
|
|
||||||
if (s_fg_color.argb != GColorWhite.argb) {
|
if (settings.ColorFG.argb != GColorWhite.argb) {
|
||||||
for (int i = 0; i < 10; ++i) {
|
for (int i = 0; i < 10; ++i) {
|
||||||
replace_gbitmap_color(GColorWhite, s_fg_color, s_font_bitmaps[i], NULL);
|
replace_gbitmap_color(GColorWhite, settings.ColorFG, s_font_bitmaps[i], NULL);
|
||||||
}
|
}
|
||||||
replace_gbitmap_color(GColorWhite, s_fg_color, s_c_icon, NULL);
|
replace_gbitmap_color(GColorWhite, settings.ColorFG, s_c_icon, NULL);
|
||||||
replace_gbitmap_color(GColorWhite, s_fg_color, s_h_icon, NULL);
|
replace_gbitmap_color(GColorWhite, settings.ColorFG, s_h_icon, NULL);
|
||||||
replace_gbitmap_color(GColorWhite, s_fg_color, s_e_icon, NULL);
|
replace_gbitmap_color(GColorWhite, settings.ColorFG, s_e_icon, NULL);
|
||||||
replace_gbitmap_color(GColorWhite, s_fg_color, s_f_icon, NULL);
|
replace_gbitmap_color(GColorWhite, settings.ColorFG, s_f_icon, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
@@ -177,6 +163,7 @@ static void main_window_load() {
|
|||||||
|
|
||||||
static void main_window_unload() {
|
static void main_window_unload() {
|
||||||
layer_destroy(s_fuel_mg_layer);
|
layer_destroy(s_fuel_mg_layer);
|
||||||
|
layer_destroy(s_temp_mg_layer);
|
||||||
bitmap_layer_destroy(s_f_layer);
|
bitmap_layer_destroy(s_f_layer);
|
||||||
bitmap_layer_destroy(s_e_layer);
|
bitmap_layer_destroy(s_e_layer);
|
||||||
bitmap_layer_destroy(s_h_layer);
|
bitmap_layer_destroy(s_h_layer);
|
||||||
@@ -185,10 +172,11 @@ static void main_window_unload() {
|
|||||||
if (s_time_mg_layers[i]) {
|
if (s_time_mg_layers[i]) {
|
||||||
bitmap_layer_destroy(s_time_mg_layers[i]);
|
bitmap_layer_destroy(s_time_mg_layers[i]);
|
||||||
s_time_mg_layers[i] = NULL;
|
s_time_mg_layers[i] = NULL;
|
||||||
if (i == 0) {
|
|
||||||
gbitmap_destroy(s_time_mg_0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (s_time_mg_8) {
|
||||||
|
gbitmap_destroy(s_time_mg_8);
|
||||||
|
s_time_mg_8 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,16 +209,6 @@ static void minute_handler(struct tm *tick_time, TimeUnits units_changed) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void soft_reload(bool first_load) {
|
static void soft_reload(bool first_load) {
|
||||||
if (persist_exists(storage_key_mg_color)) {
|
|
||||||
s_mg_color = (GColor8){.argb = persist_read_int(storage_key_mg_color)};
|
|
||||||
} else {
|
|
||||||
s_mg_color = GColorLightGray;
|
|
||||||
}
|
|
||||||
if (persist_exists(storage_key_fg_color)) {
|
|
||||||
s_fg_color = (GColor8){.argb = persist_read_int(storage_key_fg_color)};
|
|
||||||
} else {
|
|
||||||
s_fg_color = GColorWhite;
|
|
||||||
}
|
|
||||||
if (!first_load) {
|
if (!first_load) {
|
||||||
window_stack_remove(s_main_window, false);
|
window_stack_remove(s_main_window, false);
|
||||||
window_destroy(s_main_window);
|
window_destroy(s_main_window);
|
||||||
@@ -245,23 +223,59 @@ static void soft_reload(bool first_load) {
|
|||||||
static void inbox_received_handler(DictionaryIterator *iter, void *context) {
|
static void inbox_received_handler(DictionaryIterator *iter, void *context) {
|
||||||
Tuple *ready_tuple = dict_find(iter, MESSAGE_KEY_PKJS_READY);
|
Tuple *ready_tuple = dict_find(iter, MESSAGE_KEY_PKJS_READY);
|
||||||
if (ready_tuple) {
|
if (ready_tuple) {
|
||||||
APP_LOG(APP_LOG_LEVEL_DEBUG, "PKJS IS READY");
|
|
||||||
// TODO request temp bars from PKJS
|
// TODO request temp bars from PKJS
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO set up receive handler for temp bars; be sure to return after to avoid soft reloading
|
// TEMPERATURE DATA
|
||||||
|
Tuple *temp_bar_count = dict_find(iter, MESSAGE_KEY_PKJS_TEMP_BAR_COUNT);
|
||||||
Tuple *time_mg_tuple = dict_find(iter, MESSAGE_KEY_CLAY_SHOW_TIME_MG);
|
if (temp_bar_count) {
|
||||||
if (time_mg_tuple) {
|
// TODO
|
||||||
APP_LOG(APP_LOG_LEVEL_DEBUG, "TIME MG TOGGLED");
|
|
||||||
persist_write_bool(storage_key_show_time_mg, time_mg_tuple->value->int32 == 1);
|
|
||||||
soft_reload(false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CLAY SETTINGS
|
||||||
|
Tuple *show_time_mg_tuple = dict_find(iter, MESSAGE_KEY_CLAY_SHOW_TIME_MG);
|
||||||
|
Tuple *color_led_tuple = dict_find(iter, MESSAGE_KEY_CLAY_LED_COLOR);
|
||||||
|
Tuple *color_bg_tuple = dict_find(iter, MESSAGE_KEY_CLAY_BG_COLOR);
|
||||||
|
Tuple *color_mg_bar_tuple = dict_find(iter, MESSAGE_KEY_CLAY_BAR_MG_COLOR);
|
||||||
|
Tuple *color_mg_time_tuple = dict_find(iter, MESSAGE_KEY_CLAY_TIME_MG_COLOR);
|
||||||
|
Tuple *color_fg_tuple = dict_find(iter, MESSAGE_KEY_CLAY_FG_COLOR);
|
||||||
|
if (show_time_mg_tuple) {
|
||||||
|
settings.ShowTimeMG = show_time_mg_tuple->value->uint8;
|
||||||
|
}
|
||||||
|
if (color_led_tuple) {
|
||||||
|
settings.ColorLED = GColorFromHEX(color_led_tuple->value->int32);
|
||||||
|
}
|
||||||
|
if (color_bg_tuple) {
|
||||||
|
settings.ColorBG = GColorFromHEX(color_bg_tuple->value->int32);
|
||||||
|
}
|
||||||
|
if (color_mg_bar_tuple) {
|
||||||
|
settings.ColorMGBars = GColorFromHEX(color_mg_bar_tuple->value->int32);
|
||||||
|
}
|
||||||
|
if (color_mg_time_tuple) {
|
||||||
|
settings.ColorMGTime = GColorFromHEX(color_mg_time_tuple->value->int32);
|
||||||
|
}
|
||||||
|
if (color_fg_tuple) {
|
||||||
|
settings.ColorFG = GColorFromHEX(color_fg_tuple->value->int32);
|
||||||
|
}
|
||||||
|
persist_write_data(STORAGE_KEY_SETTINGS, &settings, sizeof(settings));
|
||||||
|
soft_reload(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init() {
|
static void init() {
|
||||||
|
// load settings from persist (or set defaults if not present)
|
||||||
|
if (persist_exists(STORAGE_KEY_SETTINGS)) {
|
||||||
|
persist_read_data(STORAGE_KEY_SETTINGS, &settings, sizeof(settings));
|
||||||
|
} else {
|
||||||
|
settings.ShowTimeMG = false;
|
||||||
|
settings.ColorLED = GColorWhite;
|
||||||
|
settings.ColorBG = GColorBlue;
|
||||||
|
settings.ColorMGBars = GColorDarkGray;
|
||||||
|
settings.ColorMGTime = GColorDarkGray;
|
||||||
|
settings.ColorFG = GColorWhite;
|
||||||
|
}
|
||||||
|
|
||||||
// load bitmaps
|
// load bitmaps
|
||||||
s_font_bitmaps[0] = gbitmap_create_with_resource(RESOURCE_ID_0);
|
s_font_bitmaps[0] = gbitmap_create_with_resource(RESOURCE_ID_0);
|
||||||
s_font_bitmaps[1] = gbitmap_create_with_resource(RESOURCE_ID_1);
|
s_font_bitmaps[1] = gbitmap_create_with_resource(RESOURCE_ID_1);
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <pebble.h>
|
||||||
|
|
||||||
|
#define STORAGE_KEY_SETTINGS 69
|
||||||
|
|
||||||
|
typedef struct ClaySettings {
|
||||||
|
bool ShowTimeMG;
|
||||||
|
GColor ColorLED;
|
||||||
|
GColor ColorBG;
|
||||||
|
GColor ColorMGBars;
|
||||||
|
GColor ColorMGTime;
|
||||||
|
GColor ColorFG;
|
||||||
|
} __attribute__((__packed__)) ClaySettings;
|
||||||
|
|
||||||
|
_Static_assert(sizeof(ClaySettings) <= 256, "ClaySettings exceeds Pebble 256-byte persist limit!");
|
||||||
+17
-7
@@ -12,6 +12,7 @@ module.exports = [
|
|||||||
"defaultValue": "Options"
|
"defaultValue": "Options"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "time_mg_toggle",
|
||||||
"type": "toggle",
|
"type": "toggle",
|
||||||
"messageKey": "CLAY_SHOW_TIME_MG",
|
"messageKey": "CLAY_SHOW_TIME_MG",
|
||||||
"defaultValue": false,
|
"defaultValue": false,
|
||||||
@@ -30,13 +31,15 @@ module.exports = [
|
|||||||
{
|
{
|
||||||
"id": "custom_colors_toggle",
|
"id": "custom_colors_toggle",
|
||||||
"type": "toggle",
|
"type": "toggle",
|
||||||
|
"messageKey": "PRIV_CUSTOM_COLORS_TOGGLE",
|
||||||
"defaultValue": false,
|
"defaultValue": false,
|
||||||
"label": "Use custom colors"
|
"label": "Use custom colors"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "color_preset_selector",
|
"id": "color_preset_selector",
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"defaultValue": "Standard",
|
"messageKey": "PRIV_COLOR_PRESET_TOGGLE",
|
||||||
|
"defaultValue": "civic_standard",
|
||||||
"label": "Color Preset",
|
"label": "Color Preset",
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
@@ -52,10 +55,9 @@ module.exports = [
|
|||||||
{
|
{
|
||||||
"id": "custom_color_led",
|
"id": "custom_color_led",
|
||||||
"type": "color",
|
"type": "color",
|
||||||
"capabilities": ["PLATFORM_EMERY"],
|
|
||||||
"messageKey": "CLAY_LED_COLOR",
|
"messageKey": "CLAY_LED_COLOR",
|
||||||
"defaultValue": "0000ff",
|
"defaultValue": "ffffff",
|
||||||
"label": "LED color",
|
"label": "Backlight color (Time 2)",
|
||||||
"sunlight": false,
|
"sunlight": false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -67,11 +69,19 @@ module.exports = [
|
|||||||
"sunlight": false,
|
"sunlight": false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "custom_color_mg",
|
"id": "custom_color_mg_bars",
|
||||||
"type": "color",
|
"type": "color",
|
||||||
"messageKey": "CLAY_MG_COLOR",
|
"messageKey": "CLAY_BAR_MG_COLOR",
|
||||||
"defaultValue": "aaaaaa",
|
"defaultValue": "aaaaaa",
|
||||||
"label": "Midground color",
|
"label": "Bar midground color",
|
||||||
|
"sunlight": false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "custom_color_mg_time",
|
||||||
|
"type": "color",
|
||||||
|
"messageKey": "CLAY_TIME_MG_COLOR",
|
||||||
|
"defaultValue": "555555",
|
||||||
|
"label": "Time segment midground color",
|
||||||
"sunlight": false,
|
"sunlight": false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+17
-10
@@ -4,34 +4,41 @@ module.exports = function (minified) {
|
|||||||
var $ = minified.$;
|
var $ = minified.$;
|
||||||
var HTML = minified.HTML;
|
var HTML = minified.HTML;
|
||||||
|
|
||||||
// TODO set LED color (only on emery)
|
|
||||||
function setColorsToPreset() {
|
function setColorsToPreset() {
|
||||||
selectedPreset = clayConfig.getItemById('color_preset_selector').get()
|
var selectedPreset = clayConfig.getItemById('color_preset_selector').get();
|
||||||
switch (selectedPreset) {
|
switch (selectedPreset) {
|
||||||
case 'civic_si':
|
case 'civic_si':
|
||||||
clayConfig.getItemById('custom_color_bg').set('ff0000');
|
clayConfig.getItemById('custom_color_led').set('ff0000');
|
||||||
clayConfig.getItemById('custom_color_mg').set('aaaaaa');
|
clayConfig.getItemById('custom_color_bg').set('000000');
|
||||||
clayConfig.getItemById('custom_color_fg').set('ffffff');
|
clayConfig.getItemById('custom_color_mg_bars').set('555555');
|
||||||
|
clayConfig.getItemById('custom_color_mg_time').set('555555');
|
||||||
|
clayConfig.getItemById('custom_color_fg').set('ff0000');
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
clayConfig.getItemById('custom_color_led').set('ffffff');
|
||||||
clayConfig.getItemById('custom_color_bg').set('0000ff');
|
clayConfig.getItemById('custom_color_bg').set('0000ff');
|
||||||
clayConfig.getItemById('custom_color_mg').set('aaaaaa');
|
clayConfig.getItemById('custom_color_mg_bars').set('555555');
|
||||||
|
clayConfig.getItemById('custom_color_mg_time').set('555555');
|
||||||
clayConfig.getItemById('custom_color_fg').set('ffffff');
|
clayConfig.getItemById('custom_color_fg').set('ffffff');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO show/hide LED color selector (only on emery)
|
// TODO show/hide LED color selector (only on emery)
|
||||||
function toggleCustomColors() {
|
function toggleCustomColors() {
|
||||||
setColorsToPreset();
|
|
||||||
if (this.get()) {
|
if (this.get()) {
|
||||||
clayConfig.getItemById('color_preset_selector').hide();
|
clayConfig.getItemById('color_preset_selector').hide();
|
||||||
|
clayConfig.getItemById('custom_color_led').show();
|
||||||
clayConfig.getItemById('custom_color_bg').show();
|
clayConfig.getItemById('custom_color_bg').show();
|
||||||
clayConfig.getItemById('custom_color_mg').show();
|
clayConfig.getItemById('custom_color_mg_bars').show();
|
||||||
|
clayConfig.getItemById('custom_color_mg_time').show();
|
||||||
clayConfig.getItemById('custom_color_fg').show();
|
clayConfig.getItemById('custom_color_fg').show();
|
||||||
} else {
|
} else {
|
||||||
|
setColorsToPreset();
|
||||||
clayConfig.getItemById('color_preset_selector').show();
|
clayConfig.getItemById('color_preset_selector').show();
|
||||||
|
clayConfig.getItemById('custom_color_led').hide();
|
||||||
clayConfig.getItemById('custom_color_bg').hide();
|
clayConfig.getItemById('custom_color_bg').hide();
|
||||||
clayConfig.getItemById('custom_color_mg').hide();
|
clayConfig.getItemById('custom_color_mg_bars').hide();
|
||||||
|
clayConfig.getItemById('custom_color_mg_time').hide();
|
||||||
clayConfig.getItemById('custom_color_fg').hide();
|
clayConfig.getItemById('custom_color_fg').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,6 +48,6 @@ module.exports = function (minified) {
|
|||||||
toggleCustomColors.call(customColorsToggle);
|
toggleCustomColors.call(customColorsToggle);
|
||||||
customColorsToggle.on('change', toggleCustomColors);
|
customColorsToggle.on('change', toggleCustomColors);
|
||||||
|
|
||||||
clayConfig.getItemById('color_preset_selector').on('change', setColorsToPreset());
|
clayConfig.getItemById('color_preset_selector').on('change', setColorsToPreset);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user