MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ReadInterface

Function ReadInterface

src/openrct2/config/Config.cpp:386–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384 }
385
386 static void ReadInterface(IIniReader* reader)
387 {
388 if (reader->ReadSection("interface"))
389 {
390 auto model = &_config.interface;
391 model->toolbarButtonsCentred = reader->GetBoolean("toolbar_buttons_centred", kToolbarButtonsCentredDefault);
392 model->toolbarShowFinances = reader->GetBoolean("toolbar_show_finances", true);
393 model->toolbarShowResearch = reader->GetBoolean("toolbar_show_research", true);
394 model->toolbarShowCheats = reader->GetBoolean("toolbar_show_cheats", false);
395 model->toolbarShowNews = reader->GetBoolean("toolbar_show_news", false);
396 model->toolbarShowMute = reader->GetBoolean("toolbar_show_mute", false);
397 model->toolbarShowChat = reader->GetBoolean("toolbar_show_chat", false);
398 model->toolbarShowZoom = reader->GetBoolean("toolbar_show_zoom", true);
399 model->toolbarShowRotateAnticlockwise = reader->GetBoolean("toolbar_show_rotate_anti_clockwise", false);
400 model->consoleSmallFont = reader->GetBoolean("console_small_font", false);
401 model->currentThemePreset = reader->GetString("current_theme", "*RCT2");
402 model->currentTitleSequencePreset = reader->GetString("current_title_sequence", "*OPENRCT2");
403 model->randomTitleSequence = reader->GetBoolean("random_title_sequence", false);
404 model->objectSelectionFilterFlags = reader->GetInt32("object_selection_filter_flags", 0x3FFF);
405 model->scenarioSelectLastTab = reader->GetInt32("scenarioselect_last_tab", 0);
406 model->scenarioPreviewScreenshots = reader->GetBoolean("scenario_preview_screenshots", true);
407 model->listRideVehiclesSeparately = reader->GetBoolean("list_ride_vehicles_separately", false);
408 model->windowButtonsOnTheLeft = reader->GetBoolean("window_buttons_on_the_left", kWindowButtonsOnTheLeftDefault);
409 model->enlargedUi = reader->GetBoolean("enlarged_ui", kEnlargedUiDefault);
410 model->touchEnhancements = reader->GetBoolean("touch_enhancements", kEnlargedUiDefault);
411 }
412 }
413
414 static void WriteInterface(IIniWriter* writer)
415 {

Callers 2

SetDefaultsFunction · 0.85
ReadFileFunction · 0.85

Calls 4

ReadSectionMethod · 0.45
GetBooleanMethod · 0.45
GetStringMethod · 0.45
GetInt32Method · 0.45

Tested by

no test coverage detected