| 44 | } |
| 45 | |
| 46 | U32 GuiImageList::Insert( const char* texturePath, GFXTextureProfile *Type ) |
| 47 | { |
| 48 | TextureEntry *t = new TextureEntry; |
| 49 | |
| 50 | t->TexturePath = StringTable->insert(texturePath); |
| 51 | if ( *t->TexturePath ) |
| 52 | { |
| 53 | t->Handle = GFXTexHandle(t->TexturePath, Type, avar("%s() - t->Handle (line %d)", __FUNCTION__, __LINE__)); |
| 54 | |
| 55 | if ( t->Handle ) |
| 56 | { |
| 57 | t->id = ++mUniqueId; |
| 58 | |
| 59 | mTextures.push_back( t ); |
| 60 | |
| 61 | return t->id; |
| 62 | |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | // Free Texture Entry. |
| 67 | delete t; |
| 68 | |
| 69 | // Return Failure. |
| 70 | return -1; |
| 71 | |
| 72 | } |
| 73 | |
| 74 | bool GuiImageList::Clear() |
| 75 | { |
no test coverage detected