Skip to content
Snippets Groups Projects
Commit b9f28d3b authored by deuce's avatar deuce
Browse files

Add dk.console.pos.x and .y since it's clearly needed.

parent 205d43ad
No related branches found
No related tags found
No related merge requests found
......@@ -420,10 +420,7 @@ var dk = {
'use strict';
var pos = parseInt((this.cols-str.length)/2);
if (this.remote_screen !== undefined)
this.movex(pos-this.remote_screen.pos.x);
else
this.movex(pos-this.local_io.screen.pos.x);
this.movex(pos-this.pos.x);
this.print(str);
},
center:function(str) {
......@@ -832,6 +829,8 @@ var dk = {
this.movex(-(str.length-pos));
}
}
},
pos:{
}
},
connection:{
......@@ -1097,6 +1096,24 @@ Object.defineProperty(dk.console.Private_attr, 'value', {
}
}
});
Object.defineProperty(dk.console.pos, 'x', {
enumerable:true,
get: function() {
'use strict';
if (dk.console.remote_io !== undefined)
return dk.console.remote_io.screen.pos.x;
return dk.console.local_io.screen.pos.x;
},
});
Object.defineProperty(dk.console.pos, 'y', {
enumerable:true,
get: function() {
'use strict';
if (dk.console.remote_io !== undefined)
return dk.console.remote_io.screen.pos.y;
return dk.console.local_io.screen.pos.y;
},
});
dk.parse_cmdline(argc, argv);
if (dk.connection.socket !== undefined) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment