--- a/src/settings_gui.cpp Mon Mar 19 09:33:17 2007 +0000
+++ b/src/settings_gui.cpp Mon Mar 19 12:38:16 2007 +0000
@@ -64,7 +64,7 @@
return buf;
}
-static int GetCurRes(void)
+static int GetCurRes()
{
int i;
@@ -77,18 +77,18 @@
return i;
}
-static inline bool RoadVehiclesAreBuilt(void)
+static inline bool RoadVehiclesAreBuilt()
{
const Vehicle* v;
FOR_ALL_VEHICLES(v) {
- if (v->type == VEH_Road) return true;
+ if (v->type == VEH_ROAD) return true;
}
return false;
}
-static void ShowCustCurrency(void);
+static void ShowCustCurrency();
static void GameOptionsWndProc(Window *w, WindowEvent *e)
{
@@ -289,18 +289,18 @@
};
-void ShowGameOptions(void)
+void ShowGameOptions()
{
DeleteWindowById(WC_GAME_OPTIONS, 0);
AllocateWindowDesc(&_game_options_desc);
}
-typedef struct {
+struct GameSettingData {
int16 min;
int16 max;
int16 step;
StringID str;
-} GameSettingData;
+};
static const GameSettingData _game_setting_info[] = {
{ 0, 7, 1, STR_NULL},
@@ -371,7 +371,7 @@
}
}
-extern void StartupEconomy(void);
+extern void StartupEconomy();
enum {
GAMEDIFF_WND_TOP_OFFSET = 45,
@@ -394,6 +394,7 @@
SetWindowWidgetDisabledState(w, 6, _game_mode == GM_NORMAL);
SetWindowWidgetDisabledState(w, 7, _game_mode == GM_EDITOR || _networking); // highscore chart in multiplayer
SetWindowWidgetDisabledState(w, 10, _networking && !_network_server); // Save-button in multiplayer (and if client)
+ LowerWindowWidget(w, _opt_mod_temp.diff_level + 3);
break;
case WE_PAINT: {
@@ -553,7 +554,7 @@
GameDifficultyWndProc
};
-void ShowGameDifficulty(void)
+void ShowGameDifficulty()
{
DeleteWindowById(WC_GAME_OPTIONS, 0);
/* Copy current settings (ingame or in intro) to temporary holding place
@@ -577,6 +578,11 @@
"link_terraform_toolbar",
"liveries",
"prefer_teamchat",
+ /* While the horizontal scrollwheel scrolling is written as general code, only
+ * the cocoa (OSX) driver generates input for it.
+ * Since it's also able to completely disable the scrollwheel will we display it on all platforms anyway */
+ "scrollwheel_scrolling",
+ "scrollwheel_multiplier",
};
static const char *_patches_construction[] = {
@@ -657,16 +663,16 @@
"freight_trains",
};
-typedef struct PatchEntry {
+struct PatchEntry {
const SettingDesc *setting;
uint index;
-} PatchEntry;
+};
-typedef struct PatchPage {
+struct PatchPage {
const char **names;
PatchEntry *entries;
byte num;
-} PatchPage;
+};
/* PatchPage holds the categories, the number of elements in each category
* and (in NULL) a dynamic array of settings based on the string-representations
@@ -829,8 +835,8 @@
if (value < sdb->min) value = (sdb->flags & SGF_0ISDISABLED) ? 0 : sdb->min;
}
- /* Set up scroller timeout */
- if (value != oldvalue) {
+ /* Set up scroller timeout for numeric values */
+ if (value != oldvalue && !(sd->desc.flags & SGF_MULTISTRING)) {
WP(w,def_d).data_2 = btn * 2 + 1 + ((x >= 10) ? 1 : 0);
w->flags4 |= 5 << WF_TIMEOUT_SHL;
_left_button_clicked = false;
@@ -916,7 +922,7 @@
PatchesSelectionWndProc,
};
-void ShowPatchesSelection(void)
+void ShowPatchesSelection()
{
DeleteWindowById(WC_GAME_OPTIONS, 0);
AllocateWindowDesc(&_patches_selection_desc);
@@ -1136,7 +1142,7 @@
CustCurrencyWndProc,
};
-static void ShowCustCurrency(void)
+static void ShowCustCurrency()
{
_str_separator[0] = _custom_currency.separator;
_str_separator[1] = '\0';