console.cs small bug easy "fix"
by Christian M Weber · in Torque 2D Beginner · 11/03/2014 (7:29 pm) · 2 replies
Hello, I started again using T2D and I noticed my console log was not scrolling to the bottom like it should.
An easy "fix" was the schedule the scroll to bottom call. It appears the .extent is not updated until the element is being rendered. Maybe done that way to not slow the game down, which is fine by me!
Anyways, the "fix".
In console.cs change scrollToBottom to a schedule call.
ConsoleScrollCtrl.schedule(10, scrollToBottom);
1ms was too fast. 10ms did the trick without noticing it when opening the console :)
I tried using ConsoleDialog::onWake and then having scrollToBottom but that didn't work.
Have fun, I hope to share more with you all.
An easy "fix" was the schedule the scroll to bottom call. It appears the .extent is not updated until the element is being rendered. Maybe done that way to not slow the game down, which is fine by me!
Anyways, the "fix".
In console.cs change scrollToBottom to a schedule call.
ConsoleScrollCtrl.schedule(10, scrollToBottom);
1ms was too fast. 10ms did the trick without noticing it when opening the console :)
I tried using ConsoleDialog::onWake and then having scrollToBottom but that didn't work.
Have fun, I hope to share more with you all.
About the author
#2
11/04/2014 (6:14 pm)
Good too know, but if you try my example with 1ms it won't work for some reason. I'm going to change it to 32ms just in case.
Torque Owner Richard Ranft
Roostertail Games
Just trying to save some potential frustration - this particular thing has caused me much grief....