Laptop & Mail Fixes (by Buggler)

- left click to close, right click for delete prompt when viewing email messages
- alternative hotkey 'Enter' to close new email message notification
- fixed bugged mouse region render behavior on returning to view another mail message after right click in other laptop modes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5827 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-01-31 20:22:54 +00:00
parent fa09614080
commit 169273be93
2 changed files with 174 additions and 131 deletions
+127 -105
View File
@@ -207,13 +207,13 @@ enum{
// X button position // X button position
#define BUTTON_X VIEWER_X + 396 #define BUTTON_X VIEWER_X + 396
#define BUTTON_Y VIEWER_Y + 3 #define BUTTON_Y VIEWER_Y + 3
#define BUTTON_LOWER_Y BUTTON_Y + 22 #define BUTTON_LOWER_Y BUTTON_Y + 22
#define PREVIOUS_PAGE_BUTTON_X VIEWER_X + 302 #define PREVIOUS_PAGE_BUTTON_X VIEWER_X + 302
#define NEXT_PAGE_BUTTON_X VIEWER_X +395 #define NEXT_PAGE_BUTTON_X VIEWER_X +395
#define DELETE_BUTTON_X NEXT_PAGE_BUTTON_X #define DELETE_BUTTON_X NEXT_PAGE_BUTTON_X
#define LOWER_BUTTON_Y BUTTON_Y + 299 #define LOWER_BUTTON_Y BUTTON_Y + 299
BOOLEAN fSortDateUpwards = FALSE; BOOLEAN fSortDateUpwards = FALSE;
@@ -225,6 +225,7 @@ BOOLEAN gfPageButtonsWereCreated = FALSE;
MOUSE_REGION pEmailRegions[MAX_MESSAGES_PAGE]; MOUSE_REGION pEmailRegions[MAX_MESSAGES_PAGE];
extern MOUSE_REGION pScreenMask; // symbol already defined in laptop.cpp (jonathanl) extern MOUSE_REGION pScreenMask; // symbol already defined in laptop.cpp (jonathanl)
MOUSE_REGION pDeleteScreenMask; MOUSE_REGION pDeleteScreenMask;
MOUSE_REGION pMailViewMessageRegion;
// the email info struct to speed up email // the email info struct to speed up email
EmailPageInfoStruct pEmailPageInfo[ MAX_NUMBER_EMAIL_PAGES ]; EmailPageInfoStruct pEmailPageInfo[ MAX_NUMBER_EMAIL_PAGES ];
@@ -329,6 +330,7 @@ void DateCallback(GUI_BUTTON *btn, INT32 iReason );
void ReadCallback(GUI_BUTTON *btn, INT32 iReason ); void ReadCallback(GUI_BUTTON *btn, INT32 iReason );
void BtnPreviousEmailPageCallback(GUI_BUTTON *btn,INT32 reason); void BtnPreviousEmailPageCallback(GUI_BUTTON *btn,INT32 reason);
void BtnNextEmailPageCallback(GUI_BUTTON *btn,INT32 reason); void BtnNextEmailPageCallback(GUI_BUTTON *btn,INT32 reason);
void ViewMessageRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason );
void DisplayEmailList(); void DisplayEmailList();
void ClearOutEmailMessageRecordsList( void ); void ClearOutEmailMessageRecordsList( void );
void AddEmailRecordToList( STR16 pString ); void AddEmailRecordToList( STR16 pString );
@@ -537,11 +539,11 @@ void HandleEmail( void )
// if the message flag, show message // if the message flag, show message
else if((fDisplayMessageFlag)&&(fReDrawMessageFlag)) else if((fDisplayMessageFlag)&&(fReDrawMessageFlag))
{ {
// redisplay list // redisplay list
DisplayEmailList(); DisplayEmailList();
// this simply redraws message without button manipulation // this simply redraws message without button manipulation
iViewerY = DisplayEmailMessage(GetEmailMessage(giMessageId)); iViewerY = DisplayEmailMessage(GetEmailMessage(giMessageId));
fEmailListBeenDrawAlready = FALSE; fEmailListBeenDrawAlready = FALSE;
} }
@@ -1928,7 +1930,7 @@ void EmailBtnCallBack(MOUSE_REGION * pRegion, INT32 iReason )
// invalid message // invalid message
if(iId==-1) if(iId==-1)
{ {
fDisplayMessageFlag=FALSE; fDisplayMessageFlag=FALSE;
return; return;
} }
// Get email and display // Get email and display
@@ -2006,45 +2008,40 @@ void BtnMessageXCallback(GUI_BUTTON *btn,INT32 reason)
if((reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )||(reason & MSYS_CALLBACK_REASON_RBUTTON_DWN)) if((reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )||(reason & MSYS_CALLBACK_REASON_RBUTTON_DWN))
{ {
btn->uiFlags |= BUTTON_CLICKED_ON; btn->uiFlags |= BUTTON_CLICKED_ON;
} }
else if((reason & MSYS_CALLBACK_REASON_LBUTTON_UP )||(reason & MSYS_CALLBACK_REASON_RBUTTON_UP)) else if((reason & MSYS_CALLBACK_REASON_LBUTTON_UP )||(reason & MSYS_CALLBACK_REASON_RBUTTON_UP))
{ {
if(btn->uiFlags& BUTTON_CLICKED_ON) if(btn->uiFlags& BUTTON_CLICKED_ON)
{ {
// X button has been pressed and let up, this means to stop displaying the currently displayed message // X button has been pressed and let up, this means to stop displaying the currently displayed message
// reset display message flag // reset display message flag
fDisplayMessageFlag=FALSE; fDisplayMessageFlag=FALSE;
// reset button flag // reset button flag
btn->uiFlags &= ~BUTTON_CLICKED_ON; btn->uiFlags &= ~BUTTON_CLICKED_ON;
// reset page being displayed // reset page being displayed
giMessagePage = 0; giMessagePage = 0;
// redraw icons // redraw icons
DrawLapTopIcons(); DrawLapTopIcons();
// force update of entire screen // force update of entire screen
fPausedReDrawScreenFlag=TRUE; fPausedReDrawScreenFlag=TRUE;
// rerender email // rerender email
//RenderEmail(); //RenderEmail();
} }
} }
} }
void void SetUnNewMessages()
SetUnNewMessages()
{ {
// on exit from the mailer, set all new messages as 'un'new // on exit from the mailer, set all new messages as 'un'new
EmailPtr pEmail=pEmailList; EmailPtr pEmail=pEmailList;
// run through the list of messages and add to pages // run through the list of messages and add to pages
while(pEmail) while(pEmail)
{ {
pEmail->fNew=FALSE; pEmail->fNew=FALSE;
@@ -2187,20 +2184,15 @@ INT32 DisplayEmailMessage(EmailPtr pMail)
{ {
while( fDonePrintingMessage == FALSE ) while( fDonePrintingMessage == FALSE )
{ {
// copy over string // copy over string
wcscpy( pString, pTempRecord->pRecord ); wcscpy( pString, pTempRecord->pRecord );
// get the height of the string, ONLY!...must redisplay ON TOP OF background graphic // get the height of the string, ONLY!...must redisplay ON TOP OF background graphic
iHeight += IanDisplayWrappedString(VIEWER_X + 9, ( UINT16 )( VIEWER_MESSAGE_BODY_START_Y + iHeight + iViewerPositionY), MESSAGE_WIDTH, MESSAGE_GAP, MESSAGE_FONT, MESSAGE_COLOR,pString,0,FALSE, IAN_WRAP_NO_SHADOW); iHeight += IanDisplayWrappedString(VIEWER_X + 9, ( UINT16 )( VIEWER_MESSAGE_BODY_START_Y + iHeight + iViewerPositionY), MESSAGE_WIDTH, MESSAGE_GAP, MESSAGE_FONT, MESSAGE_COLOR,pString,0,FALSE, IAN_WRAP_NO_SHADOW);
// increment email record ptr // increment email record ptr
pTempRecord = pTempRecord->Next; pTempRecord = pTempRecord->Next;
if( pTempRecord == NULL ) if( pTempRecord == NULL )
{ {
fDonePrintingMessage = TRUE; fDonePrintingMessage = TRUE;
@@ -2338,11 +2330,11 @@ void AddDeleteRegionsToMessageRegion(INT32 iViewerY)
// add X button // add X button
giMessageButtonImage[0]= LoadButtonImage( "LAPTOP\\X.sti" ,-1,0,-1,1,-1 ); giMessageButtonImage[0]= LoadButtonImage( "LAPTOP\\X.sti" ,-1,0,-1,1,-1 );
giMessageButton[0] = QuickCreateButton( giMessageButtonImage[0], BUTTON_X + 2,(INT16) ( BUTTON_Y + ( INT16 )iViewerY + 1), giMessageButton[0] = QuickCreateButton( giMessageButtonImage[0], BUTTON_X + 2,(INT16) ( BUTTON_Y + ( INT16 )iViewerY + 1),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageXCallback ); (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageXCallback );
SetButtonCursor(giMessageButton[0], CURSOR_LAPTOP_SCREEN); SetButtonCursor(giMessageButton[0], CURSOR_LAPTOP_SCREEN);
if( giNumberOfPagesToCurrentEmail > 2 ) if( giNumberOfPagesToCurrentEmail > 2 )
{ {
@@ -2361,33 +2353,39 @@ void AddDeleteRegionsToMessageRegion(INT32 iViewerY)
} }
giMailMessageButtonsImage[2]= LoadButtonImage( "LAPTOP\\NewMailButtons.sti" ,-1,2,-1,5,-1 ); // add delete message button
giMailMessageButtonsImage[2]= LoadButtonImage( "LAPTOP\\NewMailButtons.sti" ,-1,2,-1,5,-1 );
giMailMessageButtons[2] = QuickCreateButton( giMailMessageButtonsImage[2], DELETE_BUTTON_X,(INT16) ( BUTTON_LOWER_Y + ( INT16 )iViewerY + 2), giMailMessageButtons[2] = QuickCreateButton( giMailMessageButtonsImage[2], DELETE_BUTTON_X,(INT16) ( BUTTON_LOWER_Y + ( INT16 )iViewerY + 2),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnDeleteCallback ); (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnDeleteCallback );
/* /*
// set up disable methods // set up disable methods
SpecifyDisabledButtonStyle( giMailMessageButtons[1], DISABLED_STYLE_SHADED ); SpecifyDisabledButtonStyle( giMailMessageButtons[1], DISABLED_STYLE_SHADED );
SpecifyDisabledButtonStyle( giMailMessageButtons[0], DISABLED_STYLE_SHADED ); SpecifyDisabledButtonStyle( giMailMessageButtons[0], DISABLED_STYLE_SHADED );
*/ */
// set cursors // set cursors
SetButtonCursor(giMailMessageButtons[0], CURSOR_LAPTOP_SCREEN); SetButtonCursor(giMailMessageButtons[0], CURSOR_LAPTOP_SCREEN);
SetButtonCursor(giMailMessageButtons[1], CURSOR_LAPTOP_SCREEN); SetButtonCursor(giMailMessageButtons[1], CURSOR_LAPTOP_SCREEN);
SetButtonCursor(giMailMessageButtons[2], CURSOR_LAPTOP_SCREEN); SetButtonCursor(giMailMessageButtons[2], CURSOR_LAPTOP_SCREEN);
SetButtonCursor(giMessageButton[0], CURSOR_LAPTOP_SCREEN); SetButtonCursor(giMessageButton[0], CURSOR_LAPTOP_SCREEN);
// set up email message region
MSYS_DefineRegion( &pMailViewMessageRegion, VIEWER_X + 2, (INT16) ( VIEWER_Y + (INT16)iViewerY + 2), VIEWER_X + 416, (INT16) ( VIEWER_Y + (INT16)iViewerY + 72 + iTotalHeight), MSYS_PRIORITY_HIGH,
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, ViewMessageRegionCallBack );
MSYS_AddRegion( &pMailViewMessageRegion );
// force update of screen // force update of screen
fReDrawScreenFlag=TRUE; fReDrawScreenFlag=TRUE;
} }
else if((!fDisplayMessageFlag)&&(fOldDisplayMessageFlag)) else if((!fDisplayMessageFlag)&&(fOldDisplayMessageFlag))
{ {
// delete region // delete region
fOldDisplayMessageFlag=FALSE; fOldDisplayMessageFlag=FALSE;
RemoveButton(giMessageButton[0] ); RemoveButton(giMessageButton[0] );
UnloadButtonImage( giMessageButtonImage[0] ); UnloadButtonImage( giMessageButtonImage[0] );
// net/previous email page buttons // next/previous email page buttons
if( gfPageButtonsWereCreated ) if( gfPageButtonsWereCreated )
{ {
RemoveButton(giMailMessageButtons[0] ); RemoveButton(giMailMessageButtons[0] );
UnloadButtonImage( giMailMessageButtonsImage[0] ); UnloadButtonImage( giMailMessageButtonsImage[0] );
@@ -2395,77 +2393,74 @@ void AddDeleteRegionsToMessageRegion(INT32 iViewerY)
UnloadButtonImage( giMailMessageButtonsImage[1] ); UnloadButtonImage( giMailMessageButtonsImage[1] );
gfPageButtonsWereCreated = FALSE; gfPageButtonsWereCreated = FALSE;
} }
RemoveButton(giMailMessageButtons[2] ); RemoveButton(giMailMessageButtons[2] );
UnloadButtonImage( giMailMessageButtonsImage[2] ); UnloadButtonImage( giMailMessageButtonsImage[2] );
// force update of screen
MSYS_RemoveRegion( &pMailViewMessageRegion );
// force update of screen
fReDrawScreenFlag=TRUE; fReDrawScreenFlag=TRUE;
} }
} }
void CreateDestroyNewMailButton() void CreateDestroyNewMailButton()
{ {
static BOOLEAN fOldNewMailFlag=FALSE; static BOOLEAN fOldNewMailFlag=FALSE;
// check if we are video conferencing, if so, do nothing // check if we are video conferencing, if so, do nothing
if( gubVideoConferencingMode != 0 ) if( gubVideoConferencingMode != 0 )
{ {
return ; return ;
} }
if((fNewMailFlag)&&(!fOldNewMailFlag)) if((fNewMailFlag)&&(!fOldNewMailFlag))
{ {
// create new mail dialog box button // create new mail dialog box button
// set old flag (stating button has been created) // set old flag (stating button has been created)
fOldNewMailFlag=TRUE; fOldNewMailFlag=TRUE;
// load image and setup button // load image and setup button
giNewMailButtonImage[0]=LoadButtonImage( "LAPTOP\\YesNoButtons.sti" ,-1,0,-1,1,-1 ); giNewMailButtonImage[0]=LoadButtonImage( "LAPTOP\\YesNoButtons.sti" ,-1,0,-1,1,-1 );
giNewMailButton[0]= QuickCreateButton( giNewMailButtonImage[0], NEW_BTN_X+10, NEW_BTN_Y, giNewMailButton[0]= QuickCreateButton( giNewMailButtonImage[0], NEW_BTN_X+10, NEW_BTN_Y,
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST-2, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST-2,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnNewOkback); (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnNewOkback);
// set cursor // set cursor
SetButtonCursor(giNewMailButton[0], CURSOR_LAPTOP_SCREEN); SetButtonCursor(giNewMailButton[0], CURSOR_LAPTOP_SCREEN);
// set up screen mask region // set up screen mask region
MSYS_DefineRegion(&pScreenMask,0, 0,SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_DefineRegion(&pScreenMask, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGHEST-3,
MSYS_PRIORITY_HIGHEST-3,CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, LapTopScreenCallBack); CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, LapTopScreenCallBack);
MSYS_AddRegion(&pScreenMask); MSYS_AddRegion(&pScreenMask);
MarkAButtonDirty( giNewMailButton[0] ); MarkAButtonDirty( giNewMailButton[0] );
fReDrawScreenFlag = TRUE; fReDrawScreenFlag = TRUE;
} }
else if((!fNewMailFlag)&&(fOldNewMailFlag)) else if((!fNewMailFlag)&&(fOldNewMailFlag))
{ {
// reset old flag
fOldNewMailFlag=FALSE;
// remove the button
RemoveButton( giNewMailButton[0] );
UnloadButtonImage( giNewMailButtonImage[0] );
// reset old flag // remove screen mask
fOldNewMailFlag=FALSE; MSYS_RemoveRegion( &pScreenMask );
// remove the button //re draw screen
RemoveButton( giNewMailButton[0] ); fReDraw=TRUE;
UnloadButtonImage( giNewMailButtonImage[0] );
// remove screen mask // redraw screen
MSYS_RemoveRegion( &pScreenMask );
//re draw screen
fReDraw=TRUE;
// redraw screen
fPausedReDrawScreenFlag=TRUE; fPausedReDrawScreenFlag=TRUE;
} }
} }
BOOLEAN DisplayNewMailBox( void ) BOOLEAN DisplayNewMailBox( void )
{ {
HVOBJECT hHandle; HVOBJECT hHandle;
static BOOLEAN fOldNewMailFlag=FALSE; static BOOLEAN fOldNewMailFlag=FALSE;
// will display a new mail box whenever new mail has arrived // will display a new mail box whenever new mail has arrived
@@ -2487,14 +2482,11 @@ BOOLEAN DisplayNewMailBox( void )
if( !fNewMailFlag ) if( !fNewMailFlag )
return ( FALSE ); return ( FALSE );
// is set but already drawn, LEAVE NOW! // is set but already drawn, LEAVE NOW!
//if( ( fNewMailFlag ) && ( fOldNewMailFlag ) ) //if( ( fNewMailFlag ) && ( fOldNewMailFlag ) )
// return ( FALSE ); // return ( FALSE );
GetVideoObject( &hHandle, guiEmailWarning ); GetVideoObject( &hHandle, guiEmailWarning );
BltVideoObject( FRAME_BUFFER, hHandle, 0,EMAIL_WARNING_X, EMAIL_WARNING_Y, VO_BLT_SRCTRANSPARENCY,NULL ); BltVideoObject( FRAME_BUFFER, hHandle, 0,EMAIL_WARNING_X, EMAIL_WARNING_Y, VO_BLT_SRCTRANSPARENCY,NULL );
@@ -2535,8 +2527,6 @@ BOOLEAN DisplayNewMailBox( void )
// set box as displayed // set box as displayed
fOldNewMailFlag=TRUE; fOldNewMailFlag=TRUE;
// return // return
return ( TRUE ); return ( TRUE );
} }
@@ -2553,18 +2543,16 @@ void ReDrawNewMailBox( void )
fNewMailFlag = FALSE; fNewMailFlag = FALSE;
// display new mail box // display new mail box
DisplayNewMailBox( ); DisplayNewMailBox( );
// dirty buttons // dirty buttons
MarkAButtonDirty( giNewMailButton[0] ); MarkAButtonDirty( giNewMailButton[0] );
// set display flag back to orginal // set display flag back to orginal
fNewMailFlag = TRUE; fNewMailFlag = TRUE;
// time to redraw // time to redraw
DisplayNewMailBox( ); DisplayNewMailBox( );
} }
// return; // return;
@@ -3158,6 +3146,40 @@ void ReadCallback(GUI_BUTTON *btn, INT32 iReason )
} }
void ViewMessageRegionCallBack( MOUSE_REGION * pRegion, INT32 iReason )
{
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
return;
}
if( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP)
{
// simulate X button has been pressed and let up, this means to stop displaying the currently displayed message
// reset display message flag
fDisplayMessageFlag=FALSE;
// reset page being displayed
giMessagePage = 0;
// redraw icons
DrawLapTopIcons();
// force update of entire screen
fPausedReDrawScreenFlag=TRUE;
// rerender email
//RenderEmail();
}
else if (iReason & MSYS_CALLBACK_REASON_RBUTTON_UP)
{
// delete message
iDeleteId = giMessageId;
fDeleteMailFlag = TRUE;
}
}
void SetUpSortRegions() void SetUpSortRegions()
{ {
+47 -26
View File
@@ -607,6 +607,7 @@ void ShouldNewMailBeDisplayed( void );
void DisplayPlayersBalanceToDate( void ); void DisplayPlayersBalanceToDate( void );
void CheckIfNewWWWW( void ); void CheckIfNewWWWW( void );
void HandleLapTopESCKey( void ); void HandleLapTopESCKey( void );
void HandleLapTopEnterKey( void );
BOOLEAN InitTitleBarMaximizeGraphics( UINT32 uiBackgroundGraphic, STR16 pTitle, UINT32 uiIconGraphic, UINT16 usIconGraphicIndex ); BOOLEAN InitTitleBarMaximizeGraphics( UINT32 uiBackgroundGraphic, STR16 pTitle, UINT32 uiIconGraphic, UINT16 usIconGraphicIndex );
void RemoveTitleBarMaximizeGraphics(); void RemoveTitleBarMaximizeGraphics();
BOOLEAN DisplayTitleBarMaximizeGraphic(BOOLEAN fForward, BOOLEAN fInit, UINT16 usTopLeftX, UINT16 usTopLeftY, UINT16 usTopRightX ); BOOLEAN DisplayTitleBarMaximizeGraphic(BOOLEAN fForward, BOOLEAN fInit, UINT16 usTopLeftX, UINT16 usTopLeftY, UINT16 usTopRightX );
@@ -703,8 +704,7 @@ void HandleLapTopCursorUpDate()
guiPreviousLapTopCursor=guiCurrentLapTopCursor; guiPreviousLapTopCursor=guiCurrentLapTopCursor;
} }
void void GetLaptopKeyboardInput()
GetLaptopKeyboardInput()
{ {
InputAtom InputEvent; InputAtom InputEvent;
POINT MousePos; POINT MousePos;
@@ -4661,39 +4661,37 @@ void CheckIfNewWWWW( void )
void HandleLapTopESCKey( void ) void HandleLapTopESCKey( void )
{ {
// will handle esc key events, since handling depends on state of laptop // will handle esc key events, since handling depends on state of laptop
if( fNewMailFlag ) if( fNewMailFlag )
{ {
// get rid of new mail warning box // get rid of new mail warning box
fNewMailFlag=FALSE; fNewMailFlag=FALSE;
CreateDestroyNewMailButton(); CreateDestroyNewMailButton();
// force redraw // force redraw
fReDrawScreenFlag = TRUE; fReDrawScreenFlag = TRUE;
RenderLaptop( ); RenderLaptop( );
} }
else if(fDeleteMailFlag) else if(fDeleteMailFlag)
{ {
// get rid of delete mail box // get rid of delete mail box
fDeleteMailFlag=FALSE; fDeleteMailFlag = FALSE;
CreateDestroyDeleteNoticeMailButton(); CreateDestroyDeleteNoticeMailButton();
// force redraw // force redraw
fReDrawScreenFlag = TRUE; fReDrawScreenFlag = TRUE;
RenderLaptop( ); RenderLaptop( );
} }
else if( fErrorFlag ) else if( fErrorFlag )
{ {
// get rid of error warning box // get rid of error warning box
fErrorFlag=FALSE; fErrorFlag=FALSE;
CreateDestroyErrorButton(); CreateDestroyErrorButton();
// force redraw // force redraw
fReDrawScreenFlag = TRUE; fReDrawScreenFlag = TRUE;
RenderLaptop( ); RenderLaptop( );
} }
else if( gfShowBookmarks ) else if( gfShowBookmarks )
@@ -4702,19 +4700,36 @@ void HandleLapTopESCKey( void )
gfShowBookmarks = FALSE; gfShowBookmarks = FALSE;
// force redraw // force redraw
fReDrawScreenFlag = TRUE; fReDrawScreenFlag = TRUE;
RenderLapTopImage( ); RenderLapTopImage( );
RenderLaptop( ); RenderLaptop( );
} }
else else
{ {
// leave // leave
fExitingLaptopFlag = TRUE; fExitingLaptopFlag = TRUE;
HandleExit( ); HandleExit( );
} }
return;
}
void HandleLapTopEnterKey( void )
{
// will handle esc key events, since handling depends on state of laptop
if( fNewMailFlag )
{
// get rid of new mail warning box
fNewMailFlag=FALSE;
CreateDestroyNewMailButton();
// force redraw
fReDrawScreenFlag = TRUE;
RenderLaptop( );
}
return; return;
} }
@@ -4764,16 +4779,17 @@ void HandleRightButtonUpEvent( void )
RenderLapTopImage( ); RenderLapTopImage( );
RenderLaptop( ); RenderLaptop( );
} }
/* // Buggler: bugged mouse region render behavior on returning to view another mail message after right click in other laptop modes
else if( fDisplayMessageFlag ) else if( fDisplayMessageFlag )
{ {
fDisplayMessageFlag = FALSE; fDisplayMessageFlag = FALSE;
// force redraw // force redraw
fReDrawScreenFlag = TRUE; fReDrawScreenFlag = TRUE;
RenderLapTopImage( ); RenderLapTopImage( );
RenderLaptop( ); RenderLaptop( );
} }*/
else if( fShowBookmarkInfo ) else if( fShowBookmarkInfo )
{ {
fShowBookmarkInfo = FALSE; fShowBookmarkInfo = FALSE;
@@ -5853,8 +5869,13 @@ void HandleKeyBoardShortCutsForLapTop( UINT16 usEvent, UINT32 usParam, UINT16 us
if ( (usEvent == KEY_DOWN ) && (usParam == ESC ) ) if ( (usEvent == KEY_DOWN ) && (usParam == ESC ) )
{ {
// esc hit, check to see if boomark list is shown, if so, get rid of it, otherwise, leave // handle various functions of ESC key
HandleLapTopESCKey( ); HandleLapTopESCKey( );
}
else if ( (usEvent == KEY_DOWN ) && (usParam == ENTER ) )
{
// handle various functions of Enter key
HandleLapTopEnterKey( );
} }
else if( (usEvent == KEY_DOWN ) && ( usParam == TAB ) ) else if( (usEvent == KEY_DOWN ) && ( usParam == TAB ) )
{ {