Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/jgame.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 144 by tsugehara, Tue Aug 6 09:13:26 2013 UTC revision 145 by tsugehara, Tue Aug 6 09:42:10 2013 UTC
# Line 2826  var jg; Line 2826  var jg;
2826              for (var _i = 0; _i < (arguments.length - 2); _i++) {              for (var _i = 0; _i < (arguments.length - 2); _i++) {
2827                  args[_i] = arguments[_i + 2];                  args[_i] = arguments[_i + 2];
2828              }              }
2829                var _this = this;
2830              this._exit = false;              this._exit = false;
2831              this.id = jg.JGUtil.generateId();              this.id = jg.JGUtil.generateId();
2832              this.width = width;              this.width = width;
# Line 2883  var jg; Line 2884  var jg;
2884              if (document.getElementById("fps_show"))              if (document.getElementById("fps_show"))
2885                  this.fps = document.getElementById("fps_show");                  this.fps = document.getElementById("fps_show");
2886    
2887                this.renderer.handler.addEventListener("focus", function () {
2888                    _this.focus = true;
2889                }, false);
2890                this.renderer.handler.addEventListener("blur", function () {
2891                    _this.focus = false;
2892                }, false);
2893                this.focus = true;
2894    
2895              this.setSeed();              this.setSeed();
2896    
2897              this.main();              this.main();
# Line 2961  var jg; Line 2970  var jg;
2970          Game.prototype.onmousedown = function (e) {          Game.prototype.onmousedown = function (e) {
2971              this.isPointDown = true;              this.isPointDown = true;
2972              this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, e, this.getOffsetByEvent(e)));              this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, e, this.getOffsetByEvent(e)));
2973                if (!this.focus)
2974                    this.renderer.handler.focus();
2975              e.preventDefault();              e.preventDefault();
2976          };          };
2977    
# Line 2970  var jg; Line 2981  var jg;
2981              for (var i = 0, l = touches.length; i < l; i++)              for (var i = 0, l = touches.length; i < l; i++)
2982                  this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, touches[i], this.getOffsetByEvent(touches[i])));                  this.eventQueue.push(new jg.InputPointEvent(jg.InputEventAction.Down, touches[i], this.getOffsetByEvent(touches[i])));
2983    
2984                if (!this.focus)
2985                    this.renderer.handler.focus();
2986    
2987              e.preventDefault();              e.preventDefault();
2988          };          };
2989    

Legend:
Removed from v.144  
changed lines
  Added in v.145

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26