MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / onInputAction

Method onInputAction

src/ui/Menu_Save.cpp:94–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94bool Menu_Save::onInputAction(Engine::ActionType action)
95{
96 using Engine::ActionType;
97
98 if (!m_isWaitingForSaveName)
99 return Menu::onInputAction(action);
100 else
101 {
102 switch (action)
103 {
104 case ActionType::UI_Confirm:
105 if (!m_SelectableItems.empty())
106 performSelectAction(m_SelectableItems[m_SelectedItem]);
107 break;
108 case ActionType::UI_Backspace:
109 if (m_SaveName.size() > 0)
110 m_SaveName.pop_back();
111 break;
112 case ActionType::UI_Close:
113 m_isWaitingForSaveName = false;
114 // restore displayname of current slot
115 gatherAvailableSavegames();
116 break;
117 default:
118 break;
119 }
120 }
121 return false;
122}
123
124void Menu_Save::onTextInput(const std::string& text)
125{

Callers

nothing calls this directly

Calls 3

pop_backMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected