@@ -129,12 +129,15 @@ void ConsoleManager::handleCommand()
129129 App::procClose ();
130130 break ;
131131 case consolecommands::HELP:
132- printToConsole (" list of available commands:% get% set% reset% exit%%type help <command> for additional information" );
132+ printToConsole (" list of available commands:% get% set% reset% exit% vars% %type help <command> for additional information" );
133133 handleHelpCommand (command);
134134 break ;
135135 case consolecommands::RESET:
136136 d_particle_manager->resetParticles ();
137137 break ;
138+ case consolecommands::VARS:
139+ printToConsole (" Invalid Command" );
140+ break ;
138141 }
139142 }
140143}
@@ -257,6 +260,12 @@ void ConsoleManager::handleSetCommand(const std::string& str)
257260 case consolecommands::COLOR_A:
258261 d_particle_manager->setColorA (numeric_value);
259262 break ;
263+ case consolecommands::COLOR_RAND:
264+ d_particle_manager->setColorRand (numeric_value);
265+ break ;
266+ case consolecommands::COLORS:
267+ printToConsole (" cannot set command 'colors', specify each value with color_r/g/b" );
268+ break ;
260269 }
261270 }
262271 }
@@ -310,6 +319,13 @@ void ConsoleManager::handleGetCommand(const std::string& str)
310319 case consolecommands::COLOR_A:
311320 ss << d_particle_manager->getColorA ();
312321 break ;
322+ case consolecommands::COLOR_RAND:
323+ ss << " cannot get color_rand, command is specific to set" ;
324+ break ;
325+ case consolecommands::COLORS:
326+ ss << " R " << d_particle_manager->getColorR ()
327+ << " %G " << d_particle_manager->getColorG ()
328+ << " %B " << d_particle_manager->getColorB ();
313329 }
314330 printToConsole (ss.str ());
315331 }
@@ -341,17 +357,20 @@ void ConsoleManager::handleHelpCommand(const std::string& str)
341357 }else {
342358 switch (key) {
343359 case consolecommands::GET:
344- printToConsole (" get:% retrieve variable values, list of var's :% mass,drag,mouseforce% particlecount,color_r/g/b/a " );
360+ printToConsole (" get:% retrieve variable values, to list of vars :% help vars " );
345361 break ;
346362 case consolecommands::SET:
347- printToConsole (" set:% set value of variable, list of var's allowed :% mass,drag,mouseforce% color_r/g/b/a " );
363+ printToConsole (" set:% set value of variable, to list of vars :% help vars " );
348364 break ;
349365 case consolecommands::RESET:
350366 printToConsole (" reset:% remove all acting force on particles and% position them at the center of the screen" );
351367 break ;
352368 case consolecommands::EXIT:
353369 printToConsole (" exit:% exit the program, esc will also exit the% program" );
354370 break ;
371+ case consolecommands::VARS:
372+ printToConsole (" list of available program variables:% drag,mass,mouseforce,particlecount% color_r/g/b/a,colors,color_rand" );
373+ break ;
355374 }
356375 }
357376}
0 commit comments