2014-10-20
* fixed using buttons on main screen with size other than 32x32 pixels
+ * fixed some initialization bugs for scrollbars and main screen buttons
2014-10-17
* removed some remaining unused X11 stuff
if (pos_button != NULL) /* (x/y may be -1/-1 here) */
{
- if (pos_button->width == 0)
- pos_button->width = button_width;
- if (pos_button->height == 0)
- pos_button->height = button_height;
+ pos_button->width = button_width;
+ pos_button->height = button_height;
}
if (pos_text != NULL) /* (x/y may be -1/-1 here) */
height = SC_SCROLLBUTTON_YSIZE;
/* correct scrollbar position if placed outside menu (playfield) area */
- if (x > SC_SCROLL_UP_XPOS)
- x = SC_SCROLL_UP_XPOS;
+ if (x > SX + SC_SCROLL_UP_XPOS)
+ x = SX + SC_SCROLL_UP_XPOS;
if (id == SCREEN_CTRL_ID_SCROLL_DOWN)
y = mSY + (SC_SCROLL_VERTICAL_YPOS +
height = scrollbar_info[i].height;
/* correct scrollbar position if placed outside menu (playfield) area */
- if (x > SC_SCROLL_VERTICAL_XPOS)
- x = SC_SCROLL_VERTICAL_XPOS;
+ if (x > SX + SC_SCROLL_VERTICAL_XPOS)
+ x = SX + SC_SCROLL_VERTICAL_XPOS;
if (id == SCREEN_CTRL_ID_SCROLL_VERTICAL)
height = (NUM_MENU_ENTRIES_ON_SCREEN - 2) * SC_SCROLLBUTTON_YSIZE;