(svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to WWT_INSET (credits to peter1138

for the aptly found name)
-Codechange: Remove the explicit numbering from WindowWidgetTypes
This commit is contained in:
Darkvater
2006-10-24 16:27:18 +00:00
parent c7c65ce6d5
commit 02a6df391d
14 changed files with 68 additions and 69 deletions

View File

@@ -221,8 +221,8 @@ void DrawWindowWidgets(const Window *w)
goto draw_default;
}
case WWT_TEXTBTN: /* WWT_TEXTBTN */
case WWT_4: {
case WWT_TEXTBTN:
case WWT_TEXTBTN_2: {
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : 0);
}
/* fall through */
@@ -230,14 +230,13 @@ void DrawWindowWidgets(const Window *w)
case WWT_LABEL: {
StringID str = wi->data;
if ((wi->type&WWT_MASK) == WWT_4 && clicked) str++;
if ((wi->type & WWT_MASK) == WWT_TEXTBTN_2 && clicked) str++;
DrawStringCentered(((r.left + r.right + 1) >> 1) + clicked, ((r.top + r.bottom + 1) >> 1) - 5 + clicked, str, 0);
//DrawStringCentered((r.left + r.right+1)>>1, ((r.top+r.bottom + 1)>>1) - 5, str, 0);
goto draw_default;
}
case WWT_6: {
case WWT_INSET: {
StringID str = wi->data;
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, FR_LOWERED | FR_DARKENED);