More PIELIGHT conversions. Fix colour issue in load/save dialog.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2894 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
13d1607349
commit
4dd2dfc63d
|
@ -56,7 +56,10 @@
|
|||
#define WZCOL_GREEN psPalette[7]
|
||||
#define WZCOL_RED psPalette[8]
|
||||
#define WZCOL_YELLOW psPalette[9]
|
||||
#define WZCOL_MAX 10
|
||||
#define WZCOL_MENU_BACKGROUND psPalette[10]
|
||||
#define WZCOL_MENU_BORDER psPalette[11]
|
||||
#define WZCOL_MENU_LOAD_BORDER psPalette[12]
|
||||
#define WZCOL_MAX 13
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
|
|
|
@ -141,6 +141,19 @@ void pie_SetColourDefines(void)
|
|||
WZCOL_HEALTH_HIGH = WZCOL_GREEN;
|
||||
WZCOL_HEALTH_MEDIUM = WZCOL_YELLOW;
|
||||
WZCOL_HEALTH_LOW = WZCOL_RED;
|
||||
|
||||
WZCOL_MENU_BACKGROUND.byte.a = 255;
|
||||
WZCOL_MENU_BACKGROUND.byte.r = 0;
|
||||
WZCOL_MENU_BACKGROUND.byte.g = 1;
|
||||
WZCOL_MENU_BACKGROUND.byte.b = 97;
|
||||
|
||||
WZCOL_MENU_BORDER.byte.a = 255;
|
||||
WZCOL_MENU_BORDER.byte.r = 0;
|
||||
WZCOL_MENU_BORDER.byte.g = 21;
|
||||
WZCOL_MENU_BORDER.byte.b = 240;
|
||||
|
||||
WZCOL_MENU_LOAD_BORDER = WZCOL_BLACK;
|
||||
WZCOL_MENU_LOAD_BORDER.byte.r = 133;
|
||||
}
|
||||
|
||||
void pal_ShutDown(void)
|
||||
|
|
|
@ -635,33 +635,29 @@ void removeWildcards(char *pStr)
|
|||
|
||||
static void displayLoadBanner(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
|
||||
{
|
||||
//UDWORD col;
|
||||
UBYTE col;
|
||||
PIELIGHT col;
|
||||
UDWORD x = xOffset+psWidget->x;
|
||||
UDWORD y = yOffset+psWidget->y;
|
||||
|
||||
if(psWidget->pUserData)
|
||||
{
|
||||
col = COL_GREEN;
|
||||
col = WZCOL_GREEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
col = COL_RED;
|
||||
col = WZCOL_MENU_LOAD_BORDER;
|
||||
}
|
||||
|
||||
iV_BoxFill(x,y,x+psWidget->width,y+psWidget->height,col);
|
||||
iV_BoxFill(x+2,y+2,x+psWidget->width-2,y+psWidget->height-2,COL_BLUE);
|
||||
|
||||
|
||||
pie_BoxFill(x, y, x + psWidget->width, y + psWidget->height, col);
|
||||
pie_BoxFill(x + 2,y + 2, x + psWidget->width - 2, y + psWidget->height - 2, WZCOL_MENU_BACKGROUND);
|
||||
}
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
static void displayLoadSlot(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
|
||||
{
|
||||
|
||||
UDWORD x = xOffset+psWidget->x;
|
||||
UDWORD y = yOffset+psWidget->y;
|
||||
// UWORD im = (UWORD)UNPACKDWORD_TRI_B((UDWORD)psWidget->pUserData);
|
||||
// UWORD im2= (UWORD)(UNPACKDWORD_TRI_C((UDWORD)psWidget->pUserData));
|
||||
char butString[64];
|
||||
|
||||
drawBlueBox(x,y,psWidget->width,psWidget->height); //draw box
|
||||
|
@ -680,11 +676,9 @@ static void displayLoadSlot(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UD
|
|||
|
||||
//draw text
|
||||
iV_DrawText( butString, x+4, y+17);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
static void displayLoadSaveEdit(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
|
||||
{
|
||||
|
@ -693,21 +687,13 @@ static void displayLoadSaveEdit(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset
|
|||
UDWORD w = psWidget->width;
|
||||
UDWORD h = psWidget->height;
|
||||
|
||||
iV_BoxFill(x,y,x+w,y+h,COL_RED);
|
||||
iV_BoxFill(x+1,y+1,x+w-1,y+h-1,COL_BLUE);
|
||||
pie_BoxFill(x, y, x + w, y + h, WZCOL_MENU_LOAD_BORDER);
|
||||
pie_BoxFill(x + 1, y + 1, x + w - 1, y + h - 1, WZCOL_MENU_BACKGROUND);
|
||||
}
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
void drawBlueBox(UDWORD x,UDWORD y, UDWORD w, UDWORD h)
|
||||
{
|
||||
UBYTE dark = COL_BLUE;
|
||||
UBYTE light = COL_LIGHTBLUE;
|
||||
|
||||
// box
|
||||
pie_BoxFillIndex(x-1,y-1,x+w+1,y+h+1,light);
|
||||
pie_BoxFillIndex(x,y,x+w,y+h,dark);
|
||||
pie_BoxFill(x - 1, y - 1, x + w + 1, y + h + 1, WZCOL_MENU_BORDER);
|
||||
pie_BoxFill(x, y , x + w, y + h, WZCOL_MENU_BACKGROUND);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue