Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2008, 12:21:42 AM (16 years ago)
Author:
rgrieder
Message:
  • added XML loadable HUD
  • Radar and navi are not yet done
  • explanations follow with when things are finished
Location:
code/branches/hud/src/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud/src/core/BaseObject.cc

    r1559 r1588  
    6666
    6767    /**
    68         @brief load general xml paramters
    69     */
    70     void BaseObject::loadParams(TiXmlElement* xmlElem)
    71     {
    72         if (xmlElem->Attribute("name"))
    73         {
    74             this->setName(xmlElem->Attribute("name"));
    75         }
    76     }
    77 
    78     /**
    7968        @brief XML loading and saving.
    8069        @param xmlelement The XML-element
     
    8574    {
    8675        XMLPortParam(BaseObject, "name", setName, getName, xmlelement, mode);
     76        XMLPortParam(BaseObject, "visible", setVisibility, isVisible, xmlelement, mode);
     77        XMLPortParam(BaseObject, "active", setActivity, isActive, xmlelement, mode);
    8778    }
    8879
  • code/branches/hud/src/core/BaseObject.h

    r1558 r1588  
    5252            BaseObject();
    5353            virtual ~BaseObject();
    54             virtual void loadParams(TiXmlElement* xmlElem);
    5554            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5655
  • code/branches/hud/src/core/Loader.cc

    r1505 r1588  
    116116        Script::run();*/
    117117        Script* lua = Script::getInstance();
     118        lua->clearLuaOutput();
    118119        lua->loadFile(level->getFile(), true);
    119120        lua->run();
  • code/branches/hud/src/core/Script.h

    r1505 r1588  
    7272    inline std::string getLuaOutput() { return output_; };
    7373    //inline std::string* getFileString() { return &fileString_; };
     74    inline void clearLuaOutput() { output_ = ""; }
    7475
    7576    unsigned int getNextQuote(const std::string& text, unsigned int start);
Note: See TracChangeset for help on using the changeset viewer.