Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Paper.Component = function(){}; // useless unless I can solve problem mentioned below?
- Paper.Component.prototype = {
- isInBounds: function(x, y){
- // ...
- },
- setPosition: function(x, y){
- // ...
- },
- setSize: function(w, h){
- // ...
- }
- };
- Paper.Button = function(x, y, w, h, text){
- // ...
- }
- Paper.Button.prototype = Object.create(Paper.Component.prototype);
- Paper.Component = function(x,y,w,h){
- this.setPosition( x, y );
- this.setSize( w, h );
- };
- Paper.Component.prototype.isInBounds = function(x, y){};
- Paper.Component.prototype.setPosition = function(x, y){};
- Paper.Component.prototype.setSize = function(w, h){};
- Paper.Button = function(x, y, w, h, text){
- Paper.Component.apply( this, arguments );
- }
- Paper.Button.prototype = Object.create(Paper.Component.prototype);
- Paper.Button.prototype.constructor = Paper.Button;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement