Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/lib/gui


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

Location:
trunk/src/lib/gui
Files:
47 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_bar.cc

    r8991 r9869  
    2323{
    2424
     25  ObjectListDefinition(GLGuiBar);
    2526  /**
    2627   * @brief standard constructor
     
    4445  void GLGuiBar::init()
    4546  {
    46     this->setClassID(CL_GLGUI_BAR, "GLGuiBar");
     47    this->registerObject(this, GLGuiBar::_objectList);
    4748
    4849    this->setFrontColor(_changedValueColor, true);
  • trunk/src/lib/gui/gl/glgui_bar.h

    r8991 r9869  
    2121  class GLGuiBar : public GLGuiWidget
    2222  {
    23 
     23    ObjectListDeclaration(GLGuiBar);
    2424  public:
    2525    GLGuiBar();
  • trunk/src/lib/gui/gl/glgui_box.cc

    r9656 r9869  
    2222namespace OrxGui
    2323{
     24  ObjectListDefinition(GLGuiBox);
    2425  /**
    2526   * standard constructor
     
    5253  void GLGuiBox::init()
    5354  {
    54     this->setClassID(CL_GLGUI_BOX, "GLGuiBox");
     55    this->registerObject(this, GLGuiBox::_objectList);
    5556  }
    5657
     
    149150    while (itC != this->_children.end())
    150151    {
    151       if ((*itC)->isA(CL_GLGUI_CONTAINER))
     152      if ((*itC)->isA(GLGuiContainer::staticClassID()))
    152153        static_cast<GLGuiContainer*>(*itC)->showAll();
    153154      else
     
    164165    while (itC != this->_children.end())
    165166    {
    166       if ((*itC)->isA(CL_GLGUI_CONTAINER))
     167      if ((*itC)->isA(GLGuiContainer::staticClassID()))
    167168        static_cast<GLGuiContainer*>(*itC)->hideAll();
    168169      else
  • trunk/src/lib/gui/gl/glgui_box.h

    r9656 r9869  
    1919  class GLGuiBox : public GLGuiContainer
    2020  {
    21 
     21    ObjectListDeclaration(GLGuiBox);
    2222  public:
    2323    GLGuiBox(OrxGui::Orientation orientation = OrxGui::Vertical);
  • trunk/src/lib/gui/gl/glgui_button.cc

    r9406 r9869  
    2323namespace OrxGui
    2424{
     25  ObjectListDefinition(GLGuiButton);
    2526  /**
    2627   * standard constructor
     
    5051  void GLGuiButton::init()
    5152  {
    52     this->setClassID(CL_GLGUI_BUTTON, "GLGuiButton");
     53    this->registerObject(this, GLGuiButton::_objectList);
    5354
    5455    this->setSelectable(true);
  • trunk/src/lib/gui/gl/glgui_button.h

    r9406 r9869  
    3131  class GLGuiButton : public GLGuiWidget
    3232  {
    33 
     33    ObjectListDeclaration(GLGuiButton);
    3434    public:
    3535      GLGuiButton(const std::string& label);
  • trunk/src/lib/gui/gl/glgui_checkbutton.cc

    r9406 r9869  
    2222namespace OrxGui
    2323{
    24 
     24  ObjectListDefinition(GLGuiCheckButton);
    2525
    2626  /**
     
    4949  void GLGuiCheckButton::init()
    5050  {
    51     this->setClassID(CL_GLGUI_CHECKBUTTON, "GLGuiCheckButton");
     51    this->registerObject(this, GLGuiCheckButton::_objectList);
    5252  }
    5353
  • trunk/src/lib/gui/gl/glgui_checkbutton.h

    r9406 r9869  
    2121  class GLGuiCheckButton : public GLGuiButton
    2222  {
    23 
     23    ObjectListDeclaration(GLGuiCheckButton);
    2424  public:
    2525    GLGuiCheckButton(const std::string& label = "", bool active = false);
  • trunk/src/lib/gui/gl/glgui_colorselector.h

    r8145 r9869  
    2121  class GLGui : public GLGui
    2222  {
    23 
     23    ObjectListDeclaration(GLGuiColorSelector);
    2424  public:
    2525    GLGui();
  • trunk/src/lib/gui/gl/glgui_container.cc

    r9656 r9869  
    2020namespace OrxGui
    2121{
    22 
     22  ObjectListDefinition(GLGuiContainer);
    2323  /**
    2424   * standard constructor
     
    4141  void GLGuiContainer::init()
    4242  {
    43     this->setClassID(CL_GLGUI_CONTAINER, "GLGuiContainer");
     43    this->registerObject(this, GLGuiContainer::_objectList);
    4444
    4545    this->setBackgroundTexture("gui_container_background.png");
  • trunk/src/lib/gui/gl/glgui_container.h

    r9656 r9869  
    2020  class GLGuiContainer : public GLGuiWidget
    2121  {
    22 
     22    ObjectListDeclaration(GLGuiContainer);
    2323  public:
    2424    GLGuiContainer();
  • trunk/src/lib/gui/gl/glgui_cursor.cc

    r8619 r9869  
    2323namespace OrxGui
    2424{
    25 
     25  ObjectListDefinition(GLGuiCursor);
    2626  /**
    2727   * standard constructor
     
    5555  void GLGuiCursor::init()
    5656  {
    57     this->setClassID(CL_GLGUI_CURSOR, "GLGuiCursor");
     57    this->registerObject(this, GLGuiCursor::_objectList);
    5858
    5959    this->setBackgroundColor(Color(1.0, 1.0, 1.0, 1.0));
  • trunk/src/lib/gui/gl/glgui_cursor.h

    r8324 r9869  
    2626  class GLGuiCursor : public GLGuiWidget, public EventListener
    2727  {
    28 
     28    ObjectListDeclaration(GLGuiCursor);
    2929  public:
    3030    GLGuiCursor();
  • trunk/src/lib/gui/gl/glgui_fixedposition_box.cc

    r9656 r9869  
    2323namespace OrxGui
    2424{
     25  ObjectListDefinition(GLGuiFixedpositionBox);
    2526  /**
    2627   * standard constructor
     
    2930      : GLGuiBox(orientation)
    3031  {
     32    this->registerObject(this, GLGuiFixedpositionBox::_objectList);
     33
    3134    this->subscribeEvent(ES_ALL, EV_VIDEO_RESIZE);
    3235    this->setPosition(position);
  • trunk/src/lib/gui/gl/glgui_fixedposition_box.h

    r9656 r9869  
    2121  class GLGuiFixedpositionBox : public OrxGui::GLGuiBox, EventListener
    2222  {
    23 
     23    ObjectListDeclaration(GLGuiFixedpositionBox);
    2424    public:
    2525      GLGuiFixedpositionBox(OrxGui::Position position = OrxGui::Center, OrxGui::Orientation orientation = OrxGui::Vertical);
  • trunk/src/lib/gui/gl/glgui_frame.cc

    r9406 r9869  
    2121namespace OrxGui
    2222{
    23 
     23  ObjectListDefinition(GLGuiFrame);
    2424  /**
    2525   * standard constructor
     
    4444  void GLGuiFrame::init()
    4545  {
    46     this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame");
     46    this->registerObject(this, GLGuiFrame::_objectList);
    4747    this->child = NULL;
    4848  }
     
    7171    if (this->child != NULL)
    7272    {
    73       if (this->child->isA(CL_GLGUI_CONTAINER))
     73      if (this->child->isA(GLGuiContainer::staticClassID()))
    7474        static_cast<GLGuiContainer*>(this->child)->showAll();
    7575      else
     
    8383    if (this->child != NULL)
    8484    {
    85       if (this->child->isA(CL_GLGUI_CONTAINER))
     85      if (this->child->isA(GLGuiContainer::staticClassID()))
    8686        static_cast<GLGuiContainer*>(this->child)->hideAll();
    8787      else
  • trunk/src/lib/gui/gl/glgui_frame.h

    r8145 r9869  
    2020  class GLGuiFrame : public GLGuiContainer
    2121  {
    22 
     22    ObjectListDeclaration(GLGuiFrame);
    2323  public:
    2424    GLGuiFrame();
  • trunk/src/lib/gui/gl/glgui_handler.cc

    r9656 r9869  
    2323#include "glgui_cursor.h"
    2424
    25 #include "class_list.h"
     25#include "loading/resource_manager.h"
     26
    2627#include <cassert>
    2728
     
    3132/// TAKE THIS OUT OF HERE.
    3233#include "graphics_engine.h"
    33 #include "loading/resource_manager.h"
    3434
    3535namespace OrxGui
    3636{
    37 
     37  ObjectListDefinition(GLGuiHandler);
    3838  /**
    3939   * standard constructor
     
    4141  GLGuiHandler::GLGuiHandler ()
    4242  {
    43     this->setClassID(CL_GLGUI_HANDLER, "GLGuiHandler");
     43    this->registerObject(this, GLGuiHandler::_objectList);
    4444    this->setName("GLGuiHandler");
    4545
     
    7777    this->_cursor->setMaxBorders(Vector2D(GraphicsEngine::getInstance()->getResolutionX(), GraphicsEngine::getInstance()->getResolutionY()));
    7878
    79     _cursor->loadTextureSequence(ResourceManager::getInstance()->getDataDir() + "/" + "maps/reap_mouse/reap_mouse_##.png", 1, 49);
     79    _cursor->loadTextureSequence(Resources::ResourceManager::getInstance()->mainGlobalPath().name() + "/" + "maps/reap_mouse/reap_mouse_##.png", 1, 49);
    8080
    8181  }
     
    117117  {
    118118    // retrieve Objects.
    119     const std::list<BaseObject*>* objects = ClassList::getList(CL_GLGUI_WIDGET);
    120 
    121     if (objects)
    122     {
    123       std::list<BaseObject*>::const_iterator it ;
    124       std::list<BaseObject*>::const_iterator currentIt = objects->end();
     119    ObjectList<GLGuiWidget>::const_iterator it, currentIt;
     120    currentIt = GLGuiWidget::objectList().end();
     121
     122    if (GLGuiWidget::selected() != NULL)
     123    {
     124      it = std::find(GLGuiWidget::objectList().begin(), GLGuiWidget::objectList().end(), GLGuiWidget::selected());
     125      if (it != GLGuiWidget::objectList().end())
     126      {
     127        currentIt = it;
     128        it++;
     129      }
     130    }
     131    else
     132    {
     133      it = GLGuiWidget::objectList().begin();
     134    }
     135
     136    bool cycledOnce = false;
     137
     138    for (; it != currentIt; ++it)
     139    {
     140      if (it == GLGuiWidget::objectList().end() && !cycledOnce)
     141      {
     142        it = GLGuiWidget::objectList().begin();
     143        cycledOnce = true;
     144      }
     145
     146      if ((*it)->selectable() && (*it)->isVisible())
     147      {
     148        (*it)->select();
     149        return;
     150      }
     151    }
     152
     153  }
     154
     155  void GLGuiHandler::selectPrevious()
     156  {
     157    ObjectList<GLGuiWidget>::const_iterator it, currentIt;
     158    currentIt = GLGuiWidget::objectList().begin();
    125159
    126160      if (GLGuiWidget::selected() != NULL)
    127161      {
    128         it = std::find(objects->begin(), objects->end(), GLGuiWidget::selected());
    129         if (it != objects->end())
    130         {
    131           currentIt = it;
    132           it++;
    133         }
    134       }
    135       else
    136       {
    137         it = objects->begin();
    138       }
    139 
    140       bool cycledOnce = false;
    141 
    142       for (; it != currentIt; ++it)
    143       {
    144         if (it == objects->end() && !cycledOnce)
    145         {
    146           it = objects->begin();
    147           cycledOnce = true;
    148         }
    149 
    150         if (dynamic_cast<GLGuiWidget*>(*it)->selectable() && dynamic_cast<GLGuiWidget*>(*it)->isVisible())
    151         {
    152           dynamic_cast<GLGuiWidget*>(*it)->select();
    153           return;
    154         }
    155       }
    156 
    157     }
    158     else
    159     {
    160       PRINTF(0)("NO GUI-ELEMENTS EXISTING\n");
    161     }
    162   }
    163 
    164   void GLGuiHandler::selectPrevious()
    165   {
    166     // retrieve Objects.
    167     const std::list<BaseObject*>* objects = ClassList::getList(CL_GLGUI_WIDGET);
    168 
    169     if (objects)
    170     {
    171       std::list<BaseObject*>::const_iterator it ;
    172       std::list<BaseObject*>::const_iterator currentIt = objects->begin();
    173 
    174       if (GLGuiWidget::selected() != NULL)
    175       {
    176         it = std::find(objects->begin(), objects->end(), GLGuiWidget::selected());
    177         if (it != objects->end())
     162        it = std::find(GLGuiWidget::objectList().begin(), GLGuiWidget::objectList().end(), GLGuiWidget::selected());
     163        if (it != GLGuiWidget::objectList().end())
    178164        {
    179165          currentIt = it;
     
    183169      else
    184170      {
    185         it = objects->end();
     171        it = GLGuiWidget::objectList().end();
    186172      }
    187173
     
    190176      for (; it != currentIt; --it)
    191177      {
    192         if (it == objects->end() && !cycledOnce)
     178        if (it == GLGuiWidget::objectList().end() && !cycledOnce)
    193179        {
    194180          --it ;
     
    196182        }
    197183
    198         if (dynamic_cast<GLGuiWidget*>(*it)->selectable() && dynamic_cast<GLGuiWidget*>(*it)->isVisible())
    199         {
    200           dynamic_cast<GLGuiWidget*>(*it)->select();
     184        if ((*it)->selectable() && (*it)->isVisible())
     185        {
     186          (*it)->select();
    201187          return;
    202188        }
    203189      }
    204190
    205     }
    206     else
    207     {
    208       PRINTF(0)("NO GUI-ELEMENTS EXISTING\n");
    209     }
    210191  }
    211192
     
    217198    {
    218199      case EV_MOUSE_MOTION:
    219         this->checkFocus();
    220         break;
     200      this->checkFocus();
     201      break;
    221202
    222203      case  EV_MOUSE_BUTTON_LEFT:
    223         if (GLGuiWidget::mouseFocused() != NULL && event.bPressed)
    224         {
    225           // if clickable select the Widget.
    226           if (GLGuiWidget::mouseFocused()->clickable())
    227           {
    228             Vector2D cursorPos = (this->_cursor != NULL) ? this->_cursor->getAbsCoor2D() : Vector2D(event.x, event.y);
    229             GLGuiWidget::mouseFocused()->select();
    230             GLGuiWidget::mouseFocused()->click(cursorPos - GLGuiWidget::mouseFocused()->getAbsCoor2D());
    231           }
    232         }
    233         else if (GLGuiWidget::selected() != NULL && !event.bPressed)
    234         {
    235           if (GLGuiWidget::selected()->clickable())
    236           {
    237             Vector2D cursorPos = (this->_cursor != NULL) ? this->_cursor->getAbsCoor2D() : Vector2D(event.x, event.y);
    238             GLGuiWidget::selected()->release(cursorPos - GLGuiWidget::selected()->getAbsCoor2D());
    239           }
    240         }
    241 
    242         break;
     204      if (GLGuiWidget::mouseFocused() != NULL && event.bPressed)
     205      {
     206        // if clickable select the Widget.
     207        if (GLGuiWidget::mouseFocused()->clickable())
     208        {
     209          Vector2D cursorPos = (this->_cursor != NULL) ? this->_cursor->getAbsCoor2D() : Vector2D(event.x, event.y);
     210          GLGuiWidget::mouseFocused()->select();
     211          GLGuiWidget::mouseFocused()->click(cursorPos - GLGuiWidget::mouseFocused()->getAbsCoor2D());
     212        }
     213      }
     214      else if (GLGuiWidget::selected() != NULL && !event.bPressed)
     215      {
     216        if (GLGuiWidget::selected()->clickable())
     217        {
     218          Vector2D cursorPos = (this->_cursor != NULL) ? this->_cursor->getAbsCoor2D() : Vector2D(event.x, event.y);
     219          GLGuiWidget::selected()->release(cursorPos - GLGuiWidget::selected()->getAbsCoor2D());
     220        }
     221      }
     222
     223      break;
    243224      case EV_LEAVE_STATE:
    244         if (GLGuiWidget::selected() != NULL)
    245           GLGuiWidget::selected()->unselect();
    246 
    247         if (GLGuiWidget::mouseFocused() != NULL)
    248           GLGuiWidget::mouseFocused()->breakMouseFocus();
    249         break;
     225      if (GLGuiWidget::selected() != NULL)
     226        GLGuiWidget::selected()->unselect();
     227
     228      if (GLGuiWidget::mouseFocused() != NULL)
     229        GLGuiWidget::mouseFocused()->breakMouseFocus();
     230      break;
    250231
    251232      case EV_VIDEO_RESIZE:
    252         if (this->_cursor != NULL)
    253           this->_cursor->setMaxBorders(Vector2D(event.resize.w, event.resize.h));
    254         this->_resolution = Vector2D(event.resize.w, event.resize.h);
    255         break;
     233      if (this->_cursor != NULL)
     234        this->_cursor->setMaxBorders(Vector2D(event.resize.w, event.resize.h));
     235      this->_resolution = Vector2D(event.resize.w, event.resize.h);
     236      break;
    256237
    257238      case SDLK_TAB:
    258         if (event.bPressed)
    259         {
    260           if (EventHandler::getInstance()->isPressed(SDLK_LSHIFT) || EventHandler::getInstance()->isPressed(SDLK_RSHIFT))
    261             this->selectPrevious();
    262           else
    263             this->selectNext();
    264         }
    265         break;
     239      if (event.bPressed)
     240      {
     241        if (EventHandler::getInstance()->isPressed(SDLK_LSHIFT) || EventHandler::getInstance()->isPressed(SDLK_RSHIFT))
     242          this->selectPrevious();
     243        else
     244          this->selectNext();
     245      }
     246      break;
    266247    }
    267248
     
    304285  {
    305286    // CHECK THE COLLISIONS.
    306     const std::list<BaseObject*>* objects = ClassList::getList(CL_GLGUI_WIDGET);
    307 
    308     if (objects != NULL && this->_cursor != NULL)
    309     {
    310       for (std::list<BaseObject*>::const_iterator it = objects->begin(); it != objects->end(); it++)
    311       {
    312         GLGuiWidget* widget = dynamic_cast<GLGuiWidget*>(*it);
     287    if (this->_cursor != NULL)
     288    {
     289      for (ObjectList<GLGuiWidget>::const_iterator it = GLGuiWidget::objectList().begin();
     290           it != GLGuiWidget::objectList().end();
     291          it++)
     292      {
     293        GLGuiWidget* widget = (*it);
    313294
    314295        if (widget->isVisible() &&
  • trunk/src/lib/gui/gl/glgui_handler.h

    r9656 r9869  
    1919  class GLGuiHandler : public EventListener
    2020  {
    21 
     21    ObjectListDeclaration(GLGuiHandler);
    2222  public:
    2323    /** @returns a Pointer to the only object of this Class */
  • trunk/src/lib/gui/gl/glgui_image.cc

    r8619 r9869  
    2222namespace OrxGui
    2323{
    24 
     24  ObjectListDefinition(GLGuiImage);
    2525  /**
    2626   * standard constructor
     
    4545  void GLGuiImage::init()
    4646  {
    47     this->setClassID(CL_GLGUI_IMAGE, "GLGuiImage");
     47    this->registerObject(this, GLGuiImage::_objectList);
    4848
    4949    this->setForegroundColor(Color(1,1,1,1));
  • trunk/src/lib/gui/gl/glgui_image.h

    r9406 r9869  
    2121  class GLGuiImage : public GLGuiWidget
    2222  {
    23 
     23    ObjectListDeclaration(GLGuiImage);
    2424  public:
    2525    GLGuiImage();
  • trunk/src/lib/gui/gl/glgui_inputline.cc

    r9406 r9869  
    2020namespace OrxGui
    2121{
     22  ObjectListDefinition(GLGuiInputLine);
    2223  /**
    2324   * @brief standard constructor
     
    4445  void GLGuiInputLine::init()
    4546  {
    46     this->setClassID(CL_GLGUI_INPUTLINE, "GLGuiInputLine");
     47    this->registerObject(this, GLGuiInputLine::_objectList);
    4748
    4849    this->setFocusable(true);
  • trunk/src/lib/gui/gl/glgui_inputline.h

    r9406 r9869  
    2525  class GLGuiInputLine : public OrxGui::GLGuiWidget
    2626  {
    27 
     27    ObjectListDeclaration(GLGuiInputLine);
    2828  public:
    2929    GLGuiInputLine();
  • trunk/src/lib/gui/gl/glgui_mainwidget.cc

    r8145 r9869  
    2020namespace OrxGui
    2121{
    22 
     22  ObjectListDefinition(GLGuiMainWidget);
    2323
    2424  /**
     
    2727  GLGuiMainWidget::GLGuiMainWidget()
    2828  {
    29     this->setClassID(CL_GLGUI_MAIN_WIDGET, "GLGuiMainWidget");
     29    this->registerObject(this, GLGuiMainWidget::_objectList);
    3030    this->setName("GLGuiMainWidget");
    3131  }
  • trunk/src/lib/gui/gl/glgui_mainwidget.h

    r8145 r9869  
    1515  class GLGuiMainWidget : public GLGuiWidget
    1616  {
    17 
     17    ObjectListDeclaration(GLGuiMainWidget);
    1818  public:
    1919    virtual ~GLGuiMainWidget(void);
  • trunk/src/lib/gui/gl/glgui_menu.cc

    r8145 r9869  
    2020namespace OrxGui
    2121{
    22 
     22  ObjectListDefinition(GLGuiMenu);
    2323  /**
    2424   * standard constructor
  • trunk/src/lib/gui/gl/glgui_menu.h

    r8145 r9869  
    1919  class GLGuiMenu : public GLGuiMenu
    2020  {
    21 
     21    ObjectListDeclaration(GLGuiMenu);
    2222  public:
    2323    GLGuiMenu();
  • trunk/src/lib/gui/gl/glgui_pushbutton.cc

    r8717 r9869  
    2323namespace OrxGui
    2424{
    25 
     25  ObjectListDefinition(GLGuiPushButton);
    2626  /**
    2727   * @brief standard constructor
     
    5858  void GLGuiPushButton::init()
    5959  {
    60     this->setClassID(CL_GLGUI_PUSHBUTTON, "GLGuiPushButton");
     60    this->registerObject(this, GLGuiPushButton::_objectList);
    6161  }
    6262
  • trunk/src/lib/gui/gl/glgui_pushbutton.h

    r8717 r9869  
    2121  class GLGuiPushButton : public GLGuiButton
    2222  {
    23 
     23    ObjectListDeclaration(GLGuiPushButton);
    2424  public:
    2525    GLGuiPushButton(const std::string& label = "");
  • trunk/src/lib/gui/gl/glgui_slider.cc

    r9406 r9869  
    2323namespace OrxGui
    2424{
    25 
     25  ObjectListDefinition(GLGuiSlider);
    2626  /**
    2727   * @brief standard constructor
     
    4646  {
    4747
    48     this->setClassID(CL_GLGUI_SLIDER, "GLGuiSlider");
     48    this->registerObject(this, GLGuiSlider::_objectList);
    4949
    5050    this->setClickable(true);
  • trunk/src/lib/gui/gl/glgui_slider.h

    r9406 r9869  
    2121  class GLGuiSlider : public GLGuiWidget
    2222  {
    23 
     23    ObjectListDeclaration(GLGuiSlider);
    2424  public:
    2525    GLGuiSlider();
  • trunk/src/lib/gui/gl/glgui_table.cc

    r8717 r9869  
    2323namespace OrxGui
    2424{
     25  ObjectListDefinition(GLGuiTable);
    2526  /**
    2627   * @brief standard constructor
     
    4748  void GLGuiTable::init()
    4849  {
    49     this->setClassID(CL_GLGUI_TABLE, "GLGuiTable");
     50    this->registerObject(this, GLGuiTable::_objectList);
    5051
    5152    this->setBorderTop(10);
  • trunk/src/lib/gui/gl/glgui_table.h

    r8717 r9869  
    2525  class GLGuiTable : public OrxGui::GLGuiWidget
    2626  {
    27 
     27    ObjectListDeclaration(GLGuiTable);
    2828  public:
    2929    GLGuiTable(unsigned int rows, unsigned int columns);
  • trunk/src/lib/gui/gl/glgui_text.cc

    r9656 r9869  
    2222namespace OrxGui
    2323{
     24  ObjectListDefinition(GLGuiText);
    2425  /**
    2526   * standard constructor
     
    4344  void GLGuiText::init()
    4445  {
    45     this->setClassID(CL_GLGUI_TEXT, "GLGuiText");
     46    this->registerObject(this, GLGuiText::_objectList);
    4647
    4748    this->_text.setParent2D(this);
  • trunk/src/lib/gui/gl/glgui_text.h

    r9656 r9869  
    2020  class GLGuiText : public GLGuiWidget
    2121  {
    22 
     22    ObjectListDeclaration(GLGuiText);
    2323  public:
    2424    GLGuiText();
  • trunk/src/lib/gui/gl/glgui_textfield.cc

    r9406 r9869  
    2222namespace OrxGui
    2323{
     24  ObjectListDefinition(GLGuiTextfield);
    2425  /**
    2526   * standard constructor
     
    4344  void GLGuiTextfield::init()
    4445  {
    45     this->setClassID(CL_GLGUI_TEXTFIELD, "GLGuiTextfield");
     46    this->registerObject(this, GLGuiTextfield::_objectList);
    4647
    4748    this->_text.setParent2D(this);
  • trunk/src/lib/gui/gl/glgui_textfield.h

    r9406 r9869  
    2020  class GLGuiTextfield : public GLGuiWidget
    2121  {
    22 
     22    ObjectListDeclaration(GLGuiTextfield);
    2323  public:
    2424    GLGuiTextfield();
  • trunk/src/lib/gui/gl/glgui_widget.cc

    r9656 r9869  
    2525
    2626#include "loading/load_param.h"
    27 
    28 /// TODO TAKE THIS OUT OF HERE
    2927#include "loading/resource_manager.h"
    3028
    3129namespace OrxGui
    3230{
    33 
     31  ObjectListDefinition(GLGuiWidget);
    3432  /**
    3533   * @brief standard constructor
     
    9593  void GLGuiWidget::init()
    9694  {
    97     this->setClassID(CL_GLGUI_WIDGET, "GLGuiWidget");
     95    this->registerObject(this, GLGuiWidget::_objectList);
    9896
    9997    this->_focusable = false;
     
    104102
    105103    if(GLGuiWidget::_defaultFont == NULL)
    106       GLGuiWidget::_defaultFont = new Font(ResourceManager::getInstance()->getDataDir() + "/fonts/final_frontier.ttf", 20);
     104      GLGuiWidget::_defaultFont = new Font(Resources::ResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/final_frontier.ttf", 20);
    107105
    108106    this->_font = *GLGuiWidget::_defaultFont;
  • trunk/src/lib/gui/gl/glgui_widget.h

    r9656 r9869  
    2121namespace OrxGui
    2222{
    23 
    2423  class GLGuiCursor;
    2524
     
    3130  class GLGuiWidget : public Element2D
    3231  {
     32    ObjectListDeclaration(GLGuiWidget);
    3333  public:
    3434    GLGuiWidget(GLGuiWidget* parent = NULL);
  • trunk/src/lib/gui/gl/glgui_window.cc

    r8145 r9869  
    2020namespace OrxGui
    2121{
    22 
     22  ObjectListDefinition(GLGuiWindow);
    2323  /**
    2424   * standard constructor
     
    4343  void GLGuiWindow::init()
    4444  {
    45     this->setClassID(CL_GLGUI_WINDOW, "GLGuiWindow");
     45    this->registerObject(this, GLGuiWindow::_objectList);
    4646
    4747  }
  • trunk/src/lib/gui/gl/glgui_window.h

    r8145 r9869  
    2020  class GLGuiWindow : public GLGuiContainer
    2121  {
    22 
     22    ObjectListDeclaration(GLGuiWindow);
    2323  public:
    2424    GLGuiWindow();
  • trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc

    r9406 r9869  
    2424#include "util/loading/factory.h"
    2525#include "util/loading/load_param.h"
    26 
    27 CREATE_FACTORY(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);
    28 
     26#include "debug.h"
     27
     28#include "class_id_DEPRECATED.h"
     29ObjectListDefinitionID(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);
     30CREATE_FACTORY(GLMenuImageScreen);
    2931
    3032/**
     
    3335GLMenuImageScreen::GLMenuImageScreen(const TiXmlElement* root)
    3436{
    35   this->setClassID(CL_GLMENU_IMAGE_SCREEN, "GLMenuImageScreen");
     37  this->registerObject(this, GLMenuImageScreen::_objectList);
    3638  this->setName("GLMenuLoadScreen");
    3739  // Select Our VU Meter Background Texture
     
    5860{
    5961  LoadParam(root, "BackgroundImage", this, GLMenuImageScreen, setBackgroundImage)
    60     .describe("sets the image to load onto the loadscreen");
     62  .describe("sets the image to load onto the loadscreen");
    6163
    6264  LoadParam(root, "BackgroundPS", this, GLMenuImageScreen, setPosScale)
    63     .describe("The Position and Scale of the Background Image in %(0-1.0). PosX, PosY, SizeX, SizeY");
     65  .describe("The Position and Scale of the Background Image in %(0-1.0). PosX, PosY, SizeX, SizeY");
    6466
    6567  LoadParam(root, "BarImage", this, GLMenuImageScreen, setBarImage)
    66     .describe("sets the image of the LoadingBar");
     68  .describe("sets the image of the LoadingBar");
    6769
    6870  LoadParam(root, "BarPS", this, GLMenuImageScreen, setBarPosScale)
    69     .describe("The Position and Scale of the Loading Bar in %(0-1.0). PosX, PosY, SizeX, SizeY");
     71  .describe("The Position and Scale of the Loading Bar in %(0-1.0). PosX, PosY, SizeX, SizeY");
    7072
    7173  LoadParam(root, "ElementCount", this, GLMenuImageScreen, setMaximum)
    72     .describe("The Count of elements to load into the bar (this is only a maximum value)");
     74  .describe("The Count of elements to load into the bar (this is only a maximum value)");
    7375}
    7476
  • trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.h

    r8145 r9869  
    1515class GLMenuImageScreen : public BaseObject
    1616{
    17 
     17  ObjectListDeclaration(GLMenuImageScreen);
    1818public:
    1919  GLMenuImageScreen (const TiXmlElement* root = NULL);
     
    3333  void setMaximum (int maxValue);
    3434  /** @returns the maximum of countable steps*/
    35   inline int GLMenuImageScreen::getMaximum() const { return this->maxValue; };
     35  inline int getMaximum() const { return this->maxValue; };
    3636
    3737  void setValue (int currentValue);
  • trunk/src/lib/gui/gl/specials/glgui_notifier.cc

    r8619 r9869  
    2323namespace OrxGui
    2424{
    25 
     25  ObjectListDefinition(GLGuiNotifier);
    2626  /**
    2727   * @brief standard constructor
     
    2929  GLGuiNotifier::GLGuiNotifier ()
    3030  {
    31     this->setClassID(CL_GLGUI_NOTIFIER, "GLGuiNotifier");
     31    this->registerObject(this, GLGuiNotifier::_objectList);
    3232
    3333    // Element2D and generals
  • trunk/src/lib/gui/gl/specials/glgui_notifier.h

    r8619 r9869  
    2424  class GLGuiNotifier : public GLGuiWidget
    2525  {
     26    ObjectListDeclaration(GLGuiNotifier);
    2627  public:
    2728    GLGuiNotifier();
     
    6768      MultiLineText*    text;
    6869
    69     } DisplayLine;
     70    }
     71    DisplayLine;
    7072
    7173
  • trunk/src/lib/gui/gui.cc

    r7661 r9869  
    1818#include "gui.h"
    1919#include "gui_saveable.h"
    20 #include "preferences.h"
     20#include "parser/preferences/preferences.h"
    2121
    2222namespace OrxGui
  • trunk/src/lib/gui/gui_saveable.cc

    r9406 r9869  
    1818#include "gui_saveable.h"
    1919#include "gui.h"
    20 #include "preferences.h"
     20#include "parser/preferences/preferences.h"
    2121
    2222#include "debug.h"
Note: See TracChangeset for help on using the changeset viewer.