MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ClipboardPaste

Method ClipboardPaste

engine/Poseidon/UI/Map/UIMapExt.cpp:1249–1262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1247}
1248
1249void CStaticMapArcade::ClipboardPaste()
1250{
1251 _template->ClearSelection();
1252
1253 float mouseX = 0.5 + InputSubsystem::Instance().GetCursorX() * 0.5;
1254 float mouseY = 0.5 + InputSubsystem::Instance().GetCursorY() * 0.5;
1255 Vector3 pos = ScreenToWorld(DrawCoord(mouseX, mouseY));
1256
1257 // offset inserted objects
1258 GetGClipboard().AddOffset(pos - GClipboardPos);
1259 GClipboardPos = pos;
1260
1261 _template->Merge(GetGClipboard());
1262}
1263
1264void CStaticMapArcade::ClipboardPasteAbsolute()
1265{

Callers

nothing calls this directly

Calls 5

ClearSelectionMethod · 0.80
GetCursorXMethod · 0.45
GetCursorYMethod · 0.45
AddOffsetMethod · 0.45
MergeMethod · 0.45

Tested by

no test coverage detected