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

Method GetMouseX

Source/ModularSynth.cpp:1180–1183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178}
1179
1180float ModularSynth::GetMouseX(ModuleContainer* context, float rawX /*= FLT_MAX*/)
1181{
1182 return ((rawX == FLT_MAX ? mMousePos.x : rawX) + UserPrefs.mouse_offset_x.Get()) / context->GetDrawScale() - context->GetDrawOffset().x;
1183}
1184
1185float ModularSynth::GetMouseY(ModuleContainer* context, float rawY /*= FLT_MAX*/)
1186{

Callers 14

KeyPressedMethod · 0.45
IsMouseHoveredMethod · 0.45
SpawnMethod · 0.45
ResetAppearPosMethod · 0.45
DrawModuleMethod · 0.45
OnSelectItemMethod · 0.45
UpdatePositionMethod · 0.45
MouseMovedMethod · 0.45
KeyPressedMethod · 0.45
GoMethod · 0.45
DrawDropdownMethod · 0.45
MouseMovedMethod · 0.45

Calls 3

GetMethod · 0.80
GetDrawScaleMethod · 0.80
GetDrawOffsetMethod · 0.80

Tested by 1

KeyPressedMethod · 0.36