GUI cleanup

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3497 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2008-01-16 18:54:16 +00:00
parent 3cdcf273a4
commit 08c2a06822
14 changed files with 8 additions and 158 deletions

View File

@ -70,7 +70,9 @@
#define WZCOL_RADAR_BACKGROUND psPalette[24]
#define WZCOL_MAP_OUTLINE_OK psPalette[25]
#define WZCOL_MAP_OUTLINE_BAD psPalette[26]
#define WZCOL_MAX 27
#define WZCOL_KEYMAP_ACTIVE psPalette[27]
#define WZCOL_KEYMAP_FIXED psPalette[28]
#define WZCOL_MAX 29
//*************************************************************************

View File

@ -151,6 +151,9 @@ void pie_SetColourDefines(void)
WZCOL_MAP_OUTLINE_OK = WZCOL_WHITE;
WZCOL_MAP_OUTLINE_BAD = WZCOL_RED;
WZCOL_KEYMAP_ACTIVE = pal_Colour(0, 128, 0);
WZCOL_KEYMAP_FIXED = pal_Colour(128, 0, 0);
}
PIELIGHT pal_SetBrightness(UBYTE brightness)

View File

@ -308,7 +308,6 @@ static BOOL formCreateTabbed(W_TABFORM **ppsWidget, W_FORMINIT *psInit)
(*ppsWidget)->majorPos = psInit->majorPos;
(*ppsWidget)->minorPos = psInit->minorPos;
(*ppsWidget)->pTabDisplay = psInit->pTabDisplay;
(*ppsWidget)->pFormDisplay = psInit->pFormDisplay;
(*ppsWidget)->TabMultiplier = psInit->TabMultiplier;
(*ppsWidget)->numButtons = psInit->numButtons;
(*ppsWidget)->numStats = psInit->numStats;
@ -1574,38 +1573,6 @@ void formDisplayTabbed(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGH
y1 -= psForm->tabMinorThickness - psForm->tabVertOffset;
}
/* Adjust for where the tabs are */
// if (psForm->majorPos == WFORM_TABLEFT || psForm->minorPos == WFORM_TABLEFT)
// {
// x0 += psForm->tabThickness - psForm->tabHorzOffset;
// }
// if (psForm->majorPos == WFORM_TABRIGHT || psForm->minorPos == WFORM_TABRIGHT)
// {
// x1 -= psForm->tabThickness - psForm->tabHorzOffset;
// }
// if (psForm->majorPos == WFORM_TABTOP || psForm->minorPos == WFORM_TABTOP)
// {
// y0 += psForm->tabThickness - psForm->tabVertOffset;
// }
// if (psForm->majorPos == WFORM_TABBOTTOM || psForm->minorPos == WFORM_TABBOTTOM)
// {
// y1 -= psForm->tabThickness - psForm->tabVertOffset;
// }
if(psForm->pFormDisplay) {
psForm->pFormDisplay((WIDGET *)psForm, xOffset, yOffset, psForm->aColours);
} else {
/* Draw the form outline */
if (!(psForm->style & WFORM_INVISIBLE))
{
pie_BoxFill(x0, y0, x1, y1, pColours[WCOL_BKGRND]);
iV_Line(x0,y1,x0,y0, pColours[WCOL_LIGHT]);
iV_Line(x0,y0,x1,y0, pColours[WCOL_LIGHT]);
iV_Line(x1,y0,x1,y1, pColours[WCOL_DARK]);
iV_Line(x1,y1,x0,y1, pColours[WCOL_DARK]);
}
}
/* Draw the major tabs */
switch (psForm->majorPos)
{

View File

@ -95,7 +95,6 @@ typedef struct _w_tabform
UWORD numButtons; //# of buttons per form
W_MAJORTAB asMajor[WFORM_MAXMAJOR]; // The major tab information
TAB_DISPLAY pTabDisplay; // Optional callback for display tabs.
WIDGET_DISPLAY pFormDisplay; // Optional callback to display the form.
} W_TABFORM;

View File

@ -978,7 +978,6 @@ static BOOL _intAddTemplateForm(DROID_TEMPLATE *psSelected)
sFormInit.majorOffset = DES_TAB_LEFTOFFSET;
sFormInit.tabVertOffset = (DES_TAB_HEIGHT/2); //(DES_TAB_HEIGHT/2)+2;
sFormInit.tabMajorThickness = DES_TAB_HEIGHT;
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
for (i=0; i< sFormInit.numMajor; i++)
@ -2096,7 +2095,6 @@ static BOOL intAddComponentForm(UDWORD numButtons)
sFormInit.majorOffset = DES_TAB_LEFTOFFSET;
sFormInit.tabVertOffset = (DES_TAB_HEIGHT/2);
sFormInit.tabMajorThickness = DES_TAB_HEIGHT;
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
for (i=0; i< sFormInit.numMajor; i++)
@ -4625,7 +4623,6 @@ void intDisplayDesignForm(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIEL
//AdjustTabFormSize(Form,&x0,&y0,&x1,&y1);
//RenderWindowFrame(&FrameDesignView,x0,y0,x1-x0,y1-y0);
RenderWindowFrame(&FrameNormal,x0,y0,x1-x0,y1-y0);
}

View File

@ -4526,7 +4526,6 @@ static BOOL intAddObjectWindow(BASE_OBJECT *psObjects, BASE_OBJECT *psSelected,B
sFormInit.tabVertOffset = (OBJ_TABHEIGHT/2);
sFormInit.tabMajorThickness = OBJ_TABHEIGHT;
sFormInit.tabMajorGap = OBJ_TABOFFSET;
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
@ -5790,7 +5789,6 @@ if (numForms(numStats, butPerForm)>8) //only want these buttons when tab count >
sFormInit.tabVertOffset = (OBJ_TABHEIGHT/2);
sFormInit.tabMajorThickness = OBJ_TABHEIGHT;
sFormInit.tabMajorGap = OBJ_TABOFFSET;
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
//Build menu can have up to 80 stats - so can research now 13/09/99 AB

View File

@ -1260,23 +1260,6 @@ void AdjustTabFormSize(W_TABFORM *Form,UDWORD *x0,UDWORD *y0,UDWORD *x1,UDWORD *
}
void intDisplayObjectForm(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *pColours)
{
// W_TABFORM *Form = (W_TABFORM*)psWidget;
// UDWORD x0,y0,x1,y1;
//
// x0 = xOffset+Form->x;
// y0 = yOffset+Form->y;
// x1 = x0 + Form->width;
// y1 = y0 + Form->height;
//
// AdjustTabFormSize(Form,&x0,&y0,&x1,&y1);
//
// RenderWindowFrame(&FrameObject,x0,y0,x1-x0,y1-y0);
}
// Widget callback function to do the open form animation. Doesn't just open Plain Forms!!
//
void intOpenPlainForm(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *pColours)

View File

@ -191,8 +191,6 @@ void intDisplayStatsButton(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIE
void AdjustTabFormSize(W_TABFORM *Form,UDWORD *x0,UDWORD *y0,UDWORD *x1,UDWORD *y1);
void intDisplayObjectForm(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *pColours);
void intDisplayStatsForm(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *pColours);
void intOpenPlainForm(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *pColours);

View File

@ -343,7 +343,6 @@ static BOOL intAddMessageForm(BOOL playCurrent)
sFormInit.aNumMinors[i] = 1;
}
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
@ -567,7 +566,6 @@ BOOL intAddMessageView(MESSAGE * psMessage)
sFormInit.width, sFormInit.height,
FALSE, &cur_seq, &cur_seqpage));
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;

View File

@ -106,92 +106,6 @@ IMAGEFRAME FrameRadar = {
};
//IMAGEFRAME FrameObject = {
// 0,0, 0,0,
// -1,
// -1,
// -1,
// -1,
// -1, FR_SOLID,
// -1, FR_SOLID,
// -1, FR_SOLID,
// -1, FR_SOLID,
// {{FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0}},
//};
//
//IMAGEFRAME FrameStats = {
// 0,0, 0,0,
// -1,
// -1,
// -1,
// -1,
// IMAGE_FRAME_HT, FR_SOLID,
// IMAGE_FRAME_VR, FR_SOLID,
// IMAGE_FRAME_HB, FR_SOLID,
// IMAGE_FRAME_VL, FR_SOLID,
// {{FR_FRAME, 8,3, -6,-5 ,190},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0}},
//};
//
//IMAGEFRAME FrameDesignView = {
// 0,0, 0,0,
// IMAGE_FRAME_VC0,
// IMAGE_FRAME_VC1,
// IMAGE_FRAME_VC2,
// IMAGE_FRAME_VC3,
// IMAGE_FRAME_HT2, FR_SOLID,
// IMAGE_FRAME_VR2, FR_SOLID,
// IMAGE_FRAME_HB2, FR_SOLID,
// IMAGE_FRAME_VL2, FR_SOLID,
// {{FR_FRAME, 0,0, 0,0, 1},
// {FR_FRAME, 0,0, 0,0 ,1},
// {FR_FRAME, 0,0, 0,0 ,1},
// {FR_FRAME, 0,0, 0,0 ,1},
// {FR_FRAME, 0,0, 0,0 ,1}},
//};
//
//IMAGEFRAME FrameDesignHilight = {
// 0,0, 0,0,
// IMAGE_FRAME_HC0,
// IMAGE_FRAME_HC1,
// IMAGE_FRAME_HC2,
// IMAGE_FRAME_HC3,
// IMAGE_FRAME_HTH, FR_SOLID,
// IMAGE_FRAME_VRH, FR_SOLID,
// IMAGE_FRAME_HBH, FR_SOLID,
// IMAGE_FRAME_VLH, FR_SOLID,
// {{FR_FRAME, 0,0, 0,0, 1},
// {FR_FRAME, 0,0, 0,0 ,1},
// {FR_FRAME, 0,0, 0,0 ,1},
// {FR_FRAME, 0,0, 0,0 ,1},
// {FR_FRAME, 0,0, 0,0 ,1}},
//};
//
//IMAGEFRAME FrameText = {
// 0,0, 0,0,
// -1,
// -1,
// IMAGE_FRAME_C3,
// IMAGE_FRAME_C2,
// -1, FR_SOLID,
// IMAGE_FRAME_VR, FR_SOLID,
// IMAGE_FRAME_HB, FR_SOLID,
// IMAGE_FRAME_VL, FR_SOLID,
// {{FR_FRAME, 0,1, 0,-1 ,224},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0},
// {FR_IGNORE, 0,0, 0,0 ,0}},
//};
// Tab definitions, defines graphics to use for major and minor tabs.
TABDEF StandardTab = {
IMAGE_TAB1, // Major tab normal.

View File

@ -319,11 +319,11 @@ void displayKeyMap(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *p
if(psMapping == selectedKeyMap)
{
pie_BoxFillIndex(x,y,x+w,y+h,COL_GREEN);
pie_BoxFill(x, y, x + w, y + h, WZCOL_KEYMAP_ACTIVE);
}
else if(psMapping->status == KEYMAP_ALWAYS || psMapping->status == KEYMAP_ALWAYS_PROCESS)
{
pie_BoxFillIndex(x,y,x+w,y+h,COL_RED);
pie_BoxFill(x, y , x + w, y + h, WZCOL_KEYMAP_FIXED);
}
else
{
@ -339,8 +339,6 @@ void displayKeyMap(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, PIELIGHT *p
// draw binding
keyMapToString(sKey,psMapping);
iV_DrawText(sKey, x + 370, y + (psWidget->height / 2) + 3);
return;
}
// ////////////////////////////////////////////////////////////////////////////
@ -421,7 +419,6 @@ BOOL startKeyMapEditor(BOOL first)
sFormInit.majorOffset = OBJ_TABOFFSET;
sFormInit.tabVertOffset = (OBJ_TABHEIGHT/2);
sFormInit.tabMajorThickness = OBJ_TABHEIGHT;
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
for (i=0; i< sFormInit.numMajor; i++)

View File

@ -203,7 +203,6 @@ BOOL startLimitScreen(void)
sFormInit.majorOffset = OBJ_TABOFFSET;
sFormInit.tabVertOffset = (OBJ_TABHEIGHT/2); //(DES_TAB_HEIGHT/2)+2;
sFormInit.tabMajorThickness = OBJ_TABHEIGHT;
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
for (i=0; i< sFormInit.numMajor; i++)

View File

@ -429,7 +429,6 @@ void addMultiRequest(const char* searchDir, const char* fileExtension, UDWORD mo
sFormInit.majorOffset = OBJ_TABOFFSET;
sFormInit.tabVertOffset = (OBJ_TABHEIGHT/2);
sFormInit.tabMajorThickness = OBJ_TABHEIGHT;
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
for (i = 0; i < sFormInit.numMajor; ++i)

View File

@ -585,7 +585,6 @@ BOOL intAddTransButtonForm(void)
sFormInit.aNumMinors[i] = 1;
}
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
@ -727,7 +726,6 @@ BOOL intAddTransContentsForm(void)
sFormInit.aNumMinors[i] = 1;
}
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &StandardTab;
sFormInit.pTabDisplay = intDisplayTab;
@ -923,8 +921,6 @@ BOOL intAddDroidsAvailForm(void)
sFormInit.aNumMinors[i] = 1;
}
sFormInit.pFormDisplay = intDisplayObjectForm;
sFormInit.pUserData = &SmallTab;
sFormInit.pTabDisplay = intDisplayTab;