MCPcopy Create free account
hub / github.com/EasyRPG/Player / AddOption

Method AddOption

src/window_settings.cpp:198–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197template <typename Param, typename Action>
198void Window_Settings::AddOption(const Param& param,
199 Action&& action)
200{
201 if (!param.IsOptionVisible()) {
202 return;
203 }
204 Option opt;
205 opt.text = ToString(param.GetName());
206 opt.help = ToString(param.GetDescription());
207 opt.value_text = param.ValueToString();
208 opt.mode = eOptionNone;
209 if (!param.IsLocked()) {
210 opt.action = std::forward<Action>(action);
211 }
212 GetFrame().options.push_back(std::move(opt));
213}
214
215template <typename T, typename Action>
216void Window_Settings::AddOption(const RangeConfigParam<T>& param,

Callers

nothing calls this directly

Calls 11

IsOptionVisibleMethod · 0.80
GetDescriptionMethod · 0.80
IsLockedMethod · 0.80
GetMinMethod · 0.80
GetMaxMethod · 0.80
GetValuesMethod · 0.80
GetDescriptionsMethod · 0.80
GetNameMethod · 0.45
ValueToStringMethod · 0.45
GetMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected