Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 2, 2011, 1:31:12 PM (13 years ago)
Author:
baermatt
Message:

Added screenshots and description-box in singleplayer menu

Location:
code/branches/menue/src/orxonox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menue/src/orxonox/LevelInfo.cc

    r8858 r8912  
    189189
    190190        XMLPortParam(LevelInfo, "description", setDescription, getDescription, xmlelement, mode);
     191        XMLPortParam(LevelInfo, "screenshot", setScreenshot, getScreenshot, xmlelement, mode);
    191192        XMLPortParam(LevelInfo, "tags", setTags, getTags, xmlelement, mode);
    192193    }
     
    203204        LevelInfoItem* info = new LevelInfoItem(this->BaseObject::getName(), this->getXMLFilename());
    204205        info->setDescription(this->getDescription());
     206        info->setScreenshot(this->getScreenshot());
    205207        info->setTags(this->getTags());
    206208        return info;
  • code/branches/menue/src/orxonox/LevelInfo.h

    r8079 r8912  
    7777            */
    7878            inline const std::string& getName(void) const { return this->name_; } // tolua_export
     79       
     80            /**
     81            @brief Set the screenshot of the Level.
     82            @param screenshot The screenshot to be set.
     83            */
     84            inline void setScreenshot(const std::string& screenshot) { this->screenshot_ = std::string(screenshot); }
     85            /**
     86            @brief Get the screenshot of the Level.
     87            @return Returns the screenshot of the Level.
     88            */
     89            inline const std::string& getScreenshot() const { return this->screenshot_; } // tolua_export
    7990
    8091            /**
     
    138149            std::string name_; //!< The name of the Level.
    139150            std::string description_; //!< The description of the Level.
     151            std::string screenshot_; //!< The screenshot of the Level.
    140152            std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
    141153            std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
     
    148160        - @b name The name of the level.
    149161        - @b description The description of the level.
     162        - @b screenshot The screenshot of the level.
    150163        - @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>.
    151164
     
    155168            name = "Levelname"lhs->compare(rhs) < 0
    156169            description = "This is just some awesome level."
     170            screenshot = "Screenshot.png"
    157171            tags = "test, awesome"
    158172        />
     
    172186
    173187            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML.
     188       
     189            /**
     190            @brief Set the screenshot of the Level.
     191            @param screenshot The screenshot to be set.
     192            */
     193            inline void setScreenshot(const std::string& screenshot) { this->LevelInfoItem::setScreenshot(screenshot); }
     194            /**
     195            @brief Get the screenshot of the Level.
     196            @return Returns the screenshot of the Level.
     197            */
     198            inline const std::string& getScreenshot() const { return this->LevelInfoItem::getScreenshot(); }
    174199
    175200            /**
Note: See TracChangeset for help on using the changeset viewer.