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

Method SetValue

src/script/script_gui.cpp:548–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546 }
547
548 void SetValue(int value)
549 {
550 const ScriptConfigItem &config_item = *this->visible_settings[this->clicked_row];
551 if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && !config_item.flags.Test(ScriptConfigFlag::InGame)) return;
552 this->script_config->SetSetting(config_item.name, value);
553 this->SetDirty();
554 }
555};
556
557/** Widgets for the Script settings window. */

Callers 2

OnQueryTextFinishedMethod · 0.95
OnDropdownSelectMethod · 0.95

Calls 3

TestMethod · 0.80
SetSettingMethod · 0.80
SetDirtyMethod · 0.45

Tested by

no test coverage detected