Changeset 15190 for titan/titan


Ignore:
Timestamp:
04/09/12 17:00:58 (12 years ago)
Author:
nit
Message:

[titan] add picture for grid filelist

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/filelist.h

    r14752 r15190  
    378378                                                posx += child->width;
    379379
     380                                                tmpstr = ostrcat(tmpstr, "skin/ext_", 1, 0);
     381                                                tmpstr = ostrcat(tmpstr, getfilenameext(filelist[i]->d_name), 1, 0);
     382                                                tmpstr = ostrcat(tmpstr, ".png", 1, 0);
     383                                                changepic(child, tmpstr);
     384                                                free(tmpstr); tmpstr = NULL;
     385
    380386                                                gridbr++;
    381387                                                if(gridbr >= 3)
  • titan/titan/global.h

    r15173 r15190  
    16671667}
    16681668
     1669char* getfilenameext(char* filename)
     1670{
     1671        char* zeichen = NULL;
     1672
     1673        if(filename == NULL) return NULL;
     1674
     1675        zeichen = strrchr(filename, '.');
     1676        if(zeichen != NULL)
     1677        {
     1678                return ostrcat(zeichen + 1, NULL, 0, 0);
     1679        }
     1680
     1681        return NULL;
     1682}
     1683
    16691684char* convert_timesec(int sec)
    16701685{
Note: See TracChangeset for help on using the changeset viewer.