mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-27 10:36:27 +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;
|
||||
}
|
||||
|
||||
/* 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)
|
||||
{
|
||||
return SurfaceCollection::getSkinFilePath(skin, file);
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
void setSkin(const std::string &skin);
|
||||
std::string getSkinFilePath(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;
|
||||
void debug();
|
||||
|
Loading…
Reference in New Issue
Block a user