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

Function StringFromMouseString

Source/UserInput/keyTranslator.cpp:828–842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826}
827
828std::string StringFromMouseString(const std::string& text) {
829 if (text == "mousescrollup") {
830 return "scroll up";
831 } else if (text == "mousescrolldown") {
832 return "scroll down";
833 } else if (text == "mousescrollleft") {
834 return "scroll left";
835 } else if (text == "mousescrollright") {
836 return "scroll right";
837 } else {
838 int button = std::atoi(text.c_str() + 5);
839 return StringFromMouseButton(button);
840 }
841 return "";
842}
843
844std::string StringFromControllerInput(ControllerInput::Input input) {
845 switch (input) {

Callers 1

Calls 2

StringFromMouseButtonFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected