@@ -501,7 +501,7 @@ extern void toggleReplayControls( void );
501501// -------------------------------------------------------------------------------------------------
502502void ShowControlBar ( Bool immediate )
503503{
504- if (!TheWindowManager || !TheControlBar || !TheTacticalView )
504+ if (!TheWindowManager || !TheControlBar)
505505 return ;
506506
507507 showReplayControls ();
@@ -514,7 +514,7 @@ void ShowControlBar( Bool immediate )
514514 if (window)
515515 {
516516 TheControlBar->switchControlBarStage (CONTROL_BAR_STAGE_DEFAULT);
517- TheTacticalView-> setHeight ((Int)(TheDisplay-> getHeight () * 0 . 80f ) );
517+ TheControlBar-> setScaledViewportHeight ( );
518518
519519 if (TheControlBar->m_animateWindowManager && !immediate)
520520 {
@@ -536,7 +536,7 @@ void ShowControlBar( Bool immediate )
536536// -------------------------------------------------------------------------------------------------
537537void HideControlBar ( Bool immediate )
538538{
539- if (!TheWindowManager || !TheControlBar || !TheTacticalView )
539+ if (!TheWindowManager || !TheControlBar)
540540 return ;
541541
542542 hideReplayControls ();
@@ -549,9 +549,9 @@ void HideControlBar( Bool immediate )
549549 if (window)
550550 {
551551#ifdef SLIDE_LETTERBOX
552- TheTacticalView-> setHeight ((Int)(TheDisplay-> getHeight () * 0 . 80f ));
552+ TheControlBar-> setScaledViewportHeight ();
553553#else
554- TheTacticalView-> setHeight (TheDisplay-> getHeight () );
554+ TheControlBar-> setFullViewportHeight ( );
555555#endif
556556 if (immediate)
557557 {
@@ -574,7 +574,7 @@ void HideControlBar( Bool immediate )
574574// -------------------------------------------------------------------------------------------------
575575void ToggleControlBar ( Bool immediate )
576576{
577- if (!TheWindowManager || !TheControlBar || !TheTacticalView )
577+ if (!TheWindowManager || !TheControlBar)
578578 return ;
579579
580580 toggleReplayControls ();
@@ -589,7 +589,7 @@ void ToggleControlBar( Bool immediate )
589589 TheControlBar->showSpecialPowerShortcut ();
590590
591591 // now hidden, we're making it visible again so shrink viewport under the window
592- TheTacticalView-> setHeight ((Int)(TheDisplay-> getHeight () * 0 . 80f ) );
592+ TheControlBar-> setScaledViewportHeight ( );
593593 window->winHide (FALSE );
594594 TheControlBar->switchControlBarStage (CONTROL_BAR_STAGE_DEFAULT);
595595
@@ -604,7 +604,7 @@ void ToggleControlBar( Bool immediate )
604604 else
605605 {
606606 TheControlBar->hideSpecialPowerShortcut ();
607- TheTacticalView-> setHeight (TheDisplay-> getHeight () );
607+ TheControlBar-> setFullViewportHeight ( );
608608 window->winHide (TRUE );
609609 }
610610 }
0 commit comments