MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / Insert

Method Insert

Engine/source/gui/editor/guiImageList.cpp:46–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46U32 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
74bool GuiImageList::Clear()
75{

Callers 1

guiImageList.cppFile · 0.45

Calls 4

avarFunction · 0.85
GFXTexHandleClass · 0.50
insertMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected