Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/ui/menu.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "menu.h"
#define MENU_TEXT_TOP 1
#define MENU_TEXT_BOTTOM 2

static int get_entry_height(mudclient *mud);

Expand Down Expand Up @@ -633,6 +635,8 @@ void mudclient_create_top_mouse_menu(mudclient *mud) {

int is_touch = mudclient_is_touch(mud);

int menu_text_position = MENU_TEXT_TOP;

if (strlen(menu_text) > 0) {
int y_position = 14;
int y_offset = 35;
Expand All @@ -643,9 +647,13 @@ void mudclient_create_top_mouse_menu(mudclient *mud) {
y_offset = 18;
}

y_position = mud->surface->height - y_offset;
if (menu_text_position == MENU_TEXT_TOP) {
y_position = 11;
} else {
y_position = mud->surface->height - y_offset;
}

if (mud->is_in_wilderness) {
if (menu_text_position == MENU_TEXT_BOTTOM && mud->is_in_wilderness) {
x_position = 76;
}
}
Expand Down