mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Alert skeleton
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
#include "PLAppleEvents.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "House.h"
|
||||
|
||||
@@ -131,7 +132,7 @@ PLError_t DoPrintDocAE (const AppleEvent *theAE, AppleEvent *reply, UInt32 ref)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNoPrintingAlert);
|
||||
hitWhat = Alert(kNoPrintingAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoPrintingAlert);
|
||||
|
||||
return PLErrors::kInvalidParameter;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "PLTimeTaggedVOSEvent.h"
|
||||
#include "PLToolUtils.h"
|
||||
#include "PLQDraw.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "Environ.h"
|
||||
#include "House.h"
|
||||
@@ -53,7 +54,7 @@ short BitchAboutColorDepth (void)
|
||||
short sheSaid;
|
||||
|
||||
// CenterAlert(kColorSwitchedAlert);
|
||||
sheSaid = Alert(kColorSwitchedAlert, nil);
|
||||
sheSaid = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kColorSwitchedAlert);
|
||||
|
||||
return (sheSaid);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "PLNumberFormatting.h"
|
||||
#include "PLTextUtils.h"
|
||||
#include "PLPasStr.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
|
||||
|
||||
@@ -59,7 +60,7 @@ Boolean CheckFileError (short resultCode, const PLPasStr &fileName)
|
||||
ParamText(errMessage, errNumString, fileName, PSTR(""));
|
||||
|
||||
// CenterAlert(rFileErrorAlert);
|
||||
dummyInt = Alert(rFileErrorAlert, 0L);
|
||||
dummyInt = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(rFileErrorAlert);
|
||||
|
||||
return(false);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "PLStringCompare.h"
|
||||
#include "PLTextUtils.h"
|
||||
#include "PLPasStr.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "Environ.h"
|
||||
#include "FileManager.h"
|
||||
@@ -935,7 +936,7 @@ Boolean QuerySaveChanges (void)
|
||||
InitCursor();
|
||||
// CenterAlert(kSaveChangesAlert);
|
||||
ParamText(thisHouseName, PSTR(""), PSTR(""), PSTR(""));
|
||||
hitWhat = Alert(kSaveChangesAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kSaveChangesAlert);
|
||||
if (hitWhat == kSaveChanges)
|
||||
{
|
||||
if (wasHouseVersion < kHouseVersion)
|
||||
@@ -982,7 +983,7 @@ void YellowAlert (short whichAlert, short identifier)
|
||||
// CenterAlert(kYellowAlert);
|
||||
ParamText(errStr, errNumStr, PSTR(""), PSTR(""));
|
||||
|
||||
whoCares = Alert(kYellowAlert, nil);
|
||||
whoCares = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kYellowAlert);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- IsFileReadOnly
|
||||
|
||||
@@ -297,7 +297,7 @@ Boolean WarnLockingHouse (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kLockHouseAlert);
|
||||
hitWhat = Alert(kLockHouseAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kLockHouseAlert);
|
||||
|
||||
return (hitWhat == 1);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ void HowToZeroScores (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kZeroScoresAlert);
|
||||
hitWhat = Alert(kZeroScoresAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kZeroScoresAlert);
|
||||
|
||||
switch (hitWhat)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "PLToolUtils.h"
|
||||
#include "PLDialogs.h"
|
||||
#include "PLKeyEncoding.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "InputManager.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -468,7 +469,7 @@ Boolean QuerySaveGame (void)
|
||||
InitCursor();
|
||||
FlushEvents(everyEvent, 0);
|
||||
// CenterAlert(kSaveGameAlert);
|
||||
hitWhat = Alert(kSaveGameAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kSaveGameAlert);
|
||||
if (hitWhat == kYesSaveGameButton)
|
||||
return (true);
|
||||
else
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "PLResources.h"
|
||||
#include "PLPasStr.h"
|
||||
#include "PLStandardColors.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "Environ.h"
|
||||
#include "House.h"
|
||||
@@ -726,7 +727,7 @@ Boolean QueryNewRoom (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNewRoomAlert);
|
||||
hitWhat = Alert(kNewRoomAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNewRoomAlert);
|
||||
if (hitWhat == kYesDoNewRoom)
|
||||
return (true);
|
||||
else
|
||||
|
||||
@@ -773,7 +773,7 @@ void DoNotInDemo (void)
|
||||
short whoCares;
|
||||
|
||||
// CenterAlert(kNotInDemoAlert);
|
||||
whoCares = Alert(kNotInDemoAlert, nil);
|
||||
whoCares = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNotInDemoAlert);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -786,7 +786,7 @@ void HeyYourPissingAHighScore (void)
|
||||
|
||||
// CenterAlert(kNoHighScoreAlert);
|
||||
|
||||
whoCares = Alert(kNoHighScoreAlert, nil);
|
||||
whoCares = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoHighScoreAlert);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- OpenCloseEditWindows
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
//============================================================================
|
||||
//----------------------------------------------------------------------------
|
||||
// Music.c
|
||||
@@ -9,6 +7,7 @@
|
||||
|
||||
#include "PLResources.h"
|
||||
#include "PLSound.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Environ.h"
|
||||
#include "Externs.h"
|
||||
#include "SoundSync.h"
|
||||
@@ -388,6 +387,6 @@ void TellHerNoMusic (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNoMemForMusicAlert);
|
||||
hitWhat = Alert(kNoMemForMusicAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoMemForMusicAlert);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "PLToolUtils.h"
|
||||
#include "PLKeyEncoding.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "InputManager.h"
|
||||
#include "ObjectEdit.h"
|
||||
@@ -874,7 +875,7 @@ void ShoutNoMoreObjects (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNoMoreObjectsAlert);
|
||||
hitWhat = Alert(kNoMoreObjectsAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoMoreObjectsAlert);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- HowManyCandleObjects
|
||||
@@ -1071,7 +1072,7 @@ void ShoutNoMoreSpecialObjects (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNoMoreSpecialAlert);
|
||||
hitWhat = Alert(kNoMoreSpecialAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoMoreSpecialAlert);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//============================================================================
|
||||
|
||||
#include "PLPasStr.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "Environ.h"
|
||||
#include "FileManager.h"
|
||||
@@ -183,6 +184,6 @@ void BringUpDeletePrefsAlert (void)
|
||||
|
||||
InitCursor();
|
||||
// CenterAlert(kNewPrefsAlertID);
|
||||
whoCares = Alert(kNewPrefsAlertID, nil);
|
||||
whoCares = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNewPrefsAlertID);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "PLPasStr.h"
|
||||
#include "PLStandardColors.h"
|
||||
#include "BitmapImage.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "FontFamily.h"
|
||||
#include "House.h"
|
||||
@@ -477,7 +478,7 @@ Boolean QueryDeleteRoom (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kDeleteRoomAlert);
|
||||
hitWhat = Alert(kDeleteRoomAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kDeleteRoomAlert);
|
||||
if (hitWhat == kYesDoDeleteRoom)
|
||||
return (true);
|
||||
else
|
||||
|
||||
@@ -930,7 +930,7 @@ void BitchAboutPICTNotFound (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNoPICTFoundAlert);
|
||||
hitWhat = Alert(kNoPICTFoundAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoPICTFoundAlert);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
#include "PLStringCompare.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "FileManager.h"
|
||||
#include "House.h"
|
||||
@@ -165,7 +166,7 @@ void SavedGameMismatchError (StringPtr gameName)
|
||||
// CenterAlert(kSavedGameErrorAlert);
|
||||
ParamText(gameName, thisHouseName, PSTR(""), PSTR(""));
|
||||
|
||||
whoCares = Alert(kSavedGameErrorAlert, nil);
|
||||
whoCares = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kSavedGameErrorAlert);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- OpenSavedGame
|
||||
|
||||
@@ -1373,6 +1373,6 @@ void BitchAboutChanges (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kChangesEffectAlert);
|
||||
hitWhat = Alert(kChangesEffectAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kChangesEffectAlert);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "PLResources.h"
|
||||
#include "PLSound.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "ResourceManager.h"
|
||||
@@ -395,7 +396,7 @@ void TellHerNoSounds (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNoMemForSoundsAlert);
|
||||
hitWhat = Alert(kNoMemForSoundsAlert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoMemForSoundsAlert);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- BitchAboutSM3
|
||||
@@ -406,7 +407,7 @@ void BitchAboutSM3 (void)
|
||||
short hitWhat;
|
||||
|
||||
// CenterAlert(kNoSoundManager3Alert);
|
||||
hitWhat = Alert(kNoSoundManager3Alert, nil);
|
||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoSoundManager3Alert);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "PLTimeTaggedVOSEvent.h"
|
||||
#include "QDPixMap.h"
|
||||
#include "BitmapImage.h"
|
||||
#include "DialogManager.h"
|
||||
#include "Externs.h"
|
||||
#include "IconLoader.h"
|
||||
#include "InputManager.h"
|
||||
@@ -108,7 +109,7 @@ void RedAlert (short errorNumber)
|
||||
ParamText(errTitle, errMessage, errNumberString, PSTR(""));
|
||||
// CenterAlert(rDeathAlertID);
|
||||
|
||||
dummyInt = Alert(rDeathAlertID, nil);
|
||||
dummyInt = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(rDeathAlertID);
|
||||
ExitToShell();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user