Game Development Community

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.

#1
11/04/2014 (7:57 am)
Scheduling anything for less than 32ms is effectively scheduling for 32ms, and asking for a "no flux capacitor installed" crash to boot : The engine ticks at 32ms. So, if you want something done as soon as possible it is safest to schedule it for this time - anything shorter is still effectively this.

Just trying to save some potential frustration - this particular thing has caused me much grief....
#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.