MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / addAdvancedToggle

Method addAdvancedToggle

radiant/eventmanager/EventManager.cpp:234–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234IEventPtr EventManager::addAdvancedToggle(const std::string& name,
235 const AdvancedToggleCallback& onToggled)
236{
237 if (alreadyRegistered(name))
238 {
239 return _emptyEvent;
240 }
241
242 IEventPtr event = std::make_shared<Toggle>(onToggled);
243
244 // Add the command to the list
245 _events[name] = event;
246
247 // Return the pointer to the newly created event
248 return event;
249}
250
251void EventManager::setToggled(const std::string& name, const bool toggled)
252{

Callers 2

SelectionModeToggleMethod · 0.80
initialiseModuleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected