var HelpCursor = View.extend({ el: "#helpCursor", messages: { start: "Welcome to Vvalls! Click one of the tools at right to learn how it works.", media: "This is where you pick media to go on the walls. You can upload media, paste links, or use some of the found media.", presets: "These presets will affect on all the walls. Click some of them to see the walls change.", wallpaper: "Drag the wallpaper onto the walls, floor, and ceiling.", colors: "", settings: "This is where you publish your project.", }, shown: {}, initialize: function(){ $(window).mousemove(function(e){ this.el.style.left = e.pageX + "px" this.el.style.top = e.pageY + "px" }.bind(this)) this.show("start") }, show: function(name){ if (name) this.showMessage(name) this.$el.show() }, hide: function(){ this.$el.hide() }, showMessage: function(name){ if (+(this.shown[name] || 0) < 2) { this.$el.html(this.messages[name]) this.shown[name] = (+this.shown[name] || 0) + 1 } else { this.$el.html("") } }, })