mirror of https://github.com/OpenTTD/OpenTTD
(svn r12405) -Codechange: some coding style and 'untodoifying' some comments that were certainly not todos.
parent
67190b2906
commit
4a16a8b948
102
src/widget.cpp
102
src/widget.cpp
|
@ -54,7 +54,7 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
|
||||||
Scrollbar *sb;
|
Scrollbar *sb;
|
||||||
|
|
||||||
switch (wi->type) {
|
switch (wi->type) {
|
||||||
case WWT_SCROLLBAR: {
|
case WWT_SCROLLBAR:
|
||||||
/* vertical scroller */
|
/* vertical scroller */
|
||||||
w->flags4 &= ~WF_HSCROLL;
|
w->flags4 &= ~WF_HSCROLL;
|
||||||
w->flags4 &= ~WF_SCROLL2;
|
w->flags4 &= ~WF_SCROLL2;
|
||||||
|
@ -63,8 +63,8 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
|
||||||
pos = y;
|
pos = y;
|
||||||
sb = &w->vscroll;
|
sb = &w->vscroll;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case WWT_SCROLL2BAR: {
|
case WWT_SCROLL2BAR:
|
||||||
/* 2nd vertical scroller */
|
/* 2nd vertical scroller */
|
||||||
w->flags4 &= ~WF_HSCROLL;
|
w->flags4 &= ~WF_HSCROLL;
|
||||||
w->flags4 |= WF_SCROLL2;
|
w->flags4 |= WF_SCROLL2;
|
||||||
|
@ -73,8 +73,8 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
|
||||||
pos = y;
|
pos = y;
|
||||||
sb = &w->vscroll2;
|
sb = &w->vscroll2;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case WWT_HSCROLLBAR: {
|
case WWT_HSCROLLBAR:
|
||||||
/* horizontal scroller */
|
/* horizontal scroller */
|
||||||
w->flags4 &= ~WF_SCROLL2;
|
w->flags4 &= ~WF_SCROLL2;
|
||||||
w->flags4 |= WF_HSCROLL;
|
w->flags4 |= WF_HSCROLL;
|
||||||
|
@ -83,8 +83,8 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
|
||||||
pos = x;
|
pos = x;
|
||||||
sb = &w->hscroll;
|
sb = &w->hscroll;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
default: return; //this should never happen
|
default: NOT_REACHED();
|
||||||
}
|
}
|
||||||
if (pos <= mi+9) {
|
if (pos <= mi+9) {
|
||||||
/* Pressing the upper button? */
|
/* Pressing the upper button? */
|
||||||
|
@ -216,17 +216,15 @@ void DrawWindowWidgets(const Window *w)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case WWT_PANEL: {
|
case WWT_PANEL:
|
||||||
assert(wi->data == 0);
|
assert(wi->data == 0);
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case WWT_TEXTBTN:
|
case WWT_TEXTBTN:
|
||||||
case WWT_TEXTBTN_2: {
|
case WWT_TEXTBTN_2:
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
}
|
/* FALL THROUGH */
|
||||||
/* fall through */
|
|
||||||
|
|
||||||
case WWT_LABEL: {
|
case WWT_LABEL: {
|
||||||
StringID str = wi->data;
|
StringID str = wi->data;
|
||||||
|
@ -253,28 +251,24 @@ void DrawWindowWidgets(const Window *w)
|
||||||
}
|
}
|
||||||
|
|
||||||
case WWT_MATRIX: {
|
case WWT_MATRIX: {
|
||||||
int c, d, ctr;
|
|
||||||
int x, amt1, amt2;
|
|
||||||
int color;
|
|
||||||
|
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
|
|
||||||
c = GB(wi->data, 0, 8);
|
int c = GB(wi->data, 0, 8);
|
||||||
amt1 = (wi->right - wi->left + 1) / c;
|
int amt1 = (wi->right - wi->left + 1) / c;
|
||||||
|
|
||||||
d = GB(wi->data, 8, 8);
|
int d = GB(wi->data, 8, 8);
|
||||||
amt2 = (wi->bottom - wi->top + 1) / d;
|
int amt2 = (wi->bottom - wi->top + 1) / d;
|
||||||
|
|
||||||
color = _colour_gradient[wi->color & 0xF][6];
|
int color = _colour_gradient[wi->color & 0xF][6];
|
||||||
|
|
||||||
x = r.left;
|
int x = r.left;
|
||||||
for (ctr = c; ctr > 1; ctr--) {
|
for (int ctr = c; ctr > 1; ctr--) {
|
||||||
x += amt1;
|
x += amt1;
|
||||||
GfxFillRect(x, r.top + 1, x, r.bottom - 1, color);
|
GfxFillRect(x, r.top + 1, x, r.bottom - 1, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
x = r.top;
|
x = r.top;
|
||||||
for (ctr = d; ctr > 1; ctr--) {
|
for (int ctr = d; ctr > 1; ctr--) {
|
||||||
x += amt2;
|
x += amt2;
|
||||||
GfxFillRect(r.left + 1, x, r.right - 1, x, color);
|
GfxFillRect(r.left + 1, x, r.right - 1, x, color);
|
||||||
}
|
}
|
||||||
|
@ -282,13 +276,13 @@ void DrawWindowWidgets(const Window *w)
|
||||||
color = _colour_gradient[wi->color & 0xF][4];
|
color = _colour_gradient[wi->color & 0xF][4];
|
||||||
|
|
||||||
x = r.left - 1;
|
x = r.left - 1;
|
||||||
for (ctr = c; ctr > 1; ctr--) {
|
for (int ctr = c; ctr > 1; ctr--) {
|
||||||
x += amt1;
|
x += amt1;
|
||||||
GfxFillRect(x, r.top + 1, x, r.bottom - 1, color);
|
GfxFillRect(x, r.top + 1, x, r.bottom - 1, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
x = r.top - 1;
|
x = r.top - 1;
|
||||||
for (ctr = d; ctr > 1; ctr--) {
|
for (int ctr = d; ctr > 1; ctr--) {
|
||||||
x += amt2;
|
x += amt2;
|
||||||
GfxFillRect(r.left + 1, x, r.right - 1, x, color);
|
GfxFillRect(r.left + 1, x, r.right - 1, x, color);
|
||||||
}
|
}
|
||||||
|
@ -298,11 +292,8 @@ void DrawWindowWidgets(const Window *w)
|
||||||
|
|
||||||
/* vertical scrollbar */
|
/* vertical scrollbar */
|
||||||
case WWT_SCROLLBAR: {
|
case WWT_SCROLLBAR: {
|
||||||
Point pt;
|
|
||||||
int c1, c2;
|
|
||||||
|
|
||||||
assert(wi->data == 0);
|
assert(wi->data == 0);
|
||||||
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
|
assert(r.right - r.left == 11); // To ensure the same sizes are used everywhere!
|
||||||
|
|
||||||
/* draw up/down buttons */
|
/* draw up/down buttons */
|
||||||
clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_UP);
|
clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_UP);
|
||||||
|
@ -313,8 +304,8 @@ void DrawWindowWidgets(const Window *w)
|
||||||
DrawFrameRect(r.left, r.bottom - 9, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.bottom - 9, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
DoDrawString(DOWNARROW, r.left + 2 + clicked, r.bottom - 9 + clicked, TC_BLACK);
|
DoDrawString(DOWNARROW, r.left + 2 + clicked, r.bottom - 9 + clicked, TC_BLACK);
|
||||||
|
|
||||||
c1 = _colour_gradient[wi->color & 0xF][3];
|
int c1 = _colour_gradient[wi->color & 0xF][3];
|
||||||
c2 = _colour_gradient[wi->color & 0xF][7];
|
int c2 = _colour_gradient[wi->color & 0xF][7];
|
||||||
|
|
||||||
/* draw "shaded" background */
|
/* draw "shaded" background */
|
||||||
GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
|
GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
|
||||||
|
@ -326,16 +317,14 @@ void DrawWindowWidgets(const Window *w)
|
||||||
GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
|
GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
|
||||||
GfxFillRect(r.left + 8, r.top + 10, r.left + 8, r.bottom - 10, c2);
|
GfxFillRect(r.left + 8, r.top + 10, r.left + 8, r.bottom - 10, c2);
|
||||||
|
|
||||||
pt = HandleScrollbarHittest(&w->vscroll, r.top, r.bottom);
|
Point pt = HandleScrollbarHittest(&w->vscroll, r.top, r.bottom);
|
||||||
DrawFrameRect(r.left, pt.x, r.right, pt.y, wi->color, (w->flags4 & (WF_SCROLL_MIDDLE | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_MIDDLE ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, pt.x, r.right, pt.y, wi->color, (w->flags4 & (WF_SCROLL_MIDDLE | WF_HSCROLL | WF_SCROLL2)) == WF_SCROLL_MIDDLE ? FR_LOWERED : FR_NONE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WWT_SCROLL2BAR: {
|
|
||||||
Point pt;
|
|
||||||
int c1, c2;
|
|
||||||
|
|
||||||
|
case WWT_SCROLL2BAR: {
|
||||||
assert(wi->data == 0);
|
assert(wi->data == 0);
|
||||||
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
|
assert(r.right - r.left == 11); // To ensure the same sizes are used everywhere!
|
||||||
|
|
||||||
/* draw up/down buttons */
|
/* draw up/down buttons */
|
||||||
clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_UP | WF_SCROLL2));
|
clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_UP | WF_SCROLL2));
|
||||||
|
@ -346,8 +335,8 @@ void DrawWindowWidgets(const Window *w)
|
||||||
DrawFrameRect(r.left, r.bottom - 9, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.bottom - 9, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
DoDrawString(DOWNARROW, r.left + 2 + clicked, r.bottom - 9 + clicked, TC_BLACK);
|
DoDrawString(DOWNARROW, r.left + 2 + clicked, r.bottom - 9 + clicked, TC_BLACK);
|
||||||
|
|
||||||
c1 = _colour_gradient[wi->color & 0xF][3];
|
int c1 = _colour_gradient[wi->color & 0xF][3];
|
||||||
c2 = _colour_gradient[wi->color & 0xF][7];
|
int c2 = _colour_gradient[wi->color & 0xF][7];
|
||||||
|
|
||||||
/* draw "shaded" background */
|
/* draw "shaded" background */
|
||||||
GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
|
GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
|
||||||
|
@ -359,18 +348,15 @@ void DrawWindowWidgets(const Window *w)
|
||||||
GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
|
GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
|
||||||
GfxFillRect(r.left + 8, r.top + 10, r.left + 8, r.bottom - 10, c2);
|
GfxFillRect(r.left + 8, r.top + 10, r.left + 8, r.bottom - 10, c2);
|
||||||
|
|
||||||
pt = HandleScrollbarHittest(&w->vscroll2, r.top, r.bottom);
|
Point pt = HandleScrollbarHittest(&w->vscroll2, r.top, r.bottom);
|
||||||
DrawFrameRect(r.left, pt.x, r.right, pt.y, wi->color, (w->flags4 & (WF_SCROLL_MIDDLE | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_MIDDLE | WF_SCROLL2) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, pt.x, r.right, pt.y, wi->color, (w->flags4 & (WF_SCROLL_MIDDLE | WF_HSCROLL | WF_SCROLL2)) == (WF_SCROLL_MIDDLE | WF_SCROLL2) ? FR_LOWERED : FR_NONE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* horizontal scrollbar */
|
/* horizontal scrollbar */
|
||||||
case WWT_HSCROLLBAR: {
|
case WWT_HSCROLLBAR: {
|
||||||
Point pt;
|
|
||||||
int c1, c2;
|
|
||||||
|
|
||||||
assert(wi->data == 0);
|
assert(wi->data == 0);
|
||||||
assert(r.bottom - r.top == 11); // XXX - to ensure the same sizes are used everywhere!
|
assert(r.bottom - r.top == 11); // To ensure the same sizes are used everywhere!
|
||||||
|
|
||||||
clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL)) == (WF_SCROLL_UP | WF_HSCROLL));
|
clicked = ((w->flags4 & (WF_SCROLL_UP | WF_HSCROLL)) == (WF_SCROLL_UP | WF_HSCROLL));
|
||||||
DrawFrameRect(r.left, r.top, r.left + 9, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.top, r.left + 9, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
|
@ -380,8 +366,8 @@ void DrawWindowWidgets(const Window *w)
|
||||||
DrawFrameRect(r.right - 9, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.right - 9, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
DrawSprite(SPR_ARROW_RIGHT, PAL_NONE, r.right - 8 + clicked, r.top + 1 + clicked);
|
DrawSprite(SPR_ARROW_RIGHT, PAL_NONE, r.right - 8 + clicked, r.top + 1 + clicked);
|
||||||
|
|
||||||
c1 = _colour_gradient[wi->color & 0xF][3];
|
int c1 = _colour_gradient[wi->color & 0xF][3];
|
||||||
c2 = _colour_gradient[wi->color & 0xF][7];
|
int c2 = _colour_gradient[wi->color & 0xF][7];
|
||||||
|
|
||||||
/* draw "shaded" background */
|
/* draw "shaded" background */
|
||||||
GfxFillRect(r.left + 10, r.top, r.right - 10, r.bottom, c2);
|
GfxFillRect(r.left + 10, r.top, r.right - 10, r.bottom, c2);
|
||||||
|
@ -394,7 +380,7 @@ void DrawWindowWidgets(const Window *w)
|
||||||
GfxFillRect(r.left + 10, r.top + 8, r.right - 10, r.top + 8, c2);
|
GfxFillRect(r.left + 10, r.top + 8, r.right - 10, r.top + 8, c2);
|
||||||
|
|
||||||
/* draw actual scrollbar */
|
/* draw actual scrollbar */
|
||||||
pt = HandleScrollbarHittest(&w->hscroll, r.left, r.right);
|
Point pt = HandleScrollbarHittest(&w->hscroll, r.left, r.right);
|
||||||
DrawFrameRect(pt.x, r.top, pt.y, r.bottom, wi->color, (w->flags4 & (WF_SCROLL_MIDDLE | WF_HSCROLL)) == (WF_SCROLL_MIDDLE | WF_HSCROLL) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(pt.x, r.top, pt.y, r.bottom, wi->color, (w->flags4 & (WF_SCROLL_MIDDLE | WF_HSCROLL)) == (WF_SCROLL_MIDDLE | WF_HSCROLL) ? FR_LOWERED : FR_NONE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -402,13 +388,12 @@ void DrawWindowWidgets(const Window *w)
|
||||||
|
|
||||||
case WWT_FRAME: {
|
case WWT_FRAME: {
|
||||||
const StringID str = wi->data;
|
const StringID str = wi->data;
|
||||||
int c1, c2;
|
|
||||||
int x2 = r.left; // by default the left side is the left side of the widget
|
int x2 = r.left; // by default the left side is the left side of the widget
|
||||||
|
|
||||||
if (str != STR_NULL) x2 = DrawString(r.left + 6, r.top, str, TC_FROMSTRING);
|
if (str != STR_NULL) x2 = DrawString(r.left + 6, r.top, str, TC_FROMSTRING);
|
||||||
|
|
||||||
c1 = _colour_gradient[wi->color][3];
|
int c1 = _colour_gradient[wi->color][3];
|
||||||
c2 = _colour_gradient[wi->color][7];
|
int c2 = _colour_gradient[wi->color][7];
|
||||||
|
|
||||||
/* Line from upper left corner to start of text */
|
/* Line from upper left corner to start of text */
|
||||||
GfxFillRect(r.left, r.top + 4, r.left + 4, r.top + 4, c1);
|
GfxFillRect(r.left, r.top + 4, r.left + 4, r.top + 4, c1);
|
||||||
|
@ -432,39 +417,37 @@ void DrawWindowWidgets(const Window *w)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case WWT_STICKYBOX: {
|
case WWT_STICKYBOX:
|
||||||
assert(wi->data == 0);
|
assert(wi->data == 0);
|
||||||
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
|
assert(r.right - r.left == 11); // To ensure the same sizes are used everywhere!
|
||||||
|
|
||||||
clicked = !!(w->flags4 & WF_STICKY);
|
clicked = !!(w->flags4 & WF_STICKY);
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
DrawSprite((clicked) ? SPR_PIN_UP : SPR_PIN_DOWN, PAL_NONE, r.left + 2 + clicked, r.top + 3 + clicked);
|
DrawSprite((clicked) ? SPR_PIN_UP : SPR_PIN_DOWN, PAL_NONE, r.left + 2 + clicked, r.top + 3 + clicked);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case WWT_RESIZEBOX: {
|
case WWT_RESIZEBOX:
|
||||||
assert(wi->data == 0);
|
assert(wi->data == 0);
|
||||||
assert(r.right - r.left == 11); // XXX - to ensure the same sizes are used everywhere!
|
assert(r.right - r.left == 11); // To ensure the same sizes are used everywhere!
|
||||||
|
|
||||||
clicked = !!(w->flags4 & WF_SIZING);
|
clicked = !!(w->flags4 & WF_SIZING);
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, (clicked) ? FR_LOWERED : FR_NONE);
|
||||||
DrawSprite(SPR_WINDOW_RESIZE, PAL_NONE, r.left + 3 + clicked, r.top + 3 + clicked);
|
DrawSprite(SPR_WINDOW_RESIZE, PAL_NONE, r.left + 3 + clicked, r.top + 3 + clicked);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case WWT_CLOSEBOX: {
|
case WWT_CLOSEBOX: {
|
||||||
const StringID str = wi->data;
|
const StringID str = wi->data;
|
||||||
|
|
||||||
assert(str == STR_00C5 || str == STR_00C6); // black or silver cross
|
assert(str == STR_00C5 || str == STR_00C6); // black or silver cross
|
||||||
assert(r.right - r.left == 10); // ensure the same sizes are used everywhere
|
assert(r.right - r.left == 10); // To ensure the same sizes are used everywhere
|
||||||
|
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, FR_NONE);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, FR_NONE);
|
||||||
DrawString(r.left + 2, r.top + 2, str, TC_FROMSTRING);
|
DrawString(r.left + 2, r.top + 2, str, TC_FROMSTRING);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case WWT_CAPTION: {
|
case WWT_CAPTION:
|
||||||
assert(r.bottom - r.top == 13); // XXX - to ensure the same sizes are used everywhere!
|
assert(r.bottom - r.top == 13); // To ensure the same sizes are used everywhere!
|
||||||
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, FR_BORDERONLY);
|
DrawFrameRect(r.left, r.top, r.right, r.bottom, wi->color, FR_BORDERONLY);
|
||||||
DrawFrameRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, wi->color, (w->caption_color == 0xFF) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY);
|
DrawFrameRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, wi->color, (w->caption_color == 0xFF) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY);
|
||||||
|
|
||||||
|
@ -474,7 +457,6 @@ void DrawWindowWidgets(const Window *w)
|
||||||
|
|
||||||
DrawStringCenteredTruncated(r.left + 2, r.right - 2, r.top + 2, wi->data, 0x84);
|
DrawStringCenteredTruncated(r.left + 2, r.right - 2, r.top + 2, wi->data, 0x84);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case WWT_DROPDOWN: {
|
case WWT_DROPDOWN: {
|
||||||
assert(r.bottom - r.top == 11); // ensure consistent size
|
assert(r.bottom - r.top == 11); // ensure consistent size
|
||||||
|
|
Loading…
Reference in New Issue