Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4134 in orxonox.OLD for orxonox/trunk/src/lib/gui/gui/gui_gtk.cc


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

orxonox/trunk: nicer help

File:
1 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");
Note: See TracChangeset for help on using the changeset viewer.