Making menus recreated on the fly in case resolution or font-size changes; Removing arguments to pass width and height to menu which was not used except on one IPX menu; Fixing measurement of menu strings of type NM_TYPE_INPUT_MENU; Fixing slight bug in freeing IPX netlist
This commit is contained in:
parent
c935ecfa99
commit
171386bc24
|
@ -1,5 +1,9 @@
|
||||||
D2X-Rebirth Changelog
|
D2X-Rebirth Changelog
|
||||||
|
|
||||||
|
20100623
|
||||||
|
--------
|
||||||
|
main/menu.c, main/newmenu.c, main/newmenu.h, main/net_ipx.c: Making menus recreated on the fly in case resolution or font-size changes; Removing arguments to pass width and height to menu which was not used except on one IPX menu; Fixing measurement of menu strings of type NM_TYPE_INPUT_MENU; Fixing slight bug in freeing IPX netlist
|
||||||
|
|
||||||
20100622
|
20100622
|
||||||
--------
|
--------
|
||||||
main/titles.c: Make sure GAME_FONT is set when reading out briefing text so char dimensions will always be stored correctly
|
main/titles.c: Make sure GAME_FONT is set when reading out briefing text so char dimensions will always be stored correctly
|
||||||
|
|
|
@ -543,7 +543,7 @@ int DoMenu()
|
||||||
|
|
||||||
create_main_menu(m, menu_choice, &num_options); // may have to change, eg, maybe selected pilot and no save games.
|
create_main_menu(m, menu_choice, &num_options); // may have to change, eg, maybe selected pilot and no save games.
|
||||||
|
|
||||||
newmenu_do3( "", NULL, num_options, m, (int (*)(newmenu *, d_event *, void *))main_menu_handler, menu_choice, 0, Menu_pcx_name, -1, -1);
|
newmenu_do3( "", NULL, num_options, m, (int (*)(newmenu *, d_event *, void *))main_menu_handler, menu_choice, 0, Menu_pcx_name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1061,8 +1061,6 @@ void change_res()
|
||||||
gr_set_mode(Game_screen_mode);
|
gr_set_mode(Game_screen_mode);
|
||||||
init_cockpit();
|
init_cockpit();
|
||||||
game_init_render_buffers(SM_W(screen_mode), SM_H(screen_mode), VR_NONE);
|
game_init_render_buffers(SM_W(screen_mode), SM_H(screen_mode), VR_NONE);
|
||||||
window_close(window_get_front()); // close options dialog - it will be messy with a different resolution
|
|
||||||
do_options_menu(); // reopen it
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int input_menuset(newmenu *menu, d_event *event, void *userdata)
|
int input_menuset(newmenu *menu, d_event *event, void *userdata)
|
||||||
|
@ -1503,7 +1501,7 @@ void do_multi_player_menu()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
newmenu_do3( NULL, TXT_MULTIPLAYER, num_options, m, (int (*)(newmenu *, d_event *, void *))multi_player_menu_handler, menu_choice, 0, NULL, -1, -1 );
|
newmenu_do3( NULL, TXT_MULTIPLAYER, num_options, m, (int (*)(newmenu *, d_event *, void *))multi_player_menu_handler, menu_choice, 0, NULL );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1540,5 +1538,5 @@ void do_options_menu()
|
||||||
|
|
||||||
// Fall back to main event loop
|
// Fall back to main event loop
|
||||||
// Allows clean closing and re-opening when resolution changes
|
// Allows clean closing and re-opening when resolution changes
|
||||||
newmenu_do3( NULL, TXT_OPTIONS, 11, m, options_menuset, NULL, 0, NULL, -1, -1 );
|
newmenu_do3( NULL, TXT_OPTIONS, 11, m, options_menuset, NULL, 0, NULL );
|
||||||
}
|
}
|
||||||
|
|
700
main/net_ipx.c
700
main/net_ipx.c
File diff suppressed because it is too large
Load diff
1000
main/newmenu.c
1000
main/newmenu.c
File diff suppressed because it is too large
Load diff
|
@ -68,8 +68,8 @@ extern int newmenu_do1(char *title, char *subtitle, int nitems, newmenu_item *it
|
||||||
// Same as above, only you can pass through what background bitmap to use.
|
// Same as above, only you can pass through what background bitmap to use.
|
||||||
extern int newmenu_do2(char *title, char *subtitle, int nitems, newmenu_item *item, int (*subfunction)(newmenu *menu, d_event *event, void *userdata), void *userdata, int citem, char *filename);
|
extern int newmenu_do2(char *title, char *subtitle, int nitems, newmenu_item *item, int (*subfunction)(newmenu *menu, d_event *event, void *userdata), void *userdata, int citem, char *filename);
|
||||||
|
|
||||||
// Same as above, only you can pass through the width and height
|
// Same as above, but returns menu instead of citem
|
||||||
extern newmenu *newmenu_do3(char *title, char *subtitle, int nitems, newmenu_item *item, int (*subfunction)(newmenu *menu, d_event *event, void *userdata), void *userdata, int citem, char *filename, int width, int height);
|
extern newmenu *newmenu_do3(char *title, char *subtitle, int nitems, newmenu_item *item, int (*subfunction)(newmenu *menu, d_event *event, void *userdata), void *userdata, int citem, char *filename);
|
||||||
|
|
||||||
// Tiny menu with GAME_FONT
|
// Tiny menu with GAME_FONT
|
||||||
extern newmenu *newmenu_dotiny(char * title, char * subtitle, int nitems, newmenu_item * item, int (*subfunction)(newmenu *menu, d_event *event, void *userdata), void *userdata);
|
extern newmenu *newmenu_dotiny(char * title, char * subtitle, int nitems, newmenu_item * item, int (*subfunction)(newmenu *menu, d_event *event, void *userdata), void *userdata);
|
||||||
|
|
Loading…
Reference in a new issue