(svn r1478) -Fix: [1099195] mouse-wheel in train replace window. Scrollbar1 and Scrollbar2 now work independently. You can only scroll on list and scrollbar itself; scrollbar must be next widget of the list.

-Fix: updated the few gui's that didn't have the scrollbar right after the listbox.
This commit is contained in:
darkvater
2005-01-11 00:24:27 +00:00
parent 38da06301d
commit 085563653f
8 changed files with 74 additions and 67 deletions

View File

@@ -1196,7 +1196,7 @@ static void NewgrfWndProc(Window *w, WindowEvent *e)
case WE_CLICK:
switch(e->click.widget) {
case 2: { // select a grf file
case 3: { // select a grf file
int y = (e->click.pt.y - NEWGRF_WND_PROC_OFFSET_TOP_WIDGET) / NEWGRF_WND_PROC_ROWSIZE;
if (y >= w->vscroll.cap) { return;} // click out of bounds
@@ -1239,9 +1239,9 @@ static void NewgrfWndProc(Window *w, WindowEvent *e)
static const Widget _newgrf_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
{ WWT_CAPTION, RESIZE_NONE, 14, 11, 279, 0, 13, STR_NEWGRF_SETTINGS_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS},
{ WWT_MATRIX, RESIZE_NONE, 14, 0, 267, 14, 182, 0xC01,/*small rows*/ STR_NEWGRF_TIP},
{ WWT_PANEL, RESIZE_NONE, 14, 0, 279, 183, 276, 0x0, STR_NULL},
{ WWT_MATRIX, RESIZE_NONE, 14, 0, 267, 14, 182, 0xC01,/*small rows*/ STR_NEWGRF_TIP},
{ WWT_SCROLLBAR, RESIZE_NONE, 14, 268, 279, 14, 182, 0x0, STR_0190_SCROLL_BAR_SCROLLS_LIST},
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 147, 158, 244, 255, STR_0188, STR_NULL},