summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/menu.c b/menu.c
index 5a0e964..a41da08 100644
--- a/menu.c
+++ b/menu.c
@@ -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;