MCPcopy Create free account
hub / github.com/SpartanJ/eepp / loadColorSchemes

Function loadColorSchemes

src/tools/eterm/eterm.cpp:21–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19Rectf noBtn;
20
21void loadColorSchemes( const std::string& resPath ) {
22 auto configPath = Sys::getConfigPath( "eterm" );
23 auto colorSchemes =
24 TerminalColorScheme::loadFromFile( resPath + "colorschemes/terminalcolorschemes.conf" );
25 auto colorSchemesPath = configPath + FileSystem::getOSSlash() + "colorschemes";
26 if ( FileSystem::isDirectory( colorSchemesPath ) ) {
27 auto colorSchemesFiles = FileSystem::filesGetInPath( colorSchemesPath );
28 for ( auto& file : colorSchemesFiles ) {
29 auto colorSchemesInFile = TerminalColorScheme::loadFromFile( file );
30 std::copy( colorSchemesInFile.begin(), colorSchemesInFile.end(),
31 std::back_inserter( colorSchemes ) );
32 }
33 }
34 for ( auto colorScheme : colorSchemes )
35 terminalColorSchemes.insert( { colorScheme.getName(), colorScheme } );
36}
37
38void inputCallback( InputEvent* event ) {
39 if ( !terminal || event->Type == InputEvent::EventsSent )

Callers 1

mainFunction · 0.85

Calls 4

beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected