forked from speed-dreams/speed-dreams-code
Added code to support seperate outline image for tracks
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@1961 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 6ae4cd28bcd47ed4881531deb5f6f503a025771c Former-commit-id: 64a3335d52b2018eaa3f740e026c293ec406359f
This commit is contained in:
parent
b58b02b1ab
commit
7759a4e01d
1 changed files with 15 additions and 6 deletions
|
@ -40,7 +40,7 @@ static tFList *CategoryList;
|
|||
static void *ScrHandle;
|
||||
static int TrackLabelId;
|
||||
static int CatLabelId;
|
||||
//static int MapId;
|
||||
static int OutlineId;
|
||||
static int AuthorId;
|
||||
static int LengthId;
|
||||
static int WidthId;
|
||||
|
@ -57,7 +57,6 @@ static void
|
|||
rmtsActivate(void * /* dummy */)
|
||||
{
|
||||
/* call display function of graphic */
|
||||
//gfuiReleaseImage(MapId);
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,6 +76,16 @@ rmtsGetMapName(char* mapNameBuf, unsigned mapNameBufSize)
|
|||
return mapNameBuf;
|
||||
}
|
||||
|
||||
static char *
|
||||
rmtsGetOutlineName(char* mapNameBuf, unsigned mapNameBufSize)
|
||||
{
|
||||
snprintf(mapNameBuf, mapNameBufSize, "tracks/%s/%s/outline.png", CategoryList->name,
|
||||
((tFList*)CategoryList->userData)->name);
|
||||
mapNameBuf[mapNameBufSize-1] = 0; /* snprinf manual is not clear about that ... */
|
||||
printf("Loading %s\n",mapNameBuf);
|
||||
return mapNameBuf;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
rmtsDeactivate(void *screen)
|
||||
|
@ -258,7 +267,7 @@ rmtsTrackPrevNext(void *vsel)
|
|||
|
||||
/* Update GUI */
|
||||
GfuiLabelSetText(ScrHandle, TrackLabelId, curTr->dispName);
|
||||
//GfuiStaticImageSet(ScrHandle, MapId, rmtsGetMapName(path, maxPathSize));
|
||||
GfuiStaticImageSet(ScrHandle, OutlineId, rmtsGetOutlineName(path, MAXPATHSIZE));
|
||||
GfuiScreenAddBgImg(ScrHandle,rmtsGetMapName(path, MAXPATHSIZE));
|
||||
rmtsUpdateTrackInfo();
|
||||
}//rmtsTrackPrevNext
|
||||
|
@ -318,7 +327,7 @@ rmtsTrackCatPrevNext(void *vsel)
|
|||
/* Update GUI */
|
||||
GfuiLabelSetText(ScrHandle, CatLabelId, CategoryList->dispName);
|
||||
GfuiLabelSetText(ScrHandle, TrackLabelId, ((tFList*)curCat->userData)->dispName);
|
||||
//GfuiStaticImageSet(ScrHandle, MapId, rmtsGetMapName(path, maxPathSize));
|
||||
GfuiStaticImageSet(ScrHandle, OutlineId, rmtsGetOutlineName(path, MAXPATHSIZE));
|
||||
GfuiScreenAddBgImg(ScrHandle,rmtsGetMapName(path, MAXPATHSIZE));
|
||||
rmtsUpdateTrackInfo();
|
||||
}
|
||||
|
@ -569,8 +578,8 @@ RmTrackSelect(void *vs)
|
|||
GfuiLabelSetText(ScrHandle,TrackLabelId,((tFList*)CategoryList->userData)->dispName);
|
||||
|
||||
/* Create static preview/map for currently selected track */
|
||||
//MapId = CreateStaticImageControl(ScrHandle,param,"trackimage");
|
||||
//GfuiStaticImageSet(ScrHandle, MapId, rmtsGetMapName(path, maxPathSize));
|
||||
OutlineId = CreateStaticImageControl(ScrHandle,param,"trackimage");
|
||||
GfuiStaticImageSet(ScrHandle, OutlineId, rmtsGetOutlineName(path, MAXPATHSIZE));
|
||||
GfuiScreenAddBgImg(ScrHandle,rmtsGetMapName(path, MAXPATHSIZE));
|
||||
|
||||
CreateButtonControl(ScrHandle,param,"accept",NULL,rmtsSelect);
|
||||
|
|
Loading…
Reference in a new issue