summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/config.c b/config.c
index ff5f25c..665f124 100644
--- a/config.c
+++ b/config.c
@@ -1245,7 +1245,7 @@ static char *last_separator(char *path) {
return NULL;
}
-char *settings_get_root_dir(Settings *settings, const char *path) {
+char *settings_get_root_dir(const Settings *settings, const char *path) {
char best_path[TED_PATH_MAX];
*best_path = '\0';
u32 best_path_score = 0;
@@ -1300,3 +1300,16 @@ char *settings_get_root_dir(Settings *settings, const char *path) {
return str_dup(pathbuf);
}
}
+
+u32 settings_color(const Settings *settings, ColorSetting color) {
+ if (color >= COLOR_COUNT) {
+ assert(0);
+ return 0xff00ffff;
+ }
+ return settings->colors[color];
+}
+
+void settings_color_floats(const Settings *settings, ColorSetting color, float f[4]) {
+ rgba_u32_to_floats(settings_color(settings, color), f);
+
+}