|
|
1.1 ! root 1: /* ! 2: Previous - dlgSound.c ! 3: ! 4: This file is distributed under the GNU Public License, version 2 or at ! 5: your option any later version. Read the file gpl.txt for details. ! 6: */ ! 7: const char DlgSound_fileid[] = "Previous dlgSound.c : " __DATE__ " " __TIME__; ! 8: ! 9: #include "main.h" ! 10: #include "configuration.h" ! 11: #include "dialog.h" ! 12: #include "sdlgui.h" ! 13: #include "file.h" ! 14: ! 15: ! 16: #define DLGSOUND_ENABLE 3 ! 17: ! 18: #define DLGSOUND_EXIT 4 ! 19: ! 20: ! 21: ! 22: /* The Sound options dialog: */ ! 23: static SGOBJ sounddlg[] = ! 24: { ! 25: { SGBOX, 0, 0, 0,0, 40,13, NULL }, ! 26: { SGTEXT, 0, 0, 13,1, 16,1, "Sound options" }, ! 27: ! 28: { SGBOX, 0, 0, 1,3, 38,5, NULL }, ! 29: { SGCHECKBOX, 0, 0, 4,5, 15,1, "Sound enabled" }, ! 30: ! 31: { SGBUTTON, SG_DEFAULT, 0, 10,10, 21,1, "Back to main menu" }, ! 32: { -1, 0, 0, 0,0, 0,0, NULL } ! 33: }; ! 34: ! 35: ! 36: ! 37: /*-----------------------------------------------------------------------*/ ! 38: /** ! 39: * Show and process the Boot options dialog. ! 40: */ ! 41: void DlgSound_Main(void) ! 42: { ! 43: int but; ! 44: ! 45: SDLGui_CenterDlg(sounddlg); ! 46: ! 47: /* Set up the dialog from actual values */ ! 48: if (ConfigureParams.Sound.bEnableSound) ! 49: sounddlg[DLGSOUND_ENABLE].state |= SG_SELECTED; ! 50: else ! 51: sounddlg[DLGSOUND_ENABLE].state &= ~SG_SELECTED; ! 52: ! 53: /* Draw and process the dialog */ ! 54: ! 55: do ! 56: { ! 57: but = SDLGui_DoDialog(sounddlg, NULL); ! 58: } ! 59: while (but != DLGSOUND_EXIT && but != SDLGUI_QUIT ! 60: && but != SDLGUI_ERROR && !bQuitProgram); ! 61: ! 62: ! 63: /* Read values from dialog */ ! 64: ConfigureParams.Sound.bEnableSound = sounddlg[DLGSOUND_ENABLE].state & SG_SELECTED; ! 65: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.