Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5513 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Nov 9, 2005, 12:22:43 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: color adaption in the shell
isA also with String (slow)

Location:
trunk/src/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/base_object.cc

    r5447 r5513  
    126126
    127127/**
     128 *  checks if the class is a classID
     129 * @param classID the Identifier to check for
     130 * @returns true if it is, false otherwise
     131 */
     132bool BaseObject::isA (const char* className) const
     133{
     134  long classID = ClassList::StringToID(className);
     135  if (classID != CL_NULL)
     136    return this->isA(classID);
     137}
     138
     139
     140/**
    128141 *  displays everything this class is
    129142 */
  • trunk/src/lib/lang/base_object.h

    r5511 r5513  
    2626
    2727  void loadParams(const TiXmlElement* root);
    28 
    2928  void setName (const char* newName);
    3029  /** returns the Name of this Object */
     
    3736
    3837  bool isA (long classID) const;
     38  bool isA (const char* className) const;
    3939  void whatIs() const;
    4040
  • trunk/src/lib/lang/class_list.cc

    r5352 r5513  
    242242bool ClassList::exists(const BaseObject* object, long classID)
    243243{
    244   if(unlikely(ClassList::first == NULL))
     244  if(unlikely(ClassList::first == NULL) || object == NULL)
    245245    return false;
    246246  else
     
    252252      {
    253253        tIterator<BaseObject>* iterator = tmp->objectList->getIterator();
    254         BaseObject* enumBO = iterator->firstElement();
     254        const BaseObject* enumBO = iterator->firstElement();
    255255        while (enumBO != NULL)
    256256        {
  • trunk/src/lib/shell/shell.h

    r5374 r5513  
    1717#define         SHELL_DEFAULT_FONT              "fonts/dpquake_.ttf"
    1818#define         SHELL_DEFAULT_TEXT_COLOR        1.0f, 0.0f, 0.0f, 1.0f
    19 #define         SHELL_DEFAULT_BACKGROUND_COLOR  0.0f, 0.0f, 0.8f, 0.8f
     19#define         SHELL_DEFAULT_BACKGROUND_COLOR  0.0f, 0.0f, 0.0f, 1.0f
    2020
    2121// FORWARD DECLARATION
Note: See TracChangeset for help on using the changeset viewer.