/[hegemonie]/hegemonie/Interface/UiImage.m
ViewVC logotype

Diff of /hegemonie/Interface/UiImage.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by zaral, Thu Jul 17 10:52:48 2003 UTC revision 1.5 by zaral, Wed Jul 23 13:48:47 2003 UTC
# Line 30  Line 30 
30    
31  @implementation UiImage  @implementation UiImage
32    
 static TextureLoader *textureLoader;  
   
 + (void) initialize  
 {  
   textureLoader = [[TextureLoader alloc] init];  
 }  
   
33  /**  /**
34   * Initialise the image at a position.   * Initialise the image at a position.
35   * Returns nil if the image can't be created.   * Returns nil if the image can't be created.
# Line 53  static TextureLoader *textureLoader; Line 46  static TextureLoader *textureLoader;
46      {      {
47        _imageName = RETAIN(imageName);        _imageName = RETAIN(imageName);
48    
49        if (!(_texture = [textureLoader addTexture: imageName]))        if (!(_texture = [[TextureLoader defaultLoader] addTexture: imageName]))
50          return nil;          return nil;
51    
52        [self sizeToFit];        [self sizeToFit];
# Line 67  static TextureLoader *textureLoader; Line 60  static TextureLoader *textureLoader;
60   */   */
61  - (void) sizeToFit  - (void) sizeToFit
62  {  {
63    [self setSize: [textureLoader textureSize: _imageName]];    [self setSize: [[TextureLoader defaultLoader] textureSize: _imageName]];
64  }  }
65    
66  - (void) _display  - (void) _display
# Line 89  static TextureLoader *textureLoader; Line 82  static TextureLoader *textureLoader;
82    
83  - (void) dealloc  - (void) dealloc
84  {  {
85    [textureLoader removeTexture: _imageName];    [[TextureLoader defaultLoader] removeTexture: _imageName];
86    RELEASE(_imageName);    RELEASE(_imageName);
87    
88    [super dealloc];    [super dealloc];

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26