fixed bug in ag::quad::setOffset()

This commit is contained in:
Josh Holtrop 2010-12-19 00:11:36 -05:00
parent 19a7687086
commit 8585f97e91
2 changed files with 5 additions and 2 deletions

2
ag.cc
View File

@ -1668,7 +1668,7 @@ fail:
Engine::Quad * q = getQuad(L, 1);
if (q != NULL)
{
q->setBlending(lua_tonumber(L, 2));
q->setOffset(lua_tonumber(L, 2));
}
}
return 0;

View File

@ -57,6 +57,9 @@ function key_down_event(key)
-- box:setPosition(x, y, 2)
elseif (key == "minus") then
ag.setCursorVisible(not ag.getCursorVisible())
elseif (key == "d") then
q = ag.createQuad(3, 3, 0, 1, 0, 0, 0, 1, 0)
q:setOffset(1)
end
end
@ -85,7 +88,7 @@ function update_overlay_event(width, height)
ag.drawPoint(1, 0, 1, 0, width-1, height-1)
ag.drawPoint(1, 0, 1, 1, -1, -1)
ag.drawPoint(1, 0, 1, 1, width, height)
msg = "b a s r - m1 m3"
msg = "b a s r d - m1 m3"
tw, th = ag.getTextSize(msg, 14)
ag.drawText(msg, 1, 1, 1, 14, width / 2 - tw / 2, 10)
end