#ifndef MOUSEAPICURSOR_H #define MOUSEAPICURSOR_H #include #include "core/CoreIncludes.h" #include "tools/interfaces/Tickable.h" #include "overlays/OverlayGroup.h" #include "mouseapi.h" #include "core/XMLPort.h" #if OGRE_VERSION >= 0x010900 # include # include #else # include # include #endif #include "tools/TextureGenerator.h" #include "util/StringUtils.h" namespace orxonox{ class MouseAPICursor: public OrxonoxOverlay, public Tickable { private: Ogre::PanelOverlayElement* cursor; bool running = false; std::string cursorname = "cursor.png"; public: MouseAPICursor(Context* context); ~MouseAPICursor(); virtual void tick(float dt) override; virtual void XMLPort(ticpp::Element &xmlelement, XMLPort::Mode mode) override; inline void setCursorName(const std::string& name) { cursorname = name; cursor->setMaterialName(TextureGenerator::getMaterialName( cursorname, Ogre::ColourValue::White)); } inline std::string getCursorName(void) const { return cursorname; } }; } #endif // MOUSEAPICURSOR_H