diff options
author | pommicket <pommicket@gmail.com> | 2022-11-02 13:29:09 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-11-02 13:29:09 -0400 |
commit | b070e5ce01c829bd101b1e0eda49f1e25d9d125c (patch) | |
tree | f674fcbaad6b565e89d1ba973198024d958cac22 /menu.c | |
parent | 26d34216da04a2b91e65a0eeee9200ad808d48ce (diff) |
new settings system bugfixes, use ted_active_settings more
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -107,13 +107,13 @@ static void menu_escape(Ted *ted) { } static float menu_get_width(Ted *ted) { - Settings const *settings = ted->settings; + Settings const *settings = ted_active_settings(ted); return minf(settings->max_menu_width, ted->window_width - 2.0f * settings->padding); } // returns the rectangle of the screen coordinates of the menu static Rect menu_rect(Ted *ted) { - Settings *settings = ted->settings; + Settings *settings = ted_active_settings(ted); float window_width = ted->window_width, window_height = ted->window_height; float padding = settings->padding; float menu_width = menu_get_width(ted); @@ -125,7 +125,7 @@ static Rect menu_rect(Ted *ted) { static void menu_update(Ted *ted) { Menu menu = ted->menu; - Settings const *settings = ted->settings; + Settings const *settings = ted_active_settings(ted); u32 const *colors = settings->colors; TextBuffer *line_buffer = &ted->line_buffer; @@ -322,7 +322,7 @@ static void menu_update(Ted *ted) { static void menu_render(Ted *ted) { Menu menu = ted->menu; assert(menu); - Settings const *settings = ted->settings; + Settings const *settings = ted_active_settings(ted); u32 const *colors = settings->colors; float const window_width = ted->window_width, window_height = ted->window_height; Font *font_bold = ted->font_bold, *font = ted->font; |