Pass canvas to menubar_init
This commit is contained in:
parent
6bd653bb16
commit
4cfd5f3324
|
@ -398,7 +398,7 @@ std::unique_ptr<UI_GADGET_ICON> ui_add_gadget_icon(UI_DIALOG * dlg, const char *
|
|||
int DecodeKeyText( const char * text );
|
||||
void GetKeyDescription(char (&text)[100], uint_fast32_t keypress);
|
||||
|
||||
extern int menubar_init(const char * filename );
|
||||
int menubar_init(grs_canvas &canvas, const char * filename );
|
||||
extern void menubar_close();
|
||||
extern void menubar_hide();
|
||||
extern void menubar_show();
|
||||
|
|
|
@ -737,7 +737,7 @@ static void ul_xlate(char *s)
|
|||
}
|
||||
|
||||
|
||||
int menubar_init( const char * file )
|
||||
int menubar_init(grs_canvas &canvas, const char *const file)
|
||||
{
|
||||
int np;
|
||||
char buf1[200];
|
||||
|
@ -759,7 +759,6 @@ int menubar_init( const char * file )
|
|||
return 0;
|
||||
}
|
||||
|
||||
auto &canvas = *grd_curcanv;
|
||||
PHYSFSX_gets_line_t<200> buffer;
|
||||
while ( PHYSFSX_fgets( buffer, infile) != NULL )
|
||||
{
|
||||
|
|
|
@ -404,7 +404,7 @@ void init_editor()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!menubar_init( "MED.MNU" ))
|
||||
if (!menubar_init(*grd_curcanv, "MED.MNU"))
|
||||
{
|
||||
close_editor();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue