MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / basicTextInput

Function basicTextInput

source/MRViewer/MRUIStyle.cpp:1832–1851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1830}
1831
1832static bool basicTextInput( const char* label, std::string& str, ImGuiInputTextFlags flags, auto &&func )
1833{
1834 if ( isItemActive( label ) && TestEngine::createValueTentative<std::string>( label, false ) )
1835 ImGui::ClearActiveID();
1836
1837 bool ret = func();
1838
1839 if ( shouldExposeTextInputToTestEngine( flags ) )
1840 {
1841 std::optional<std::string> valueOverride = TestEngine::createValue( label, str );
1842 if ( valueOverride )
1843 {
1844 str = std::move( *valueOverride );
1845 detail::markItemEdited( ImGui::GetID( label ) );
1846 ret = true;
1847 }
1848 }
1849
1850 return ret;
1851}
1852
1853static bool basicTextInputIntoArray( const char* label, char* array, std::size_t size, ImGuiInputTextFlags flags, auto &&func )
1854{

Callers 2

inputTextFunction · 0.85
inputTextMultilineFunction · 0.85

Calls 3

isItemActiveFunction · 0.85
createValueFunction · 0.70

Tested by

no test coverage detected