Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4134 in orxonox.OLD


Ignore:
Timestamp:
May 9, 2005, 10:26:59 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: nicer help

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/gui/gui/gui_gtk.cc

    r4133 r4134  
    318318void Widget::printHelp(Widget* widget)
    319319{
    320   bool hasFlag = false;
     320  int helpLen=0;
    321321
    322322  if (widget->optionType > GUI_NOTHING)
     
    329329            {
    330330              PRINT(0)("-%s", option->flagNameShort);
    331               hasFlag = true;
     331              helpLen += strlen(option->flagNameShort)+1;
    332332            }
    333333          if (option->flagName)
    334334            {
    335               if (hasFlag)
    336                 PRINT(0)("|");
     335              if (helpLen > 0)
     336                {
     337                  PRINT(0)("|");
     338                  helpLen++;
     339                }
    337340              PRINT(0)("--%s:", option->flagName);
    338               hasFlag = true;
     341              helpLen += strlen(option->flagName)+2;
    339342            }
     343          while ((helpLen ++) < 29)
     344            PRINT(0)(" ");
    340345          if (option->shortDescription)
    341             PRINT(0)("\t\t%s\n", option->shortDescription);
     346            PRINT(0)("%s\n", option->shortDescription);
    342347          else
    343348            PRINT(0)("\n");
  • orxonox/trunk/src/orxonox.cc

    r4133 r4134  
    369369{
    370370  PRINT(0)("orxonox: starts the orxonox game - rules\n");
    371   PRINT(0)("usage: orxonox [arg]\n\n");
     371  PRINT(0)("usage: orxonox [arg [arg...]]\n\n");
    372372  PRINT(0)("valid options:\n");
    373   PRINT(0)(" --benchmark\tstarts the orxonox benchmark\n");
    374   PRINT(0)(" --help \tshows this menu\n");
    375373  {
    376374    Gui* gui = new Gui(argc, argv);
     
    378376    delete gui;
    379377  }
     378  PRINT(0)(" --benchmark:\t\t\tstarts the orxonox benchmark\n");
     379  PRINT(0)(" --help: \t\t\tshows this help\n");
    380380}
    381381
Note: See TracChangeset for help on using the changeset viewer.