/** * @brief Loads a GUI. * * @param wdw Window triggering function. * @param str Unused. */ static void setgui_load( unsigned int wdw, char *str ) { (void)str; char *gui; int wid; wid = window_get( _("Select GUI") ); gui = toolkit_getList( wid, "lstGUI" ); if (strcmp(gui,_("None")) == 0) return; if (player.guiOverride == 0) { if (dialogue_YesNo( _("GUI Override is not set."), _("Enable GUI Override and change GUI to '%s'?"), gui )) { player.guiOverride = 1; window_checkboxSet( wid, "chkOverride", player.guiOverride ); } else { return; } } /* Set the GUI. */ if (player.gui != NULL) free( player.gui ); player.gui = strdup( gui ); /* Close menus before loading for proper rendering. */ setgui_close(wdw, NULL); /* Load the GUI. */ gui_load( gui_pick() ); }
/** * @brief Loads a GUI. * * @param wdw Window triggering function. * @param str Unused. */ static void setgui_load( unsigned int wdw, char *str ) { (void)str; char *gui; int wid; wid = window_get( "Select GUI" ); gui = toolkit_getList( wid, "lstGUI" ); if (strcmp(gui,"None") == 0) return; /* Set the GUI. */ if (player.gui != NULL) free( player.gui ); player.gui = strdup( gui ); /* Close menus before loading for proper rendering. */ setgui_close(wdw, NULL); /* Load the GUI. */ gui_load( gui_pick() ); }