Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8672 in orxonox.OLD for branches/gui/src


Ignore:
Timestamp:
Jun 21, 2006, 2:59:55 PM (18 years ago)
Author:
bensch
Message:

selectables

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

Legend:

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

    r8667 r8672  
    5151  {
    5252    this->setClassID(CL_GLGUI_BUTTON, "GLGuiButton");
     53
     54    this->setSelectable(true);
    5355    this->setFocusable(true);
    5456    this->setClickable(true);
  • branches/gui/src/lib/gui/gl/glgui_handler.cc

    r8671 r8672  
    2424#include "class_list.h"
    2525
     26#include "debug.h"
     27
    2628#include <cassert>
    2729
     
    100102  void GLGuiHandler::selectNext()
    101103  {
     104    printf("searching next Widget\n");
     105    // retrieve Objects.
    102106    const std::list<BaseObject*>* objects = ClassList::getList(CL_GLGUI_WIDGET);
     107
    103108    if (objects)
    104109    {
    105110      std::list<BaseObject*>::const_iterator it ;
    106       std::list<BaseObject*>::const_iterator currentIt = objects->begin();
     111      std::list<BaseObject*>::const_iterator currentIt = objects->end();
    107112
    108113      if (GLGuiWidget::selected() != NULL)
    109114      {
    110 
    111115        it = std::find(objects->begin(), objects->end(), GLGuiWidget::selected());
    112116        if (it != objects->end())
     
    115119          it++;
    116120        }
    117         if (it == objects->end())
     121      }
     122      else
     123      {
     124        it = objects->begin();
     125      }
     126
     127      bool cycledOnce = false;
     128
     129      for (; it != currentIt; ++it)
     130      {
     131        if (it == objects->end() && !cycledOnce)
     132        {
    118133          it = objects->begin();
    119       }
    120       else
    121       {
    122         it = objects->begin();
    123       }
    124 
    125       for (; it != objects->end() && currentIt != it; ++it)
    126       {
     134          cycledOnce = true;
     135        }
     136
    127137        if (dynamic_cast<GLGuiWidget*>(*it)->selectable())
    128138        {
     
    132142      }
    133143
     144    }
     145    else
     146    {
     147      PRINTF(0)("NO GUI-ELEMENTS EXISTING\n");
    134148    }
    135149  }
  • branches/gui/src/lib/gui/gl/glgui_inputline.cc

    r8653 r8672  
    4848    this->setFocusable(true);
    4949    this->setClickable(true);
     50    this->setSelectable(true);
    5051
    5152    this->_clearOnEnter = false;
  • branches/gui/src/lib/gui/gl/glgui_slider.cc

    r8669 r8672  
    4848    this->setClassID(CL_GLGUI_SLIDER, "GLGuiSlider");
    4949
    50     this->setClickable( );
    51     this->setFocusable( );
     50    this->setClickable(true);
     51    this->setFocusable(true);
     52    this->setSelectable(true);
    5253
    5354    this->_value = 0.0;
  • branches/gui/src/lib/gui/gl/glgui_widget.cc

    r8670 r8672  
    9393    this->_focusable = false;
    9494    this->_clickable = false;
     95    this->_selectable = false;
    9596    this->_pushed = false;
    9697    this->_state = OrxGui::Normal;
    97     this->_pushed = false;
    9898
    9999
Note: See TracChangeset for help on using the changeset viewer.