History

Fix 'Browse Avatars' button from Avatar Settings

Zach Fox committed 8 years ago

Commit e6279251 parent 3c36b8f5 files · +11 −213Browse files

Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all

Unified · Split

interface/src/Application.cpp+9−0
@@ -6776,6 +6776,15 @@ void Application::loadAddAvatarBookmarkDialog() const { · 6775 unmodified lines
67766776 avatarBookmarks->addBookmark();
67776777 }
67786778
6779+void Application::loadAvatarBrowser() const {
6780+ auto tablet = dynamic_cast<TabletProxy*>(DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system"));
6781+ // construct the url to the marketplace item
6782+ QString url = NetworkingConstants::METAVERSE_SERVER_URL().toString() + "/marketplace?category=avatars";
6783+ QString MARKETPLACES_INJECT_SCRIPT_PATH = "file:///" + qApp->applicationDirPath() + "/scripts/system/html/js/marketplacesInject.js";
6784+ tablet->gotoWebScreen(url, MARKETPLACES_INJECT_SCRIPT_PATH);
6785+ DependencyManager::get<HMDScriptingInterface>()->openTablet();
6786+}
6787+
67796788 void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRatio) {
67806789 postLambdaEvent([notify, includeAnimated, aspectRatio, this] {
67816790 // Get a screenshot and save it