diff options
author | ludde <ludde@openttd.org> | 2005-07-15 15:09:52 +0000 |
---|---|---|
committer | ludde <ludde@openttd.org> | 2005-07-15 15:09:52 +0000 |
commit | 6246619185ae6e240dabb438a3861750038e0639 (patch) | |
tree | 37eff27994a6fc0a501ac19e29cb3cefde9dc65b /widget.c | |
parent | 275e2f477a2b1b7fca2b52722ce042aec01c1866 (diff) | |
download | openttd-6246619185ae6e240dabb438a3861750038e0639.tar.xz |
(svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the new string system.
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
Diffstat (limited to 'widget.c')
-rw-r--r-- | widget.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -157,12 +157,8 @@ void DrawWindowWidgets(Window *w) const Widget *wi; DrawPixelInfo *dpi = _cur_dpi; Rect r; - uint32 dparam_backup[20]; uint32 cur_click, cur_disabled, cur_hidden; - if (w->desc_flags & WDF_RESTORE_DPARAM) - COPY_OUT_DPARAM(dparam_backup, 0, lengthof(dparam_backup)); - wi = w->widget; cur_click = w->click_state; @@ -207,7 +203,7 @@ void DrawWindowWidgets(Window *w) 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 restore_dparam; + goto draw_default; } case WWT_6: { @@ -216,7 +212,6 @@ void DrawWindowWidgets(Window *w) if ((str = wi->unkA) != 0) { DrawString(r.left+2, r.top+1, str, 0); - goto restore_dparam; } goto draw_default; } @@ -396,7 +391,7 @@ void DrawWindowWidgets(Window *w) GfxFillRect(r.left+1, r.bottom-1, r.right-1, r.bottom-1, c1); GfxFillRect(r.left, r.bottom, r.right, r.bottom, c2); - goto restore_dparam; + goto draw_default; } case WWT_STICKYBOX: { @@ -425,9 +420,6 @@ void DrawWindowWidgets(Window *w) } DrawStringCentered( (r.left+r.right+1)>>1, r.top+2, wi->unkA, 0x84); -restore_dparam:; - if (w->desc_flags & WDF_RESTORE_DPARAM) - COPY_IN_DPARAM(0, dparam_backup, lengthof(dparam_backup)); draw_default:; if (cur_disabled & 1) { GfxFillRect(r.left+1, r.top+1, r.right-1, r.bottom-1, _color_list[wi->color&0xF].unk2 | 0x8000); |