Permalink
Browse files

fixing missing file

  • Loading branch information...
1 parent c852c12 commit 93e6f12ad7f2a3ffa9ecf63dd36dd6d193feb80a @cthulhuology committed Apr 7, 2017
Showing with 30 additions and 1 deletion.
  1. +1 −1 index.html
  2. +29 −0 object/Desktop
View
@@ -3,5 +3,5 @@
<title>Phosphor Interface Editor</title>
</head>
<body></body>
-<script src="/js"></script>
+<script src="js"></script>
</html>
View
@@ -0,0 +1,29 @@
+An.object().named('Desktop').from(Widget).
+ does('init', function() {
+ Sound.has('trash', a(Sound,'sounds/trash.aif')).
+ has('error', a(Sound,'sounds/error.wav')).
+ has('click', a(Sound,'sounds/click.wav'))
+ return this.has('help', a(Help,'images/help_button.png').at(Display.width()-100,10)).
+ has('inventory', an(Inventory)).
+ has('trash', a(Trash)).
+ instance()
+ }).
+ does('press', function(E) {
+ if(Keyboard.control() || Keyboard.command()) HotKey.of(E.key())
+ }).
+ does('draw', function() {
+ if (!this.visible()) return;
+ }).
+ does('move', function(E) {
+ global['here'] = E
+ }).
+ does('down', function(E) { // clicking on the screen not on a widget displays a block for editing
+ if (Widget.widgets().any(function(O) {
+ return O.can('on') && O != Desktop && O != Display && E.on(O)
+ })) return;
+ if (E.button() < 2) return;
+ Sound.click().play()
+ A.block().says('').at(E.x(),E.y()).by(100,24)
+ }).
+ init()
+

0 comments on commit 93e6f12

Please sign in to comment.