MCPcopy Create free account
hub / github.com/bwapi/bwapi / pressKey

Method pressKey

bwapi/BWAPI/Source/BWAPI/GameInternals.cpp:114–123  ·  view source on GitHub ↗

------------------------------------------------ MOUSE/KEY INPUT -----------------------------------------

Source from the content-addressed store, hash-verified

112 }
113 //------------------------------------------------ MOUSE/KEY INPUT -----------------------------------------
114 void GameImpl::pressKey(int key)
115 {
116 // Don't do anything if key is 0
117 // used when auto-menu dialogs are not found, performance
118 if ( !key )
119 return;
120
121 // Press and release the key
122 PostMessage(SDrawGetFrameWindow(), WM_CHAR, (WPARAM)key, NULL);
123 }
124 void GameImpl::mouseDown(int x, int y)
125 {
126 // Press the left mouse button

Callers 2

onMenuFrameMethod · 0.80
pressDialogKeyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected