MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / PrintOptions

Function PrintOptions

src/openrct2/command_line/CommandLine.cpp:202–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200 }
201
202 static void PrintOptions(const CommandLineOptionDefinition* options)
203 {
204 // Print options for main commands
205 size_t maxOptionLength = 0;
206 const CommandLineOptionDefinition* option = options;
207 for (; option->Type != 255; option++)
208 {
209 char buffer[128];
210 GetOptionCaption(buffer, sizeof(buffer), option);
211 size_t optionCaptionLength = String::lengthOf(buffer);
212 maxOptionLength = std::max(maxOptionLength, optionCaptionLength);
213 }
214
215 option = options;
216 for (; option->Type != 255; option++)
217 {
218 Console::WriteSpace(4);
219
220 char buffer[128];
221 GetOptionCaption(buffer, sizeof(buffer), option);
222 size_t optionCaptionLength = String::lengthOf(buffer);
223 Console::Write(buffer);
224
225 Console::WriteSpace(maxOptionLength - optionCaptionLength + 4);
226 Console::Write(option->Description);
227 Console::WriteLine();
228 }
229 Console::WriteLine();
230 }
231
232 static void PrintExamples(const CommandLineExample* examples)
233 {

Callers 1

PrintHelpForFunction · 0.85

Calls 5

GetOptionCaptionFunction · 0.85
lengthOfFunction · 0.85
WriteSpaceFunction · 0.85
WriteFunction · 0.85
WriteLineFunction · 0.85

Tested by

no test coverage detected