MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / StringFromMouseButton

Function StringFromMouseButton

Source/UserInput/keyTranslator.cpp:812–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810}
811
812std::string StringFromMouseButton(int button) {
813 switch (button) {
814 case 0:
815 return "Left mouse";
816 case 1:
817 return "Middle mouse";
818 case 2:
819 return "Right mouse";
820 default: {
821 char buffer[32];
822 sprintf(buffer, "Mouse%d", button);
823 return buffer;
824 }
825 }
826}
827
828std::string StringFromMouseString(const std::string& text) {
829 if (text == "mousescrollup") {

Callers 2

StringFromMouseStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected