1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-09-20 04:24:45 +00:00

Advance row when printing on next column if width reached

This commit is contained in:
Fellippe Heitor 2023-05-13 17:12:22 -03:00 committed by GitHub
parent 56ef8356ba
commit 551fd8ee43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

11
qb.js
View file

@ -2200,6 +2200,15 @@ var QB = new function() {
else if (args[ai] == QB.COLUMN_ADVANCE) { else if (args[ai] == QB.COLUMN_ADVANCE) {
// advance to the next column offset // advance to the next column offset
_locX += 14 - _locX % 13; _locX += 14 - _locX % 13;
if (_locX > _textColumns()-1) {
_locX = 0;
if (_locY < _textRows()-1) {
_locY = _locY + 1;
}
else {
await _printScroll();
}
}
} }
else { else {
var str = args[ai]; var str = args[ai];
@ -3572,4 +3581,4 @@ var QB = new function() {
}; };
_init(); _init();
} }