Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7896 in orxonox.OLD for branches/gui/src/lib


Ignore:
Timestamp:
May 27, 2006, 5:41:21 AM (19 years ago)
Author:
bensch
Message:

better dispachers for events

Location:
branches/gui/src/lib/gui/gl_gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc

    r7895 r7896  
    8181    this->resize();
    8282  }
     83
     84
     85  void GLGuiInputLine::removedFocus()
     86  {
     87    GLGuiWidget::removedFocus();
     88    this->pressedKey = 0;
     89    this->pressedKeyName = 0;
     90  }
     91
    8392
    8493  bool GLGuiInputLine::processEvent(const Event& event)
  • branches/gui/src/lib/gui/gl_gui/glgui_inputline.h

    r7894 r7896  
    3636
    3737
     38    virtual void removedFocus();
     39
    3840    virtual void tick(float dt);
    3941    virtual void draw() const;
  • branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.cc

    r7891 r7896  
    4747  {
    4848    this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton");
    49     this->frontMat.setDiffuse(1,0,0);
    5049  }
    5150
     
    5352  {
    5453    printf("%s received focus\n", this->getLabel().c_str());
    55     this->frontMaterial().setDiffuse(0, 1, 0);
     54    GLGuiWidget::receivedFocus();
    5655  }
    5756
     
    5958  {
    6059    printf("%s removed focus\n", this->getLabel().c_str());
    61     this->frontMaterial().setDiffuse(1, 0, 0);
     60    GLGuiWidget::removedFocus();
    6261
    6362  }
     
    6665  {
    6766    printf("%s clicked\n", this->getLabel().c_str());
    68     this->frontMaterial().setDiffuse(0, 0, 1);
     67    GLGuiWidget::clicked();
    6968  }
    7069
     
    7372  {
    7473    printf("%s released\n", this->getLabel().c_str());
    75     this->frontMat.setDiffuse(0,1,0);
     74    GLGuiWidget::released();
    7675  }
    7776
  • branches/gui/src/lib/gui/gl_gui/glgui_widget.cc

    r7893 r7896  
    119119    }
    120120  }
     121
     122
     123  void GLGuiWidget::clicked()
     124  {
     125    this->frontMaterial().setDiffuse(0, 0, 1);
     126
     127  }
     128
     129  void GLGuiWidget::released()
     130  {
     131    this->frontMat.setDiffuse(0,1,0);
     132
     133  }
     134
     135  void GLGuiWidget::receivedFocus()
     136  {
     137    this->frontMaterial().setDiffuse(0, 1, 0);
     138  }
     139
     140  void GLGuiWidget::removedFocus()
     141  {
     142    this->frontMaterial().setDiffuse(1, 0, 0);
     143
     144  }
     145
     146  void GLGuiWidget::destroyed()
     147  {
     148  };
     149
    121150
    122151
  • branches/gui/src/lib/gui/gl_gui/glgui_widget.h

    r7893 r7896  
    100100  protected:
    101101        // if something was clickt on the GUI-widget.
    102     virtual void clicked() {};
    103     virtual void released() {};
     102    virtual void clicked();
     103    virtual void released();
     104    virtual void receivedFocus();
     105    virtual void removedFocus();
    104106
    105     virtual void receivedFocus() {};
    106     virtual void removedFocus() {};
    107 
    108     virtual void destroyed() {};
     107    virtual void destroyed();
    109108
    110109
Note: See TracChangeset for help on using the changeset viewer.