Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 50186717 authored by rswindell's avatar rswindell

The draw() and draw_bin() methods now support an additional, optional 'top'

argument which specifies that the avatar should be drawn at the top of the
screen.
parent b4d31140
......@@ -265,15 +265,15 @@ function is_enabled(obj)
}
// Uses Graphic.draw() at an absolute screen coordinate
function draw(usernum, username, netaddr, above, right)
function draw(usernum, username, netaddr, above, right, top)
{
var avatar = this.read(usernum, username, netaddr);
if(!is_enabled(avatar))
return false;
return draw_bin(avatar.data, above, right);
return draw_bin(avatar.data, above, right, top);
}
function draw_bin(data, above, right)
function draw_bin(data, above, right, top)
{
load('graphic.js');
var graphic = new Graphic(this.defs.width, this.defs.height);
......@@ -283,7 +283,9 @@ function draw_bin(data, above, right)
var pos = console.getxy();
var x = pos.x;
var y = pos.y;
if(above)
if(top)
y = 1;
else if(above)
y -= this.defs.height;
if(right)
x = console.screen_columns - (this.defs.width + 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment