Loading menu.c +0 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ int menu_prompt(const menu_item *items, unsigned int num_menu_items, const char int selected_action = UNSELECTED; int hovered_item_changed = 1; unsigned int hovered_selection_index = 0; // menu logic! TODO make this cross platform (play nice with Windows...) do { // return cursor to menu top position if (hovered_item_changed) { Loading Loading @@ -79,7 +78,6 @@ void menu_prompt_multi_select(menu_item *items, unsigned int num_menu_items, con unsigned int user_done_selecting = 0; int hovered_item_changed = 1; unsigned int hovered_selection_index = 0; // menu logic! TODO make this cross platform (play nice with Windows...) do { // return cursor to menu top position if (hovered_item_changed) { Loading Loading @@ -139,7 +137,6 @@ void menu_prompt_multi_select(menu_item *items, unsigned int num_menu_items, con } MENU_DIRECTION get_direction(void) { // todo test (+ fix) all of this character grabbing stuff in windows - use conio.h as included above char key_pressed = (char) getchar(); // with terminal set to raw mode, this will no longer wait for Enter key; note that Enter key is handled with \n case // handle arrow key press: we have to do it this way because the arrow keys send more than one character Loading yaht.c +0 −2 Original line number Diff line number Diff line Loading @@ -88,8 +88,6 @@ unsigned int take_turn(game_context *ctx, unsigned int num_dice) { roll_and_print(ctx, next_roll_dice_values, 3); // ask if holding dice, scoring, or rolling again // (put this in a while loop so user keeps getting prompted with choice until choosing to roll again) // (also don't allow user to roll again if on the third roll) unsigned int ready_for_next_roll = 0; while (!ready_for_next_roll) { enum in_turn_menu_commands { Loading Loading
menu.c +0 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ int menu_prompt(const menu_item *items, unsigned int num_menu_items, const char int selected_action = UNSELECTED; int hovered_item_changed = 1; unsigned int hovered_selection_index = 0; // menu logic! TODO make this cross platform (play nice with Windows...) do { // return cursor to menu top position if (hovered_item_changed) { Loading Loading @@ -79,7 +78,6 @@ void menu_prompt_multi_select(menu_item *items, unsigned int num_menu_items, con unsigned int user_done_selecting = 0; int hovered_item_changed = 1; unsigned int hovered_selection_index = 0; // menu logic! TODO make this cross platform (play nice with Windows...) do { // return cursor to menu top position if (hovered_item_changed) { Loading Loading @@ -139,7 +137,6 @@ void menu_prompt_multi_select(menu_item *items, unsigned int num_menu_items, con } MENU_DIRECTION get_direction(void) { // todo test (+ fix) all of this character grabbing stuff in windows - use conio.h as included above char key_pressed = (char) getchar(); // with terminal set to raw mode, this will no longer wait for Enter key; note that Enter key is handled with \n case // handle arrow key press: we have to do it this way because the arrow keys send more than one character Loading
yaht.c +0 −2 Original line number Diff line number Diff line Loading @@ -88,8 +88,6 @@ unsigned int take_turn(game_context *ctx, unsigned int num_dice) { roll_and_print(ctx, next_roll_dice_values, 3); // ask if holding dice, scoring, or rolling again // (put this in a while loop so user keeps getting prompted with choice until choosing to roll again) // (also don't allow user to roll again if on the third roll) unsigned int ready_for_next_roll = 0; while (!ready_for_next_roll) { enum in_turn_menu_commands { Loading