MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / UpdateValueDescription

Method UpdateValueDescription

Source/options.cpp:1690–1707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1688}
1689
1690void PadmapperOptions::Action::UpdateValueDescription() const
1691{
1692 boundInputDescriptionType = GamepadType;
1693 if (boundInput.button == ControllerButton_NONE) {
1694 boundInputDescription = "";
1695 boundInputShortDescription = "";
1696 return;
1697 }
1698 string_view buttonName = ToString(boundInput.button);
1699 if (boundInput.modifier == ControllerButton_NONE) {
1700 boundInputDescription = std::string(buttonName);
1701 boundInputShortDescription = std::string(Shorten(buttonName));
1702 return;
1703 }
1704 string_view modifierName = ToString(boundInput.modifier);
1705 boundInputDescription = StrCat(modifierName, "+", buttonName);
1706 boundInputShortDescription = StrCat(Shorten(modifierName), "+", Shorten(buttonName));
1707}
1708
1709string_view PadmapperOptions::Action::Shorten(string_view buttonName) const
1710{

Callers

nothing calls this directly

Calls 2

ToStringFunction · 0.85
StrCatFunction · 0.85

Tested by

no test coverage detected