Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3166 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Dec 13, 2004, 2:20:31 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: now it does something without GTK and it looks nice

Location:
orxonox/trunk/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/gui/orxonox_gui.cc

    r3165 r3166  
    3434
    3535*/
     36
    3637#include "orxonox_gui.h"
    3738#include "orxonox_gui_video.h"
     
    105106  exec->setFilename ("~/.orxonox.conf");
    106107  exec->readFromFile (orxonoxGUI);
    107   orxonoxGUI->walkThrough(orxonoxGUI->listOptions);
     108  //  orxonoxGUI->walkThrough(orxonoxGUI->listOptions);
    108109
    109110  orxonoxGUI->showall ();
     
    112113#ifdef HAVE_GTK2
    113114  mainloopGTK();
    114 #endif
     115#else /* HAVE_GTK2 */
     116  cout << " Listing all the Orxonox Options: \n";
     117  cout << "  #############################\n";
     118  orxonoxGUI->walkThrough(orxonoxGUI->listOptions);
     119
     120  cout << "\nDo you want me to save the the above values now? [Yn] ";
     121  char c = getchar();
     122  if ((c == 'y' || c == 'Y' || c== 10) && exec->shouldsave())
     123    exec->writeToFile (Window::mainWindow);
     124 
     125#endif /* HAVE_GTK2 */
     126
    115127}
    116128
  • orxonox/trunk/gui/orxonox_gui_gtk.cc

    r3165 r3166  
    178178void Widget::listOptions (Widget* widget)
    179179{
    180   if (widget->isOption >= 1)
    181     cout << static_cast<Option*>(widget)->label <<" is : " << static_cast<Option*>(widget)->value <<endl;
     180  if (widget->isOption < 0 && static_cast<Packer*>(widget)->groupName)
     181    cout << "[" << static_cast<Packer*>(widget)->groupName << "]\n";
     182  if (widget->isOption >= 1 && widget->isOption <= 3)
     183    cout << "  " << static_cast<Option*>(widget)->label <<" is : " << static_cast<Option*>(widget)->value <<endl;
     184  else if (widget->isOption == 5)
     185    cout << "  " << static_cast<Option*>(widget)->label <<" is : " << static_cast<OptionLabel*>(widget)->cValue <<endl;
    182186}
    183187
     
    342346  if (!isOpen)
    343347    {
    344       printf ("showall\n");
     348      //      printf ("showall\n");
    345349#ifdef HAVE_GTK2
    346350      gtk_widget_show_all  (widget);
     
    350354  else
    351355    {
    352       printf ("showone\n");
     356      //      printf ("showone\n");
    353357#ifdef HAVE_GTK2
    354358      gtk_widget_show (widget);
     
    665669  strcpy(flagName, flagname);
    666670  defaultValue = defaultvalue;
    667   cout << "Set Flagname of " << label << " to " << flagname << endl;
     671
     672  //  cout << "Set Flagname of " << label << " to " << flagname << endl;
    668673}
    669674
     
    686691  strcpy(flagNameShort, flagnameshort);
    687692  defaultValue = defaultvalue;
    688   cout << "Set Flagname of " << label << " to " << flagname << endl;
     693  //  cout << "Set Flagname of " << label << " to " << flagname << endl;
    689694}
    690695
  • orxonox/trunk/gui/orxonox_gui_keys.cc

    r3165 r3166  
    109109  inputKey[key]->pKeyButton->connectSignal("button_press_event", inputKey[key], inputWindowEvent);
    110110#endif /* HAVE_GTK2 */
    111 
    112111  inputKey[key]->pKeyBox->fill(inputKey[key]->pKeyButton);
    113112  inputKey[key]->pKeyBox->fill(inputKey[key]->pKeyOLabel);
     
    153152    {
    154153    case GDK_Up:
    155       printf("Up arrow key!\n");
    156154      strcpy(title, "up");
    157155      break;
    158156    case GDK_Down:
    159       printf("Down arrow key!\n");
    160157      strcpy(title, "down");
    161158      break;
    162159    case GDK_Left:
    163       printf("Left arrow key!\n");
    164160      strcpy(title, "left");
    165161      break;
    166162    case GDK_Right:
    167       printf("Right arrow key!\n");
    168163      strcpy(title, "right");
    169164      break;
    170165     
    171166    case GDK_space:
    172       printf("Space Pressed.\n");
    173167      strcpy(title, "space");
    174168      break;
    175169     
    176170    case 65293:
    177       printf("Enter Pressed\n");
    178171      strcpy(title, "enter");
    179172      break;
     
    181174      // Special Keys //
    182175    case GDK_Escape:
    183       printf("Esc Pressed.\n");
    184176      strcpy(title, "esc");
    185177      break;
    186178    case GDK_Tab:
    187       printf("Tab Pressed.\n");
    188179      strcpy(title, "tab");
    189180      break;
    190181    case GDK_Shift_L:
    191       printf("Left Shift!\n");
    192182      strcpy(title, "l_shift");
    193183      break;
    194184    case GDK_Shift_R:
    195       printf("Right Shift!\n");
    196185      strcpy(title, "r_shift");
    197186      break;
    198187    case GDK_Control_L:
    199       printf("Left Control!\n");
    200188      strcpy(title, "l_ctrl");
    201189      break;
    202190    case GDK_Control_R:
    203       printf("Right Control!\n");
    204191      strcpy(title, "r_ctrl");
    205192      break;
    206193    case GDK_Alt_L:
    207       printf("Left Alt!\n");
    208194      strcpy(title, "l_alt");
    209195      break;
    210196    case GDK_Alt_R:
    211       printf("Rigth Alt!\n");
    212197      strcpy(title, "r_alt");
    213198      break;
    214199      // FXX KEYS //
    215200    case GDK_F1:
    216       printf("F1!\n");
    217201      strcpy(title, "f1");
    218202      break;
    219203    case GDK_F2:
    220       printf("F2!\n");
    221204      strcpy(title, "f2");
    222205      break;
    223206    case GDK_F3:
    224       printf("F3!\n");
    225207      strcpy(title, "f3");
    226208      break;
    227209    case GDK_F4:
    228       printf("F4!\n");
    229210      strcpy(title, "f4");
    230211      break;
    231212    case GDK_F5:
    232       printf("F5!\n");
    233213      strcpy(title, "f5");
    234214      break;
    235215    case GDK_F6:
    236       printf("F6!\n");
    237216      strcpy(title, "f6");
    238217      break;
    239218    case GDK_F7:
    240       printf("F7!\n");
    241219      strcpy(title, "f7");
    242220      break;
    243221    case GDK_F8:
    244       printf("F8!\n");
    245222      strcpy(title, "f8");
    246223      break;
    247224    case GDK_F9:
    248       printf("F9\n");
    249225      strcpy(title, "f9");
    250226      break;
    251227    case GDK_F10:
    252       printf("F10!\n");
    253228      strcpy(title, "f10");
    254229      break;
    255230    case GDK_F11:
    256       printf("F11!\n");
    257231      strcpy(title, "f11");
    258232      break;
    259233    case GDK_F12:
    260       printf("F12!\n");
    261234      strcpy(title, "f12");
    262235      break;
Note: See TracChangeset for help on using the changeset viewer.