Mercurial > hg > openttd
changeset 8591:b63b1563c344 draft
(svn r12172) -Codechange: Allow buttons to resize in NewGRF settings window
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Mon, 18 Feb 2008 09:16:02 +0000 |
parents | 0bbc9ad3a6a0 |
children | 8d18ff60b07a |
files | src/newgrf_gui.cpp |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -281,7 +281,7 @@ { bool disable_all = WP(w, newgrf_d).sel == NULL || !WP(w, newgrf_d).editable; - w->SetWidgetDisabledState(3, !WP(w, newgrf_d).editable); + w->SetWidgetDisabledState(SNGRFS_ADD, !WP(w, newgrf_d).editable); w->SetWidgetsDisabledState(disable_all, SNGRFS_REMOVE, SNGRFS_MOVE_UP, @@ -530,6 +530,10 @@ break; case WE_RESIZE: + if (e->we.sizing.diff.x != 0) { + ResizeButtons(w, SNGRFS_ADD, SNGRFS_MOVE_DOWN); + ResizeButtons(w, SNGRFS_SET_PARAMETERS, SNGRFS_APPLY_CHANGES); + } w->vscroll.cap += e->we.sizing.diff.y / 14; w->widget[SNGRFS_FILE_LIST].data = (w->vscroll.cap << 8) + 1; SetupNewGRFWindow(w); @@ -545,7 +549,7 @@ { WWT_PUSHTXTBTN, RESIZE_NONE, 3, 10, 79, 16, 27, STR_NEWGRF_ADD, STR_NEWGRF_ADD_TIP }, // SNGRFS_ADD { WWT_PUSHTXTBTN, RESIZE_NONE, 3, 80, 149, 16, 27, STR_NEWGRF_REMOVE, STR_NEWGRF_REMOVE_TIP }, // SNGRFS_REMOVE { WWT_PUSHTXTBTN, RESIZE_NONE, 3, 150, 219, 16, 27, STR_NEWGRF_MOVEUP, STR_NEWGRF_MOVEUP_TIP }, // SNGRFS_MOVE_UP -{ WWT_PUSHTXTBTN, RESIZE_NONE, 3, 220, 289, 16, 27, STR_NEWGRF_MOVEDOWN, STR_NEWGRF_MOVEDOWN_TIP }, // SNGRFS_MOVE_DOWN +{ WWT_PUSHTXTBTN, RESIZE_RIGHT, 3, 220, 289, 16, 27, STR_NEWGRF_MOVEDOWN, STR_NEWGRF_MOVEDOWN_TIP }, // SNGRFS_MOVE_DOWN { WWT_MATRIX, RESIZE_RB, 10, 0, 287, 30, 99, 0x501, STR_NEWGRF_FILE_TIP }, // SNGRFS_FILE_LIST { WWT_SCROLLBAR, RESIZE_LRB, 10, 288, 299, 30, 99, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST }, // SNGRFS_SCROLLBAR { WWT_PANEL, RESIZE_RTB, 10, 0, 299, 100, 212, STR_NULL, STR_NULL }, // SNGRFS_NEWGRF_INFO