mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-23 00:27:10 +02:00
The function SurfaceCollection::getSkinPath() will return the path of a skin directory from its name given as a parameter.
This commit is contained in:
parent
02b54d38a3
commit
3db5844f3c
@ -38,6 +38,21 @@ void SurfaceCollection::setSkin(const string &skin) {
|
|||||||
this->skin = skin;
|
this->skin = skin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns the location of a skin directory,
|
||||||
|
* from its name given as a parameter. */
|
||||||
|
string SurfaceCollection::getSkinPath(const string &skin)
|
||||||
|
{
|
||||||
|
string path = GMenu2X::getHome() + "/skins/" + skin;
|
||||||
|
if (fileExists(path))
|
||||||
|
return path;
|
||||||
|
|
||||||
|
path = GMENU2X_SYSTEM_DIR "/skins/" + skin;
|
||||||
|
if (fileExists(path))
|
||||||
|
return path;
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
string SurfaceCollection::getSkinFilePath(const string &file)
|
string SurfaceCollection::getSkinFilePath(const string &file)
|
||||||
{
|
{
|
||||||
return SurfaceCollection::getSkinFilePath(skin, file);
|
return SurfaceCollection::getSkinFilePath(skin, file);
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
void setSkin(const std::string &skin);
|
void setSkin(const std::string &skin);
|
||||||
std::string getSkinFilePath(const std::string &file);
|
std::string getSkinFilePath(const std::string &file);
|
||||||
static std::string getSkinFilePath(const std::string &skin, const std::string &file);
|
static std::string getSkinFilePath(const std::string &skin, const std::string &file);
|
||||||
|
static std::string getSkinPath(const std::string &skin);
|
||||||
|
|
||||||
bool defaultAlpha;
|
bool defaultAlpha;
|
||||||
void debug();
|
void debug();
|
||||||
|
Loading…
Reference in New Issue
Block a user