RenderPanelController.m
上传用户:center1979
上传日期:2022-07-26
资源大小:50633k
文件大小:1k
源码类别:

OpenGL

开发平台:

Visual C++

  1. //
  2. //  RenderPanelController.m
  3. //  celestia
  4. //
  5. //  2005-05 Modified substantially by Da Woon Jung
  6. //  Copyright (c) 2002 Chris Laurel. All rights reserved.
  7. //
  8. #import "RenderPanelController.h"
  9. @implementation RenderPanelController
  10. - (void)awakeFromNib
  11. {
  12.     [self hideRenderPathWarning];
  13. }
  14. - (void)dealloc
  15. {
  16.     if (_renderPathWarningSuper)
  17.     {
  18.         [renderPathCautionIcon release];
  19.         [renderPathWarning release];
  20.     }
  21.     [super dealloc];
  22. }
  23. - (void)displayRenderPathWarning:(NSString *)warning
  24. {
  25.     if (_renderPathWarningSuper)
  26.     {
  27.         [_renderPathWarningSuper addSubview: renderPathCautionIcon];
  28.         [_renderPathWarningSuper addSubview: renderPathWarning];
  29.         [renderPathCautionIcon release];
  30.         [renderPathWarning release];
  31.         _renderPathWarningSuper = nil;
  32.     }
  33.     [renderPathWarning setStringValue: 
  34.         [NSString stringWithFormat:NSLocalizedString(@"Your system does not supportn%@",""), warning]];
  35. }
  36. - (void)hideRenderPathWarning
  37. {
  38.     if (_renderPathWarningSuper == nil)
  39.     {
  40.         _renderPathWarningSuper = [renderPathWarning superview];
  41.         [renderPathCautionIcon retain];
  42.         [renderPathWarning retain];
  43.         [renderPathCautionIcon removeFromSuperview];
  44.         [renderPathWarning removeFromSuperview];
  45.     }
  46. }
  47. @end