mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 13:05:20 +02:00
The skin images will now be loaded using SurfaceCollection::getSkinFilePath().
This commit is contained in:
parent
114fe594d0
commit
fe25cf341d
@ -26,6 +26,7 @@ using namespace std;
|
||||
#include "surface.h"
|
||||
#include "utilities.h"
|
||||
#include "debug.h"
|
||||
#include "surfacecollection.h"
|
||||
|
||||
RGBAColor strtorgba(const string &strColor) {
|
||||
RGBAColor c = {0,0,0,255};
|
||||
@ -116,13 +117,10 @@ void Surface::load(const string &img, bool alpha, const string &skin) {
|
||||
free();
|
||||
|
||||
string skinpath;
|
||||
if (!skin.empty() && !img.empty() && img[0]!='/') {
|
||||
skinpath = "skins/"+skin+"/"+img;
|
||||
if (!fileExists(skinpath))
|
||||
skinpath = "skins/Default/"+img;
|
||||
} else {
|
||||
skinpath = img;
|
||||
}
|
||||
if (!skin.empty() && !img.empty() && img[0]!='/')
|
||||
skinpath = SurfaceCollection::getSkinFilePath(skin, img);
|
||||
else
|
||||
skinpath = img;
|
||||
|
||||
SDL_Surface *buf = IMG_Load(skinpath.c_str());
|
||||
if (buf!=NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user