Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8652 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 1:15:24 AM (18 years ago)
Author:
bensch
Message:

renamings

Location:
branches/gui/src/lib/gui/gl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/glgui_handler.cc

    r8450 r8652  
    104104    {
    105105      case  EV_MOUSE_BUTTON_LEFT:
    106         if (GLGuiWidget::focused() != NULL)
     106        if (GLGuiWidget::mouseFocused() != NULL)
    107107        {
    108108          if (event.bPressed)
    109109          {
    110             if (GLGuiWidget::focused()->clickable())
     110            if (GLGuiWidget::mouseFocused()->clickable())
    111111            {
    112112              Vector2D cursorPos = (this->_cursor != NULL) ? this->_cursor->getAbsCoor2D() : Vector2D(event.x, event.y);
    113               GLGuiWidget::focused()->click(cursorPos - GLGuiWidget::focused()->getAbsCoor2D());
     113              GLGuiWidget::mouseFocused()->click(cursorPos - GLGuiWidget::mouseFocused()->getAbsCoor2D());
    114114            }
    115115          }
    116116          else
    117117          {
    118             if (GLGuiWidget::focused()->clickable())
     118            if (GLGuiWidget::mouseFocused()->clickable())
    119119            {
    120120              Vector2D cursorPos = (this->_cursor != NULL) ? this->_cursor->getAbsCoor2D() : Vector2D(event.x, event.y);
    121               GLGuiWidget::focused()->release(cursorPos - GLGuiWidget::focused()->getAbsCoor2D());
     121              GLGuiWidget::mouseFocused()->release(cursorPos - GLGuiWidget::mouseFocused()->getAbsCoor2D());
    122122            }
    123123          }
     
    125125        break;
    126126      case EV_LEAVE_STATE:
    127         if (GLGuiWidget::focused() != NULL)
    128           GLGuiWidget::focused()->breakFocus();
     127        if (GLGuiWidget::mouseFocused() != NULL)
     128          GLGuiWidget::mouseFocused()->breakMouseFocus();
    129129        break;
    130130
     
    137137
    138138
    139     if (GLGuiWidget::focused())
    140     {
    141       GLGuiWidget::focused()->processEvent(event);
     139    if (GLGuiWidget::mouseFocused())
     140    {
     141      GLGuiWidget::mouseFocused()->processEvent(event);
    142142    }
    143143
     
    192192        {
    193193          // receiving Focus
    194           if (GLGuiWidget::focused() != widget)
     194          if (GLGuiWidget::mouseFocused() != widget)
    195195          {
    196             widget->giveFocus();
     196            widget->giveMouseFocus();
    197197          }
    198198          return ;
    199199        }
    200200      }
    201       if (GLGuiWidget::focused() != NULL)
    202         GLGuiWidget::focused()->breakFocus();
     201      if (GLGuiWidget::mouseFocused() != NULL)
     202        GLGuiWidget::mouseFocused()->breakMouseFocus();
    203203    }
    204204  }
  • branches/gui/src/lib/gui/gl/glgui_table.cc

    r8651 r8652  
    264264
    265265    glEnd();
     266
     267
    266268
    267269    this->endDraw();
  • branches/gui/src/lib/gui/gl/glgui_widget.cc

    r8631 r8652  
    7272  GLGuiWidget::~GLGuiWidget()
    7373  {
    74     if (this == GLGuiWidget::_focused)
    75       GLGuiWidget::_focused = NULL;
     74    if (this == GLGuiWidget::_mouseFocused)
     75      GLGuiWidget::_mouseFocused = NULL;
    7676  }
    7777
    7878  GLGuiWidget* GLGuiWidget::_selected = NULL;
    79   GLGuiWidget* GLGuiWidget::_focused = NULL;
     79  GLGuiWidget* GLGuiWidget::_mouseFocused = NULL;
    8080  GLGuiWidget* GLGuiWidget::_inputGrabber = NULL;
    8181
     
    134134
    135135  /** @brief gives focus to this widget */
    136   void GLGuiWidget::giveFocus()
    137   {
    138     if (GLGuiWidget::focused() != NULL)
    139       GLGuiWidget::focused()->breakFocus();
    140     GLGuiWidget::_focused = this;
     136  void GLGuiWidget::giveMouseFocus()
     137  {
     138    if (GLGuiWidget::mouseFocused() != NULL)
     139      GLGuiWidget::mouseFocused()->breakMouseFocus();
     140    GLGuiWidget::_mouseFocused = this;
    141141    this->receivedFocus();
    142142  };
    143143
    144   void GLGuiWidget::breakFocus()
    145   {
    146     if (GLGuiWidget::_focused == this)
     144  void GLGuiWidget::breakMouseFocus()
     145  {
     146    if (GLGuiWidget::_mouseFocused == this)
    147147    {
    148       GLGuiWidget::_focused = NULL;
     148      GLGuiWidget::_mouseFocused = NULL;
    149149      this->_pushed = false;
    150150      this->removedFocus();
  • branches/gui/src/lib/gui/gl/glgui_widget.h

    r8647 r8652  
    4343    /// FOCUS
    4444    /** @brief gives focus to this widget */
    45     void giveFocus();
    46     void breakFocus();
     45    void giveMouseFocus();
     46    void breakMouseFocus();
    4747    /** @returns true if the widget is focusable */
    4848    bool focusable() const { return this->_focusable; };
     
    5555
    5656    /** @returns the currently focused Widget (NULL if none is selected) */
    57     static GLGuiWidget* focused() { return GLGuiWidget::_focused; };
     57    static GLGuiWidget* mouseFocused() { return GLGuiWidget::_mouseFocused; };
    5858
    5959
     
    251251  private:
    252252    static GLGuiWidget*            _selected;         //!< The currently selected Widget.
    253     static GLGuiWidget*            _focused;          //!< The currently Focused Widget (mouse-focus).
     253    static GLGuiWidget*            _mouseFocused;     //!< The currently Focused Widget (mouse-focus).
    254254    static GLGuiWidget*            _inputGrabber;     //!< The Widget that grabs input (keyboard-focus).
    255255
Note: See TracChangeset for help on using the changeset viewer.