mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
add window snapping
This commit is contained in:
10
src/config.c
10
src/config.c
@@ -79,7 +79,7 @@ general_configuration_t gGeneral_config_default = {
|
||||
SCREENSHOT_FORMAT_PNG, // screenshot_format
|
||||
"", // game_path
|
||||
MEASUREMENT_FORMAT_IMPERIAL, // measurement_format
|
||||
TEMPERATURE_FORMAT_F, // temperature_format
|
||||
TEMPERATURE_FORMAT_C, // temperature_format
|
||||
CURRENCY_POUNDS, // currency_format
|
||||
0, // construction_marker_colour
|
||||
1, // edge_scrolling
|
||||
@@ -90,7 +90,8 @@ general_configuration_t gGeneral_config_default = {
|
||||
0, // fullscreen mode (default: windowed)
|
||||
-1, // window_width
|
||||
-1, // window_height
|
||||
LANGUAGE_ENGLISH_UK // language
|
||||
LANGUAGE_ENGLISH_UK, // language
|
||||
5 // window_snap_proximity
|
||||
};
|
||||
sound_configuration_t gSound_config;
|
||||
|
||||
@@ -257,6 +258,8 @@ void config_write_ini_general(FILE *fp)
|
||||
fprintf(fp, "window_height = %d\n", gGeneral_config.window_height);
|
||||
|
||||
fprintf(fp, "language = %d\n", gGeneral_config.language);
|
||||
|
||||
fprintf(fp, "window_snap_proximity = %d\n", gGeneral_config.window_snap_proximity);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -543,6 +546,9 @@ static void config_general(char *setting, char *value){
|
||||
else if (strcmp(setting, "language") == 0) {
|
||||
gGeneral_config.language = atoi(value);
|
||||
}
|
||||
else if (strcmp(setting, "window_snap_proximity") == 0) {
|
||||
gGeneral_config.window_snap_proximity = clamp(0, atoi(value), 255);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user