We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fdaf4e commit bcab0a6Copy full SHA for bcab0a6
examples/mouse_menu.d
@@ -1,4 +1,3 @@
1
-
2
import std.string: toStringz;
3
import deimos.ncurses.ncurses;
4
@@ -83,7 +82,7 @@ void print_menu(WINDOW* menu_win, int highlight)
83
82
84
box(menu_win, 0, 0);
85
86
- foreach(i, choice; choices)
+ foreach(int i, choice; choices)
87
{
88
if(highlight == i + 1)
89
wattron(menu_win, A_REVERSE);
@@ -100,7 +99,7 @@ int report_choice(int mouse_x, int mouse_y)
100
99
int i = startx + 2;
101
int j = starty + 3;
102
int report = 0;
103
- foreach(choice, str; choices)
+ foreach(int choice, str; choices)
104
105
if((mouse_y == j + choice) && (mouse_x >= i) && (mouse_x <= i+str.length))
106
0 commit comments