Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3148 in orxonox.OLD for orxonox/trunk/gui/orxonox_gui_banner.cc


Ignore:
Timestamp:
Dec 11, 2004, 3:33:05 PM (21 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: banner Window is as it should be

File:
1 edited

Legend:

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

    r3147 r3148  
    3131OrxonoxGuiBanner::OrxonoxGuiBanner ()
    3232{
     33  // Banner Itself //
    3334  bannerEventBox = new EventBox ("BannerEventBox");
    3435  bannerImage = new Image ("banner.xpm");
    3536  bannerEventBox->fill(bannerImage);
    3637  bannerEventBox->connectSignal ("button_press_event", this, LogoWindowOpen);
    37   logoWindowIsOpen = -1;
     38
     39  // Banner Window //
     40  logoWindow = new Window("Logo");
     41  logoWindow->connectSignal("destroy", this, LogoWindowClose);
     42  logoWindow->connectSignal("delete_event", this, LogoWindowClose);
     43  logoEventBox = new EventBox();
     44  logoBox = new Box('v');
     45  logoLabel = new Label("OrxOnoX, " PACKAGE_VERSION);
     46  logoImage = new Image("banner.xpm");
     47  logoEventBox->fill(logoImage);
     48 
     49  logoBox->fill(logoLabel);
     50  logoBox->fill(logoEventBox);
     51  logoEventBox->connectSignal("button_press_event",this,LogoWindowClose);
     52 
     53  logoWindow->fill (logoBox);
     54 
     55  Window::addWindow (logoWindow);
    3856}
    3957
     
    5068    it shows it if it has been created
    5169*/
    52 void OrxonoxGuiBanner::logoWindowNew()
     70void OrxonoxGuiBanner::logoWindowOpen()
    5371{
    54   if (logoWindowIsOpen <= 0)
    55     {
    56       if (logoWindowIsOpen < 0)
    57         {
    58           // creating new Logo Window //
    59           logoWindow = new Window("Logo");
    60           logoWindow->connectSignal("destroy", this, LogoWindowClose);
    61           logoWindow->connectSignal("delete_event", this, LogoWindowClose);
    62           logoEventBox = new EventBox();
    63           logoBox = new Box('v');
    64           logoLabel = new Label("OrxOnoX, " PACKAGE_VERSION);
    65           logoImage = new Image("banner.xpm");
    66           logoEventBox->fill(logoImage);
    67 
    68           logoBox->fill(logoLabel);
    69           logoBox->fill(logoEventBox);
    70           logoEventBox->connectSignal("button_press_event",this,LogoWindowClose);
    71 
    72           logoWindow->fill (logoBox);
    73          
    74         }
    75       //  showing Window //
    76       logoWindowIsOpen = 1;
    77      
    78      
    79       logoWindow->showall();
    80     }
     72  logoWindow->open();
    8173}
    8274
     
    8678void OrxonoxGuiBanner::logoWindowClose()
    8779{
    88   logoWindowIsOpen = 0;
    89   logoWindow->hide();
     80  logoWindow->close();
    9081}
    9182
     
    10697   \param banner the Object that holds the banner-logo-window
    10798*/
    108 gint LogoWindowOpen (GtkWidget* widget, GdkEvent* event, void* banner)
     99gint OrxonoxGuiBanner::LogoWindowOpen (GtkWidget* widget, GdkEvent* event, void* banner)
    109100{
    110   static_cast<OrxonoxGuiBanner*>(banner)->logoWindowNew();
     101  static_cast<OrxonoxGuiBanner*>(banner)->logoWindowOpen();
    111102}
    112103
     
    118109   \param banner the Object that holds the banner-logo-window
    119110*/
    120 gint LogoWindowClose (GtkWidget *widget, GdkEvent* event, void* banner)
     111gint OrxonoxGuiBanner::LogoWindowClose (GtkWidget *widget, GdkEvent* event, void* banner)
    121112{
    122113  static_cast<OrxonoxGuiBanner*>(banner)->logoWindowClose();
Note: See TracChangeset for help on using the changeset viewer.