[Scummvm-cvs-logs] CVS: scummvm/mac mac.cpp,1.6,1.7
Mutwin Kraus
mutle at users.sourceforge.net
Sun Mar 17 07:11:54 CET 2002
Update of /cvsroot/scummvm/scummvm/mac
In directory usw-pr-cvs1:/tmp/cvs-serv11324/scummvm/mac
Modified Files:
mac.cpp
Log Message:
Preferences Panel Updated with more Features and a nicer look
Index: mac.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/mac/mac.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** mac.cpp 17 Mar 2002 13:46:18 -0000 1.6
--- mac.cpp 17 Mar 2002 15:10:18 -0000 1.7
***************
*** 774,778 ****
}
! ControlRef radioGroupRef;
OSStatus prefsEventHandler(EventHandlerCallRef eventHandlerCallRef,EventRef eventRef,
--- 774,778 ----
}
! ControlRef radioGroupRef, musicVolumeSlider, masterVolumeSlider;
OSStatus prefsEventHandler(EventHandlerCallRef eventHandlerCallRef,EventRef eventRef,
***************
*** 802,805 ****
--- 802,811 ----
if(scale != wm->_scumm->_scale)
wm->ChangeScaling(scale);
+ short music_vol = GetControlValue(musicVolumeSlider);
+ if(music_vol != sound.get_music_volume())
+ sound.set_music_volume(music_vol);
+ short master_vol = GetControlValue(masterVolumeSlider);
+ if(master_vol != sound.get_master_volume())
+ sound.set_master_volume(master_vol);
QuitAppModalLoopForWindow((WindowRef)userData);
DisposeWindow((WindowRef)userData);
***************
*** 813,820 ****
{
WindowRef prefsWin;
! OSStatus osError = noErr;
! Rect rect = { 0,0,150,300 };
! Rect pushButtonRect = { 125,125,145,175 };
! Rect checkboxRect = { 30, 10, 45, 90 };
ControlID controlID;
ControlRef controlRef;
--- 819,825 ----
{
WindowRef prefsWin;
! OSStatus osError = noErr;
! Rect rect = { 0,0,210,300 };
! Rect okButtonRect;
ControlID controlID;
ControlRef controlRef;
***************
*** 827,831 ****
CreateRootControl(prefsWin,&controlRef);
! CreatePushButtonControl(prefsWin,&pushButtonRect,CFSTR("OK"),&controlRef);
SetWindowDefaultButton(prefsWin,controlRef);
controlID.id = 'okay';
--- 832,843 ----
CreateRootControl(prefsWin,&controlRef);
! SetRect(&rect, 5, 5, 150, 21);
!
! CreateStaticTextControl(prefsWin, &rect, CFSTR("ScummVM Preferences"), NULL, &controlRef);
! AutoEmbedControl(controlRef, prefsWin);
!
! SetRect(&okButtonRect, 225, 180, 295, 200);
!
! CreatePushButtonControl(prefsWin,&okButtonRect,CFSTR("OK"),&controlRef);
SetWindowDefaultButton(prefsWin,controlRef);
controlID.id = 'okay';
***************
*** 833,845 ****
AutoEmbedControl(controlRef,prefsWin);
! CreateCheckBoxControl(prefsWin,&checkboxRect, CFSTR("Subtitles"), 1,
! true, &checkBoxControlRef);
! AutoEmbedControl(checkBoxControlRef,prefsWin);
if(wm->_scumm->_noSubtitles)
SetControlValue(checkBoxControlRef, false);
Rect RadioGroupRect;
! SetRect(&RadioGroupRect, 120, 10, 290, 120);
CreateRadioGroupControl(prefsWin, &RadioGroupRect, &radioGroupRef);
AutoEmbedControl(radioGroupRef, prefsWin);
--- 845,864 ----
AutoEmbedControl(controlRef,prefsWin);
! SetRect(&rect, 150, 35, 260, 51);
!
! CreateCheckBoxControl(prefsWin,&rect, CFSTR("Subtitles"), 1, true, &checkBoxControlRef);
! AutoEmbedControl(checkBoxControlRef, prefsWin);
if(wm->_scumm->_noSubtitles)
SetControlValue(checkBoxControlRef, false);
+ OffsetRect(&rect, 0, 20);
+
+ CreateCheckBoxControl(prefsWin,&rect, CFSTR("Fullscreen"), 0, true, &controlRef);
+ AutoEmbedControl(controlRef, prefsWin);
+ DeactivateControl(controlRef);
+
Rect RadioGroupRect;
! SetRect(&RadioGroupRect, 5, 35, 120, 100);
CreateRadioGroupControl(prefsWin, &RadioGroupRect, &radioGroupRef);
AutoEmbedControl(radioGroupRef, prefsWin);
***************
*** 848,852 ****
Rect RadioButtonRect;
! SetRect(&RadioButtonRect, 125, 30, 285, 45);
CreateRadioButtonControl(prefsWin, &RadioButtonRect, CFSTR("Scaling 1x"), 0, true, &radioButton);
AutoEmbedControl(radioButton, prefsWin);
--- 867,871 ----
Rect RadioButtonRect;
! SetRect(&RadioButtonRect, 5, 35, 120, 51);
CreateRadioButtonControl(prefsWin, &RadioButtonRect, CFSTR("Scaling 1x"), 0, true, &radioButton);
AutoEmbedControl(radioButton, prefsWin);
***************
*** 861,864 ****
--- 880,906 ----
SetControlValue(radioGroupRef, wm->_scumm->_scale);
+
+ SetRect(&rect, 5, 110, 175, 146);
+
+ CreateSliderControl(prefsWin, &rect, sound.get_music_volume(), 1, 100,
+ kControlSliderPointsDownOrRight, 10, false, NULL, &musicVolumeSlider);
+ AutoEmbedControl(musicVolumeSlider, prefsWin);
+
+ OffsetRect(&rect, 0, 36);
+
+ CreateSliderControl(prefsWin, &rect, sound.get_master_volume(), 1, 100,
+ kControlSliderPointsDownOrRight, 10, false, NULL, &masterVolumeSlider);
+ AutoEmbedControl(masterVolumeSlider, prefsWin);
+
+ OffsetRect(&rect, 180, -36);
+
+ CreateStaticTextControl(prefsWin, &rect, CFSTR("Music Volume"), NULL, &controlRef);
+ AutoEmbedControl(controlRef, prefsWin);
+
+ OffsetRect(&rect, 0, 36);
+
+ CreateStaticTextControl(prefsWin, &rect, CFSTR("Master Volume"), NULL, &controlRef);
+ AutoEmbedControl(controlRef, prefsWin);
+
InstallWindowEventHandler(prefsWin, NewEventHandlerUPP((EventHandlerProcPtr) prefsEventHandler),
GetEventTypeCount(dialogEvents),dialogEvents,prefsWin,NULL);
More information about the Scummvm-git-logs
mailing list