forked from mirror/OpenTTD
(svn r6186) -Fix [FS#309]: add an override system to the dynamically determined size of steps for numeric patch settings in the 'Configure patches' GUI.
The size of these steps normally about (max - min) / 50, which results in steps of 100 000 years for the start year, end year, network restart year and the year of introduction of coloured newspapers.
This commit is contained in:
@@ -796,8 +796,10 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
|
||||
case SDT_BOOLX: value ^= 1; break;
|
||||
case SDT_NUMX: {
|
||||
/* Add a dynamic step-size to the scroller. In a maximum of
|
||||
* 50-steps you should be able to get from min to max */
|
||||
uint32 step = ((sdb->max - sdb->min) / 50);
|
||||
* 50-steps you should be able to get from min to max,
|
||||
* unless specified otherwise in the 'interval' variable
|
||||
* of the current patch. */
|
||||
uint32 step = (sdb->interval == 0) ? ((sdb->max - sdb->min) / 50) : sdb->interval;
|
||||
if (step == 0) step = 1;
|
||||
|
||||
// don't allow too fast scrolling
|
||||
|
Reference in New Issue
Block a user