MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / GetModuleAtCursor

Method GetModuleAtCursor

Source/ModularSynth.cpp:1875–1886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1873}
1874
1875IDrawableModule* ModularSynth::GetModuleAtCursor(int offsetX /*=0*/, int offsetY /*=0*/)
1876{
1877 float x = GetMouseX(&mUILayerModuleContainer) + offsetX;
1878 float y = GetMouseY(&mUILayerModuleContainer) + offsetY;
1879 IDrawableModule* uiLayerModule = mUILayerModuleContainer.GetModuleAt(x, y);
1880 if (uiLayerModule)
1881 return uiLayerModule;
1882
1883 x = GetMouseX(&mModuleContainer) + offsetX;
1884 y = GetMouseY(&mModuleContainer) + offsetY;
1885 return mModuleContainer.GetModuleAt(x, y);
1886}
1887
1888void ModularSynth::CheckClick(IDrawableModule* clickedModule, float x, float y, bool rightButton)
1889{

Callers 1

CheckHoverMethod · 0.80

Calls 1

GetModuleAtMethod · 0.80

Tested by

no test coverage detected