MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / browseHistory

Method browseHistory

Source/Falcor/Utils/Scripting/Console.cpp:164–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164std::optional<std::string> Console::browseHistory(bool upOrDown)
165{
166 if (upOrDown)
167 {
168 if (mHistoryIndex + 1 < (int32_t)mHistory.size())
169 {
170 mHistoryIndex++;
171 return mHistory[mHistory.size() - mHistoryIndex - 1];
172 }
173 }
174 else
175 {
176 if (mHistoryIndex >= 0)
177 {
178 mHistoryIndex--;
179 return mHistoryIndex >= 0 ? mHistory[mHistory.size() - mHistoryIndex - 1] : "";
180 }
181 }
182 return {};
183}
184
185int Console::inputTextCallback(ImGuiInputTextCallbackData* data)
186{

Callers 1

inputTextCallbackMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected