MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ResetAllSettingsConfirmationCallback

Function ResetAllSettingsConfirmationCallback

src/settings_gui.cpp:386–393  ·  view source on GitHub ↗

* Callback function for the reset all settings button * @param w Window which is calling this callback * @param confirmed boolean value, true when yes was clicked, false otherwise */

Source from the content-addressed store, hash-verified

384 * @param confirmed boolean value, true when yes was clicked, false otherwise
385 */
386static void ResetAllSettingsConfirmationCallback(Window *w, bool confirmed)
387{
388 if (confirmed) {
389 GetSettingsTree().ResetAll();
390 GetSettingsTree().FoldAll();
391 w->InvalidateData();
392 }
393}
394
395struct GameOptionsWindow : Window {
396 static inline GameSettings *settings_ptr; ///< Pointer to the game settings being displayed and modified.

Callers

nothing calls this directly

Calls 3

ResetAllMethod · 0.80
FoldAllMethod · 0.45
InvalidateDataMethod · 0.45

Tested by

no test coverage detected