tiagolr / dconsole

Haxe game-like console that provides runtime acess to methods, variables and more.
MIT License
169 stars 16 forks source link

Premature scrolling #54

Open mikeevmm opened 8 years ago

mikeevmm commented 8 years ago

When writing multiple lines in a row, the console becomes rather disformatted.

Code used to display multiple lines:

//In params: text:String, color:Int = -1
var lines = text.split("\n");
var count = 0;
//FlxTimer class, from HaxeFlixel
new FlxTimer(0.05, function(t:FlxTimer) {
        var line = lines[count];
        if (line != "") DC.log(line, color); else DC.log("\n");
        count++;
    }, lines.length);
}

Result:

dconsole

tiagolr commented 8 years ago

Okay, openfl / flixel using -D Legacy + flash, I'll have a look soon. Btw great use of the console there, never meant to be used as part of a game.

mikeevmm commented 8 years ago

Thanks :)

Something that might help: when compiling to windows scrolling works correctly, but the console leaves a line break between every log. So I'm guessing that every line is counting as 2 in Flash.

tiagolr commented 8 years ago

Hey @mikeevmm have you fixed this issue meanwhile? I remember from time to time about this issue but I haven't picked this project yet and made some updates.

mikeevmm commented 8 years ago

@tiagolr nope :/ messed around with it until it was consistent in the cpp target, but never figured out why the two lines for each print.