MCPcopy Create free account
hub / github.com/TurningWheel/Barony / warpMouseToFrame

Method warpMouseToFrame

src/ui/Frame.cpp:2235–2244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2233}
2234
2235void Frame::warpMouseToFrame(const int player, Uint32 flags) const
2236{
2237#ifndef EDITOR
2238 SDL_Rect _size = getAbsoluteSize();
2239 inputs.warpMouse(player,
2240 (_size.x + _size.w / 2) * ((float)xres / (float)Frame::virtualScreenX),
2241 (_size.y + _size.h / 2) * ((float)yres / (float)Frame::virtualScreenY),
2242 flags);
2243#endif
2244}
2245
2246SDL_Rect Frame::getAbsoluteSize() const
2247{

Calls 1

warpMouseMethod · 0.80

Tested by

no test coverage detected