summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-14 12:59:35 -0300
committerpommicket <pommicket@gmail.com>2023-08-14 12:59:35 -0300
commitefe5ae8cec7221779b9a6395eeb9b10b8974dd44 (patch)
tree4fd8162d810cf0a6e11a8d2505b6eabcb6a8e1c6 /config.c
parentccf3778572d461ef6319bd8c6b34fb68baea23ad (diff)
start new selector system - search not working yet
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);
+
+}