about summary refs log tree commit diff stats
path: root/arc/.traces/get-address
blob: 35e066f07c5b8a2b4bebccd6a48c9398113fb58b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
generated by cgit-pink 1.4.1-2-gfad0 (git 2.36.2.497.gbbea4dcf42) at 2024-07-04 16:34:47 +0000
 


ss="o">* key, const char* name) {
  attroff(A_REVERSE);
  draw_string_on_menu(key);
  attron(A_REVERSE);
  draw_string_on_menu(name);
}

void draw_menu (lua_State *L) {
  attron(A_BOLD|A_REVERSE);
  for (int x = 0; x < COLS; ++x)
    mvaddch(LINES-1, x, ' ');
  menu_column = 2;
  draw_menu_item("^x", "exit");
  draw_menu_item("^e", "edit");

  /* render any app-specific items */
  lua_getglobal(L, "menu");
  int table = lua_gettop(L);
  if (lua_istable(L, -1))
    for (lua_pushnil(L); lua_next(L, table) != 0; lua_pop(L, 1))
      draw_menu_item(lua_tostring(L, -2), lua_tostring(L, -1));

  lua_pop(L, 1);
  attroff(A_BOLD|A_REVERSE);
}