MCPcopy Create free account
hub / github.com/MyGUI/mygui / setPointer

Method setPointer

Common/Input/SDL/PointerManager.cpp:66–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 void PointerManager::setPointer(std::string_view _name)
67 {
68 MapPointer::iterator iter = mMapPointer.find(_name);
69 if (iter != mMapPointer.end())
70 {
71 updateSDLPointer(iter->second);
72 }
73 else
74 {
75 MyGUI::IResource* resource_generic = MyGUI::ResourceManager::getInstance().getByName(_name, false);
76 if (resource_generic != nullptr)
77 {
78 ResourceSDLPointer* resource = resource_generic->castType<ResourceSDLPointer>(false);
79 if (resource != nullptr)
80 {
81 mMapPointer.emplace(_name, resource->getPointerType());
82 updateSDLPointer(resource->getPointerType());
83 }
84 }
85 }
86 }
87
88 void PointerManager::loadPointerResources()
89 {

Callers

nothing calls this directly

Calls 4

getPointerTypeMethod · 0.80
findMethod · 0.45
endMethod · 0.45
getByNameMethod · 0.45

Tested by

no test coverage detected