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

Method getKeyState

bwapi/BWAPI/Source/BWAPI/GameImpl.cpp:175–184  ·  view source on GitHub ↗

---------------------------------------------- GET KEY STATE ---------------------------------------------

Source from the content-addressed store, hash-verified

173 }
174 //---------------------------------------------- GET KEY STATE ---------------------------------------------
175 bool GameImpl::getKeyState(Key key) const
176 {
177 if ( !this->isFlagEnabled(BWAPI::Flag::UserInput) )
178 return false;
179
180 if ( key < 0 || key >= K_MAX )
181 return false;
182
183 return (GetKeyState(key) & 128) > 0;
184 }
185 //------------------------------------------- GET SCREEN POSITION ------------------------------------------
186 BWAPI::Position GameImpl::getScreenPosition() const
187 {

Callers 1

updateSharedMemoryMethod · 0.45

Calls 1

isFlagEnabledMethod · 0.95

Tested by

no test coverage detected