aboutsummaryrefslogtreecommitdiff
path: root/frontend/common
diff options
context:
space:
mode:
authornotaz2010-12-25 02:52:55 +0200
committernotaz2010-12-25 02:52:55 +0200
commitbd6267e616cc4966fadf971019fe15db2469e97d (patch)
treebadf7c77696d520d09b0dcfec170ecb43fe3a8c1 /frontend/common
parentd4a1e87d6a8f5d5de071344fd0718ca32a520850 (diff)
downloadpcsx_rearmed-bd6267e616cc4966fadf971019fe15db2469e97d.tar.gz
pcsx_rearmed-bd6267e616cc4966fadf971019fe15db2469e97d.tar.bz2
pcsx_rearmed-bd6267e616cc4966fadf971019fe15db2469e97d.zip
menu: add most options
Diffstat (limited to 'frontend/common')
-rw-r--r--frontend/common/menu.c7
-rw-r--r--frontend/common/menu.h8
2 files changed, 12 insertions, 3 deletions
diff --git a/frontend/common/menu.c b/frontend/common/menu.c
index a571ddd..d9717d4 100644
--- a/frontend/common/menu.c
+++ b/frontend/common/menu.c
@@ -461,8 +461,11 @@ static void me_draw(const menu_entry *entries, int sel, void (*draw_more)(void))
h = g_menuscreen_h;
}
- x = g_menuscreen_w / 2 - w / 2;
+ x = g_menuscreen_w / 2 - w / 2;
y = g_menuscreen_h / 2 - h / 2;
+#ifdef MENU_ALIGN_LEFT
+ if (x > 12) x = 12;
+#endif
/* draw */
menu_draw_begin(1);
@@ -511,7 +514,7 @@ static void me_draw(const menu_entry *entries, int sel, void (*draw_more)(void))
len = strlen(names[i]);
if (len > 10)
offs = 10 - len - 2;
- if (i == *(int *)ent->var) {
+ if (i == *(unsigned char *)ent->var) {
text_out16(x + col2_offs + offs * me_mfont_w, y, "%s", names[i]);
break;
}
diff --git a/frontend/common/menu.h b/frontend/common/menu.h
index 21c589e..8260e51 100644
--- a/frontend/common/menu.h
+++ b/frontend/common/menu.h
@@ -29,12 +29,18 @@ typedef struct
const char *help;
} menu_entry;
+#define mee_handler_id_h(name, id, handler, help) \
+ { name, MB_NONE, id, NULL, 0, 0, 0, 1, 0, 1, handler, NULL, NULL, help }
+
#define mee_handler_id(name, id, handler) \
- { name, MB_NONE, id, NULL, 0, 0, 0, 1, 0, 1, handler, NULL, NULL, NULL }
+ mee_handler_id_h(name, id, handler, NULL)
#define mee_handler(name, handler) \
mee_handler_id(name, MA_NONE, handler)
+#define mee_handler_h(name, handler, help) \
+ mee_handler_id_h(name, MA_NONE, handler, help)
+
#define mee_label(name) \
{ name, MB_NONE, MA_NONE, NULL, 0, 0, 0, 1, 0, 0, NULL, NULL, NULL, NULL }