#ifndef SERVER
video::ITexture * getImage()
{
- /*if(m_content >= USEFUL_CONTENT_COUNT)
- return NULL;
-
- return g_irrlicht->getTexture(g_content_inventory_texture_paths[m_content]);*/
-
- return g_irrlicht->getTexture(content_features(m_content).inventory_texture);
+ return content_features(m_content).inventory_texture;
+ return NULL;
}
#endif
std::string getText()
#ifndef SERVER
video::ITexture * getImage()
{
+ if(g_texturesource == NULL)
+ return NULL;
+
std::string name;
if(m_subname == "Stick")
name = "cloud.png";
// Get such a texture
- return g_irrlicht->getTexture(name);
+ //return g_irrlicht->getTexture(name);
+ return g_texturesource->getTextureRaw(name);
}
#endif
std::string getText()
#ifndef SERVER
video::ITexture * getImage()
{
+ if(g_texturesource == NULL)
+ return NULL;
+
std::string basename;
if(m_toolname == "WPick")
basename = "tool_wpick.png";
float value_f = (float)toolprogress / (float)maxprogress;
std::ostringstream os;
- os<<"[progressbar"<<value_f;
+ os<<basename<<"^[progressbar"<<value_f;
- TextureSpec spec;
+ return g_texturesource->getTextureRaw(os.str());
+
+ /*TextureSpec spec;
spec.addTid(g_irrlicht->getTextureId(basename));
spec.addTid(g_irrlicht->getTextureId(os.str()));
- return g_irrlicht->getTexture(spec);
-
- /*// Make texture name for the new texture with a progress bar
- float value_f = (float)toolprogress / (float)maxprogress;
- std::ostringstream os;
- os<<basename<<"[[mod:progressbar"<<value_f;
- return g_irrlicht->getTexture(os.str());*/
-
- /*// Make texture name for the new texture with a progress bar
- std::ostringstream os;
- os<<basename<<"-toolprogress-"<<toolprogress;
- std::string finalname = os.str();
-
- float value_f = (float)toolprogress / (float)maxprogress;
-
- // Get such a texture
- TextureMod *mod = new ProgressBarTextureMod(value_f);
- return g_irrlicht->getTexture(TextureSpec(finalname, basename, mod));*/
+ return g_irrlicht->getTexture(spec);*/
}
#endif
std::string getText()