#include "AvatarViewService.hpp" #include "LauncherView.hpp" #include "Reflection/Reflection.hpp" #include "Utility/StandardOut.hpp" #include namespace Aya { static Reflection::BoundFuncDesc avs_setColor( &AvatarViewService::setColor, "SetColor", "colorJSON", Security::None); static Reflection::BoundFuncDesc avs_getColor(&AvatarViewService::getColors, "GetColor", Security::None); const char* const sAvatarViewService = "AvatarViewService"; static Reflection::EventDesc event_assetWornSignal( &AvatarViewService::assetWornSignal, "AssetWorn", "assetId", "assetType"); AvatarViewService::AvatarViewService() { setName(sAvatarViewService); } AvatarViewService::~AvatarViewService() {} void AvatarViewService::setJsHelpers(JsHelpers* helpers) { this->helpers = helpers; } void AvatarViewService::setColor(std::string json) { if (!this->helpers) throw std::runtime_error("helpers invalid"); this->helpers->setBodyColorJson(QString::fromStdString(json)); // this->helpers->onMapPicked() } std::string AvatarViewService::getColors() { if (!this->helpers) throw std::runtime_error("helpers invalid"); QString json = this->helpers->getBodyColorJson(); return json.toUtf8().constData(); ; // this->helpers->onMapPicked() } } // namespace Aya